From: Jérôme de Bretagne <jerome.debretagne@gmail.com>
To: Douglas Anderson <dianders@chromium.org>,
Neil Armstrong <neil.armstrong@linaro.org>,
Jessica Zhang <jesszhan0024@gmail.com>,
Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
Maxime Ripard <mripard@kernel.org>,
Thomas Zimmermann <tzimmermann@suse.de>,
David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
Bjorn Andersson <andersson@kernel.org>,
Konrad Dybcio <konradybcio@kernel.org>,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>
Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
linux-arm-msm@vger.kernel.org, devicetree@vger.kernel.org,
Krzysztof Kozlowski <krzk@kernel.org>
Subject: Re: [PATCH 02/11] arm64: dts: qcom: sc8280xp-arcata: Enable backlight
Date: Thu, 21 May 2026 00:26:24 +0200 [thread overview]
Message-ID: <f5f70aa2-a1b8-40e0-838f-6709e6e08a5a@gmail.com> (raw)
In-Reply-To: <20260520-surface-sp9-5g-for-next-v1-2-9df52552bf87@gmail.com>
On 5/20/26 18:40, Jérôme de Bretagne via B4 Relay wrote:
> From: Jérôme de Bretagne <jerome.debretagne@gmail.com>
>
> 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@gmail.com>
> ---
> .../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@smtp.kernel.org/
next prev parent reply other threads:[~2026-05-20 22:26 UTC|newest]
Thread overview: 40+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-05-20 16:40 [PATCH 00/11] Microsoft Surface Pro 9 5G update Jérôme de Bretagne via B4 Relay
2026-05-20 16:40 ` [PATCH 01/11] drm/panel: edp: Add LG LP129WT232166 panel Jérôme de Bretagne via B4 Relay
2026-05-21 16:21 ` Doug Anderson
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 02/11] arm64: dts: qcom: sc8280xp-arcata: Enable backlight Jérôme de Bretagne via B4 Relay
2026-05-20 22:26 ` Jérôme de Bretagne [this message]
2026-05-21 8:48 ` Konrad Dybcio
2026-05-21 17:57 ` Jérôme de Bretagne
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 03/11] arm64: dts: qcom: sc8280xp-arcata: Enable the eDP display Jérôme de Bretagne via B4 Relay
2026-05-21 8:50 ` Konrad Dybcio
2026-05-21 18:09 ` Jérôme de Bretagne
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 04/11] arm64: dts: qcom: sc8280xp-arcata: add USB-C orientation GPIOs Jérôme de Bretagne via B4 Relay
2026-05-21 8:52 ` Konrad Dybcio
2026-05-21 18:04 ` Jérôme de Bretagne
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 05/11] arm64: dts: qcom: sc8280xp-arcata: Fix top USB-C DP alt mode Jérôme de Bretagne via B4 Relay
2026-05-21 8:53 ` Konrad Dybcio
2026-05-21 17:59 ` Jérôme de Bretagne
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 06/11] arm64: dts: qcom: sc8280xp-arcata: Enable 4-lane DP support Jérôme de Bretagne via B4 Relay
2026-05-22 9:36 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 07/11] arm64: dts: qcom: sc8280xp-arcata: Add volume up/down GPIO keys Jérôme de Bretagne via B4 Relay
2026-05-21 8:54 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 08/11] arm64: dts: qcom: sc8280xp-arcata: Add lid switch Jérôme de Bretagne via B4 Relay
2026-05-21 8:54 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 09/11] arm64: dts: qcom: sc8280xp-arcata: model the PMU of the on-board wcn6855 Jérôme de Bretagne via B4 Relay
2026-05-21 8:57 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 10/11] arm64: dts: qcom: sc8280xp-arcata: Switch to uefi rtc offset Jérôme de Bretagne via B4 Relay
2026-05-21 8:57 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-20 16:40 ` [PATCH 11/11] arm64: dts: qcom: sc8280xp-arcata: Drop duplicate DMIC supplies Jérôme de Bretagne via B4 Relay
2026-05-21 8:58 ` Konrad Dybcio
2026-05-25 11:20 ` Claude review: " Claude Code Review Bot
2026-05-25 11:20 ` Claude review: Microsoft Surface Pro 9 5G update Claude Code Review Bot
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=f5f70aa2-a1b8-40e0-838f-6709e6e08a5a@gmail.com \
--to=jerome.debretagne@gmail.com \
--cc=airlied@gmail.com \
--cc=andersson@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=dianders@chromium.org \
--cc=dri-devel@lists.freedesktop.org \
--cc=jesszhan0024@gmail.com \
--cc=konradybcio@kernel.org \
--cc=krzk+dt@kernel.org \
--cc=krzk@kernel.org \
--cc=linux-arm-msm@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=maarten.lankhorst@linux.intel.com \
--cc=mripard@kernel.org \
--cc=neil.armstrong@linaro.org \
--cc=robh@kernel.org \
--cc=simona@ffwll.ch \
--cc=tzimmermann@suse.de \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox