diff --git a/arch/arm/boot/dts/Makefile b/arch/arm/boot/dts/Makefile index dea8017c77ad2..d6d9ac6137358 100644 --- a/arch/arm/boot/dts/Makefile +++ b/arch/arm/boot/dts/Makefile @@ -1289,6 +1289,7 @@ dtb-$(CONFIG_ARCH_TEGRA_3x_SOC) += \ tegra30-cardhu-a04.dtb \ tegra30-colibri-eval-v3.dtb \ tegra30-lenovo-ideatab-a2109a.dtb \ + tegra30-lenovo-ideapad-yoga-11.dtb \ tegra30-microsoft-surface-rt.dtb \ tegra30-microsoft-surface-rt-efi.dtb \ tegra30-ouya.dtb \ diff --git a/arch/arm/boot/dts/tegra30-lenovo-ideapad-yoga-11.dts b/arch/arm/boot/dts/tegra30-lenovo-ideapad-yoga-11.dts new file mode 100644 index 0000000000000..94decc46904b5 --- /dev/null +++ b/arch/arm/boot/dts/tegra30-lenovo-ideapad-yoga-11.dts @@ -0,0 +1,128 @@ +// SPDX-License-Identifier: GPL-2.0 + +/dts-v1/; + +#include +#include "tegra30.dtsi" + +/ { + model = "Lenovo IdeaPad Yoga 11"; + compatible = "lenovo,ideapad-yoga-11", "nvidia,tegra30"; + + /* clock from PMIC */ + clk32k_in: clock@0 { + compatible = "fixed-clock"; + clock-frequency = <32768>; + #clock-cells = <0>; + }; + + pinmux@70000868 { + pinctrl-names = "default"; + pinctrl-0 = <&state_default>; + + state_default: pinmux { + /* HDMI HOTPLUG_DETECT */ + /*hdmi-int-pn7 { + nvidia,pins = "hdmi_int_pn7"; + nvidia,function = "hdmi"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + };*/ + + /* Backlight PWM */ + /*gmi-ad8-ph0 { + nvidia,pins = "gmi_ad8_ph0"; + nvidia,function = "pwm0"; + nvidia,pull = ; + nvidia,tristate = ; + nvidia,enable-input = ; + };*/ + }; + }; + + panel: display-panel { + compatible = "samsung,ltn140at29-301"; + + power-supply = <&vdd_pnl>; + backlight = <&backlight>; + + port { + panel_input: endpoint { + remote-endpoint = <&lvds_encoder_output>; + }; + }; + }; + + vdd_pnl: vdd-panel { + compatible = "regulator-fixed"; + regulator-name = "vdd_panel"; + regulator-min-microvolt = <3300000>; + regulator-max-microvolt = <3300000>; + regulator-boot-on; + regulator-always-on; + //gpio = <&gpio TEGRA_GPIO(L, 4) GPIO_ACTIVE_HIGH>; + enable-active-high; + }; + + backlight: backlight { + compatible = "pwm-backlight"; + //enable-gpios = <&gpio TEGRA_GPIO(H, 2) GPIO_ACTIVE_HIGH>; + pwms = <&pwm 0 50000>; + brightness-levels = <1 255>; + num-interpolated-steps = <254>; + default-brightness-level = <128>; + }; + + pwm@7000a000 { + status = "okay"; + }; + + host1x@50000000 { + hdmi@54280000 { + status = "okay"; + //nvidia,ddc-i2c-bus = <&hdmi_ddc>; + nvidia,hpd-gpio = <&gpio TEGRA_GPIO(N, 7) GPIO_ACTIVE_HIGH>; + }; + + dc@54200000 { + rgb { + status = "okay"; + + port@0 { + lcd_output: endpoint { + remote-endpoint = <&lvds_encoder_input>; + bus-width = <24>; + }; + }; + }; + }; + }; + + lvds-encoder { + compatible = "lvds-encoder"; + + //powerdown-gpios = <&gpio TEGRA_GPIO(C, 1) GPIO_ACTIVE_LOW>; + + ports { + #address-cells = <1>; + #size-cells = <0>; + + port@0 { + reg = <0>; + + lvds_encoder_input: endpoint { + remote-endpoint = <&lcd_output>; + }; + }; + + port@1 { + reg = <1>; + + lvds_encoder_output: endpoint { + remote-endpoint = <&panel_input>; + }; + }; + }; + }; +}; diff --git a/drivers/firmware/efi/libstub/efi-stub.c b/drivers/firmware/efi/libstub/efi-stub.c index 26e69788f27a4..acce9f9c8d37b 100644 --- a/drivers/firmware/efi/libstub/efi-stub.c +++ b/drivers/firmware/efi/libstub/efi-stub.c @@ -135,6 +135,8 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, struct screen_info *si; efi_properties_table_t *prop_tbl; unsigned long max_addr; + /* Use https://www.rapidtables.com/convert/number/ascii-to-hex.html to create a different cmdline */ + static u8 new_cmdline[] = {0x7a, 0x00, 0x49, 0x00, 0x6d, 0x00, 0x61, 0x00, 0x67, 0x00, 0x65, 0x00, 0x20, 0x00, 0x64, 0x00, 0x74, 0x00, 0x62, 0x00, 0x3d, 0x00, 0x74, 0x00, 0x65, 0x00, 0x67, 0x00, 0x72, 0x00, 0x61, 0x00, 0x33, 0x00, 0x30, 0x00, 0x2d, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x6e, 0x00, 0x6f, 0x00, 0x76, 0x00, 0x6f, 0x00, 0x2d, 0x00, 0x69, 0x00, 0x64, 0x00, 0x65, 0x00, 0x61, 0x00, 0x70, 0x00, 0x61, 0x00, 0x64, 0x00, 0x2d, 0x00, 0x79, 0x00, 0x6f, 0x00, 0x67, 0x00, 0x61, 0x00, 0x2d, 0x00, 0x31, 0x00, 0x31, 0x00, 0x2e, 0x00, 0x64, 0x00, 0x74, 0x00, 0x62, 0x00, 0x20, 0x00, 0x65, 0x00, 0x61, 0x00, 0x72, 0x00, 0x6c, 0x00, 0x79, 0x00, 0x70, 0x00, 0x72, 0x00, 0x69, 0x00, 0x6e, 0x00, 0x74, 0x00, 0x6b, 0x00, 0x3d, 0x00, 0x65, 0x00, 0x66, 0x00, 0x69, 0x00, 0x2c, 0x00, 0x6b, 0x00, 0x65, 0x00, 0x65, 0x00, 0x70, 0x00, 0x20, 0x00, 0x62, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x5f, 0x00, 0x64, 0x00, 0x65, 0x00, 0x6c, 0x00, 0x61, 0x00, 0x79, 0x00, 0x3d, 0x00, 0x31, 0x00, 0x30, 0x00, 0x30, 0x00, 0x30, 0x00, 0x20, 0x00, 0x63, 0x00, 0x6f, 0x00, 0x6e, 0x00, 0x73, 0x00, 0x6f, 0x00, 0x6c, 0x00, 0x65, 0x00, 0x3d, 0x00, 0x74, 0x00, 0x74, 0x00, 0x79, 0x00, 0x30, 0x00, 0x20, 0x00, 0x72, 0x00, 0x6f, 0x00, 0x6f, 0x00, 0x74, 0x00, 0x77, 0x00, 0x61, 0x00, 0x69, 0x00, 0x74, 0x00}; efi_system_table = sys_table_arg; @@ -160,6 +162,10 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, goto fail; } + /* Patch kernel command line */ + image->load_options = new_cmdline; + image->load_options_size = sizeof(new_cmdline) / 2; + /* * Get the command line from EFI, using the LOADED_IMAGE * protocol. We are going to copy the command line into the @@ -211,12 +217,9 @@ efi_status_t __efiapi efi_pe_entry(efi_handle_t handle, secure_boot = efi_get_secureboot(); /* - * Unauthenticated device tree data is a security hazard, so ignore - * 'dtb=' unless UEFI Secure Boot is disabled. We assume that secure - * boot is enabled if we can't determine its state. + * Ignoring secure boot state. Loading a DTB either way. */ - if (!IS_ENABLED(CONFIG_EFI_ARMSTUB_DTB_LOADER) || - secure_boot != efi_secureboot_mode_disabled) { + if (!IS_ENABLED(CONFIG_EFI_ARMSTUB_DTB_LOADER)) { if (strstr(cmdline_ptr, "dtb=")) efi_err("Ignoring DTB from command line.\n"); } else {