mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
* [PATCH 0/2] Backlight fixes for X1-based Surface Pro 11
@ 2026-10-17 17:52 Dale Whinham
  2026-10-17 17:52 ` [PATCH 1/2] arm64: dts: qcom: x1-denali: Add missing pinctrl for eDP HPD Dale Whinham
  2026-10-17 17:52 ` [PATCH 2/2] arm64: dts: qcom: x1-denali: Add PWM backlight for LCD Dale Whinham
  0 siblings, 2 replies; 3+ messages in thread
From: Dale Whinham @ 2026-10-17 17:52 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Jérôme de Bretagne
  Cc: linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio,
	Haipeng Lin, Dale Whinham

The LCD variant of the Surface Pro 11 has had no working backlight
control since the device was added. Its DT took the panel description
from the OLED model, where pmc8380_3 gpio4 is the panel enable line.
On the LCD model, gpio4 enables the backlight instead, and brightness
is a PWM output from the PMK8550 LPG on gpio5. The supply is enabled
by pmc8380_3 gpio10. This is the same arrangement as the ThinkPad T14s
LCD and the Surface Laptop 7.

Patch 1 describes the eDP HPD pinmux (gpio119 -> edp0_hot), which the
Windows ACPI configures for both panel variants. At the moment we rely
on UEFI to set it up.

Patch 2 moves the OLED-specific panel enable and compatible out of the
common dtsi, and adds a pwm-backlight node for the LCD variant.

Tested on the OLED variant by myself and on the LCD variant by Haipeng
Lin.

Signed-off-by: Dale Whinham <daleyo@gmail.com>
---
Dale Whinham (2):
      arm64: dts: qcom: x1-denali: Add missing pinctrl for eDP HPD
      arm64: dts: qcom: x1-denali: Add PWM backlight for LCD

 arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi  |  8 ++--
 .../dts/qcom/x1e80100-microsoft-denali-oled.dts    |  4 ++
 .../boot/dts/qcom/x1p64100-microsoft-denali.dts    | 47 ++++++++++++++++++++++
 3 files changed, 54 insertions(+), 5 deletions(-)
---
base-commit: 24a19b953e2a3d0ea5a8c4951a0ab8f32720c907
change-id: 20261017-sp11-lcd-fixes-5a2666365561

Best regards,
--  
Dale Whinham <daleyo@gmail.com>


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 1/2] arm64: dts: qcom: x1-denali: Add missing pinctrl for eDP HPD
  2026-10-17 17:52 [PATCH 0/2] Backlight fixes for X1-based Surface Pro 11 Dale Whinham
@ 2026-10-17 17:52 ` Dale Whinham
  2026-10-17 17:52 ` [PATCH 2/2] arm64: dts: qcom: x1-denali: Add PWM backlight for LCD Dale Whinham
  1 sibling, 0 replies; 3+ messages in thread
From: Dale Whinham @ 2026-10-17 17:52 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Jérôme de Bretagne
  Cc: linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio,
	Haipeng Lin, Dale Whinham

The Windows ACPI muxes gpio119 to edp0_hot for both panels. Describe
it rather than relying on UEFI.

Fixes: 0d72ccaa1e84 ("arm64: dts: qcom: Add support for X1-based Surface Pro 11")
Signed-off-by: Dale Whinham <daleyo@gmail.com>
Tested-by: Haipeng Lin <jimmie.lin@gmail.com>
---
 arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
