Re: [PATCH 02/11] arm64: dts: qcom: sc8280xp-arcata: Enable backlight
From: Jérôme de Bretagne
Date: Wed May 20 2026 - 18:26:56 EST
On 5/20/26 18:40, Jérôme de Bretagne via B4 Relay wrote:
From: Jérôme de Bretagne <jerome.debretagne@xxxxxxxxx>
Add backlight nodes and enable backlight so that it can be controlled
with the corresponding buttons found on Surface Pro Type Cover keyboards.
The nodes are almost identical to the ones from the ThinkPad X13s with
a different enable GPIO for the vreg_edp_bl node.
The difference was found by looking at the output of /sys/kernel/debug/gpio
on the ThinkPad X13s to see the properties of its enable gpio9:
gpiochip1: GPIOs 742-751, parent: platform/c440000.spmi:pmic@1:gpio@8800, c440000.spmi:pmic@1:gpio@8800:
...
gpio9 : out high normal vin-1 pull-down 10uA push-pull medium atest-1 dtest-0
...
The same gpio9 on the Surface Pro 9 5G has different properties:
gpiochip0: 10 GPIOs, parent: platform/c440000.spmi:pmic@1:gpio@8800, c440000.spmi:pmic@1:gpio@8800:
...
gpio9 : in high normal vin-1 pull-up 30uA push-pull low atest-1 dtest-0
...
Looking for a match on the Surface Pro 9 5G pointed to this only one:
gpiochip2: 10 GPIOs, parent: platform/c440000.spmi:pmic@3:gpio@8800, c440000.spmi:pmic@3:gpio@8800:
...
gpio6 : out high normal vin-1 pull-down 10uA push-pull medium atest-1 dtest-0
...
Signed-off-by: Jérôme de Bretagne <jerome.debretagne@xxxxxxxxx>
---
.../boot/dts/qcom/sc8280xp-microsoft-arcata.dts | 49 ++++++++++++++++++++++
1 file changed, 49 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
index f2b4470d4407fb5b6a3dbac8bc972c010c31bd06..14287092fb07ea15e527fd318f7ea2155448b26c 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
@@ -46,6 +46,16 @@ wcd938x: audio-codec {
#sound-dai-cells = <1>;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pmc8280c_lpg 3 1000000>;
+ enable-gpios = <&pmc8280_1_gpios 8 GPIO_ACTIVE_HIGH>;
+ power-supply = <&vreg_edp_bl>;
+
+ pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
+ pinctrl-names = "default";
+ };
+
Investigating the feedback I got from an AI bot review [1], I plan to update this patch in v2. Let me know what you think.
I was skeptical at first but upon review I've tried the following patch:
diff --git a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
index f938e68c69ea..82e0a01276a8 100644
--- a/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
+++ b/arch/arm64/boot/dts/qcom/sc8280xp-microsoft-arcata.dts
@@ -198,7 +198,7 @@ vreg_edp_bl: regulator-edp-bl {
regulator-min-microvolt = <3600000>;
regulator-max-microvolt = <3600000>;
- gpio = <&pmc8280c_gpios 6 GPIO_ACTIVE_HIGH>;
+ gpio = <&pmc8280_2_gpios 6 GPIO_ACTIVE_HIGH>;
enable-active-high;
pinctrl-0 = <&edp_bl_reg_en>;
@@ -1050,6 +1050,11 @@ vol_up_n: vol-up-n-state {
};
&pmc8280_2_gpios {
+ edp_bl_reg_en: edp-bl-reg-en-state {
+ pins = "gpio6";
+ function = "normal";
+ };
+
wwan_sw_en: wwan-sw-en-state {
pins = "gpio1";
function = "normal";
@@ -1061,11 +1066,6 @@ edp_bl_pwm: edp-bl-pwm-state {
pins = "gpio8";
function = "func1";
};
-
- edp_bl_reg_en: edp-bl-reg-en-state {
- pins = "gpio6";
- function = "normal";
- };
};
&pmr735a_gpios {
and ... backlight still works! It can also be enabled/disabled with:
/sys/class/backlight/backlight/bl_power
as expected.
I have no clue why both gpio6 on pmc8280_2 and gpio6 on pmc8280c can enable and disable the backlight. Is it a common scenario?
Anyway, if I follow my own investigation fully based on the X13s reference and the properties of its backlight enable GPIO, I should switch to pmc8280_2 to use the better match.
I will update this patch in v2.
Jérôme
[1] https://lore.kernel.org/all/20260520165709.E485C1F00893@xxxxxxxxxxxxxxx/