index e3a53b8930d9..332189839606 100644
--- a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
@@ -894,6 +894,9 @@ &mdss_dp3 {
 	compatible = "qcom,x1e80100-dp";
 	/delete-property/ #sound-dai-cells;
 
+	pinctrl-0 = <&edp0_hpd_default>;
+	pinctrl-names = "default";
+
 	status = "okay";
 
 	aux-bus {

-- 
2.56.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

* [PATCH 2/2] arm64: dts: qcom: x1-denali: Add PWM backlight for LCD
  2026-10-17 17:52 [PATCH 0/2] Backlight fixes for X1-based Surface Pro 11 Dale Whinham
  2026-10-17 17:52 ` [PATCH 1/2] arm64: dts: qcom: x1-denali: Add missing pinctrl for eDP HPD Dale Whinham
@ 2026-10-17 17:52 ` Dale Whinham
  1 sibling, 0 replies; 3+ messages in thread
From: Dale Whinham @ 2026-10-17 17:52 UTC (permalink / raw)
  To: Bjorn Andersson, Konrad Dybcio, Rob Herring, Krzysztof Kozlowski,
	Conor Dooley, Abel Vesa, Jérôme de Bretagne
  Cc: linux-arm-msm, devicetree, linux-kernel, Konrad Dybcio,
	Haipeng Lin, Dale Whinham

The LCD variant's backlight is PWM from the PMK8550 LPG on gpio5, with
pmc8380_3 gpio10 enabling the supply and gpio4 the backlight, as on the
T14s LCD and Surface Laptop 7.

On OLED gpio4 is the panel enable, so move it and the panel compatible
out of the common dtsi.

Fixes: 0d72ccaa1e84 ("arm64: dts: qcom: Add support for X1-based Surface Pro 11")
Signed-off-by: Dale Whinham <daleyo@gmail.com>
Tested-by: Haipeng Lin <jimmie.lin@gmail.com>
---
 arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi  |  5 ---
 .../dts/qcom/x1e80100-microsoft-denali-oled.dts    |  4 ++
 .../boot/dts/qcom/x1p64100-microsoft-denali.dts    | 47 ++++++++++++++++++++++
 3 files changed, 51 insertions(+), 5 deletions(-)

diff --git a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
index 332189839606..4bce2f202fcc 100644
--- a/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
+++ b/arch/arm64/boot/dts/qcom/x1-microsoft-denali.dtsi
@@ -901,13 +901,8 @@ &mdss_dp3 {
 
 	aux-bus {
 		panel: panel {
-			compatible = "edp-panel";
-			enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
 			power-supply = <&vreg_edp_3p3>;
 
-			pinctrl-0 = <&edp_bl_en>;
-			pinctrl-names = "default";
-
 			port {
 				edp_panel_in: endpoint {
 					remote-endpoint = <&mdss_dp3_out>;
diff --git a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-denali-oled.dts b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-denali-oled.dts
index 07ce43ccf394..a42298865dd3 100644
--- a/arch/arm64/boot/dts/qcom/x1e80100-microsoft-denali-oled.dts
+++ b/arch/arm64/boot/dts/qcom/x1e80100-microsoft-denali-oled.dts
@@ -16,4 +16,8 @@ / {
 
 &panel {
 	compatible = "samsung,atna30dw01", "samsung,atna33xc20";
+	enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
+
+	pinctrl-0 = <&edp_bl_en>;
+	pinctrl-names = "default";
 };
diff --git a/arch/arm64/boot/dts/qcom/x1p64100-microsoft-denali.dts b/arch/arm64/boot/dts/qcom/x1p64100-microsoft-denali.dts
index d96202e2afc6..68e68ca14ab1 100644
--- a/arch/arm64/boot/dts/qcom/x1p64100-microsoft-denali.dts
+++ b/arch/arm64/boot/dts/qcom/x1p64100-microsoft-denali.dts
@@ -12,4 +12,51 @@ / {
 	model = "Microsoft Surface Pro 11th Edition (LCD)";
 	compatible = "microsoft,denali-lcd", "microsoft,denali",
 		     "qcom,x1p64100", "qcom,x1e80100";
+
+	backlight: backlight {
+		compatible = "pwm-backlight";
+		pwms = <&pmk8550_pwm 0 5000000>;
+		enable-gpios = <&pmc8380_3_gpios 4 GPIO_ACTIVE_HIGH>;
+		power-supply = <&vreg_edp_bl>;
+
+		pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
+		pinctrl-names = "default";
+	};
+
+	vreg_edp_bl: regulator-edp-bl {
+		compatible = "regulator-fixed";
+
+		regulator-name = "VREG_EDP_BL";
+
+		gpio = <&pmc8380_3_gpios 10 GPIO_ACTIVE_HIGH>;
+		enable-active-high;
+
+		pinctrl-0 = <&edp_bl_reg_en>;
+		pinctrl-names = "default";
+
+		regulator-boot-on;
+	};
+};
+
+&panel {
+	compatible = "edp-panel";
+	backlight = <&backlight>;
+};
+
+&pmc8380_3_gpios {
+	edp_bl_reg_en: edp-bl-reg-en-state {
+		pins = "gpio10";
+		function = "normal";
+	};
+};
+
+&pmk8550_gpios {
+	edp_bl_pwm: edp-bl-pwm-state {
+		pins = "gpio5";
+		function = "func3";
+	};
+};
+
+&pmk8550_pwm {
+	status = "okay";
 };

-- 
2.56.0


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2026-10-17 17:52 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2026-10-17 17:52 [PATCH 0/2] Backlight fixes for X1-based Surface Pro 11 Dale Whinham
2026-10-17 17:52 ` [PATCH 1/2] arm64: dts: qcom: x1-denali: Add missing pinctrl for eDP HPD Dale Whinham
2026-10-17 17:52 ` [PATCH 2/2] arm64: dts: qcom: x1-denali: Add PWM backlight for LCD Dale Whinham

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox

all inboxes | Powered by JetHome®