* [PATCH v2 1/3] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible
2026-11-25 19:52 [PATCH v2 0/3] qcom: PMK8850 LPG backlight on Mahua T14s Srinivas Kandagatla
@ 2026-11-25 19:52 ` Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 2/3] arm64: dts: qcom: pmk8850: add PWM node Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 3/3] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla
2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2026-11-25 19:52 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Abel Vesa, Griffin Kroah-Hartman, Luke Macken,
Srinivas Kandagatla, linux-leds, devicetree, linux-arm-msm,
linux-kernel, Srinivas Kandagatla
The PMK8850 sleep-clock PMIC on Snapdragon X2 Elite (Mahua) exposes
the same two-channel LPG/PWM block as PMK8550 and reuses the same
programming model, so list it with qcom,pmk8550-pwm as a fallback
compatible.
Used on the Lenovo ThinkPad T14s Gen 7 to drive the eDP backlight
(EDP_BL/PWMR_BV_PS).
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 3da0fe532e74..e018f1f3532a 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -49,6 +49,10 @@ properties:
- enum:
- qcom,pm8937-pwm
- const: qcom,pm8916-pwm
+ - items:
+ - enum:
+ - qcom,pmk8850-pwm
+ - const: qcom,pmk8550-pwm
"#pwm-cells":
const: 2
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/3] arm64: dts: qcom: pmk8850: add PWM node
2026-11-25 19:52 [PATCH v2 0/3] qcom: PMK8850 LPG backlight on Mahua T14s Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 1/3] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
@ 2026-11-25 19:52 ` Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 3/3] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla
2 siblings, 0 replies; 5+ messages in thread
From: Srinivas Kandagatla @ 2026-11-25 19:52 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Abel Vesa, Griffin Kroah-Hartman, Luke Macken,
Srinivas Kandagatla, linux-leds, devicetree, linux-arm-msm,
linux-kernel, Srinivas Kandagatla, Konrad Dybcio
Describe the LPG/PWM block on the PMK8850 sleep-clock PMIC. Left
disabled at the SoC level; boards enable it and reference the channel
that drives their backlight or LED.
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-by: Luke Macken <luke@phorex.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
arch/arm64/boot/dts/qcom/pmk8850.dtsi | 10 ++++++++++
1 file changed, 10 insertions(+)
diff --git a/arch/arm64/boot/dts/qcom/pmk8850.dtsi b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
index c7ba72fd48bc..053ae42ef0fb 100644
--- a/arch/arm64/boot/dts/qcom/pmk8850.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
@@ -66,5 +66,15 @@ reboot_reason: reboot-reason@48 {
bits = <1 7>;
};
};
+
+ pmk8850_pwm: pwm {
+ compatible = "qcom,pmk8850-pwm", "qcom,pmk8550-pwm";
+
+ #address-cells = <1>;
+ #size-cells = <0>;
+ #pwm-cells = <2>;
+
+ status = "disabled";
+ };
};
};
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/3] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm
2026-11-25 19:52 [PATCH v2 0/3] qcom: PMK8850 LPG backlight on Mahua T14s Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 1/3] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
2026-11-25 19:52 ` [PATCH v2 2/3] arm64: dts: qcom: pmk8850: add PWM node Srinivas Kandagatla
@ 2026-11-25 19:52 ` Srinivas Kandagatla
2026-11-25 20:01 ` sashiko-bot
2 siblings, 1 reply; 5+ messages in thread
From: Srinivas Kandagatla @ 2026-11-25 19:52 UTC (permalink / raw)
To: Lee Jones, Pavel Machek, Bjorn Andersson, Konrad Dybcio,
Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Abel Vesa, Griffin Kroah-Hartman, Luke Macken,
Srinivas Kandagatla, linux-leds, devicetree, linux-arm-msm,
linux-kernel, Srinivas Kandagatla, Konrad Dybcio
Move TLMM 18 (EDP_BL_EN) out of the panel node into a pwm-backlight
node and wire real brightness control through the pmk8850 PWMR output
(EDP_BL/PWMR_BV_PS on the schematic).
panel-edp was asserting EDP_BL_EN before eDP link training, turning the
backlight on ahead of video. With a dedicated backlight node the
framework toggles EDP_BL_EN after the link is up; TLMM 18 remains the
LED-driver enable, now gated correctly.
The panel takes only its 3.3 V logic supply and references the
backlight via a phandle. Brightness drives the LPG/PWM channel on
pmk8850 routed out via pmk8850_gpios gpio5 (func3).
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Tested-by: Luke Macken <luke@phorex.org>
Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
.../mahua-lenovo-thinkpad-t14s-gen7-lcd.dts | 26 ++++++++++++++++---
arch/arm64/boot/dts/qcom/pmk8850.dtsi | 3 ---
2 files changed, 22 insertions(+), 7 deletions(-)
diff --git a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
index 2d6578edcc82..bad49ba5443f 100644
--- a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
+++ b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
@@ -156,6 +156,16 @@ vreg_edp_bl: regulator-edp-bl {
regulator-always-on;
};
+ backlight: backlight {
+ compatible = "pwm-backlight";
+ pwms = <&pmk8850_pwm 0 4266537>;
+ enable-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
+ power-supply = <&vreg_edp_bl>;
+
+ pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
+ pinctrl-names = "default";
+ };
+
vreg_misc_3p3: regulator-misc-3p3 {
compatible = "regulator-fixed";
@@ -579,11 +589,8 @@ &mdss_dp3 {
aux-bus {
panel {
compatible = "edp-panel";
- enable-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
power-supply = <&vreg_edp_3p3>;
-
- pinctrl-0 = <&edp_bl_en>;
- pinctrl-names = "default";
+ backlight = <&backlight>;
port {
edp_panel_in: endpoint {
@@ -696,6 +703,17 @@ misc_3p3_reg_en: misc-3p3-reg-en-state {
};
};
+&pmk8850_gpios {
+ edp_bl_pwm: edp-bl-pwm-state {
+ pins = "gpio5";
+ function = "func3";
+ };
+};
+
+&pmk8850_pwm {
+ status = "okay";
+};
+
&pmk8850_rtc {
qcom,no-alarm;
};
diff --git a/arch/arm64/boot/dts/qcom/pmk8850.dtsi b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
index 053ae42ef0fb..dfa99cbd21d7 100644
--- a/arch/arm64/boot/dts/qcom/pmk8850.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
@@ -69,9 +69,6 @@ reboot_reason: reboot-reason@48 {
pmk8850_pwm: pwm {
compatible = "qcom,pmk8850-pwm", "qcom,pmk8550-pwm";
-
- #address-cells = <1>;
- #size-cells = <0>;
#pwm-cells = <2>;
status = "disabled";
--
2.53.0
^ permalink raw reply related [flat|nested] 5+ messages in thread* Re: [PATCH v2 3/3] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm
2026-11-25 19:52 ` [PATCH v2 3/3] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla
@ 2026-11-25 20:01 ` sashiko-bot
0 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-11-25 20:01 UTC (permalink / raw)
To: Srinivas Kandagatla; +Cc: linux-leds, devicetree, robh, conor+dt, lee
Thank you for your contribution! Sashiko AI review found 3 potential
issues to consider:
- [Medium] arm64: dts: qcom: vreg_edp_bl keeps regulator-always-on with
pwm-backlight
- [Low] arm64: dts: qcom: misplaced pmk8850.dtsi fixup in mahua-t14s
board patch
- [Low] arm64: dts: qcom: mahua-t14s: non-alphabetical placement of
backlight node
--
commit 73071c600625bb596d61b96f98ccdc4b23428750
Author: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm
This commit moves the eDP backlight enable GPIO from the panel node into a
dedicated pwm-backlight node wired to the pmk8850 PWM output on the Lenovo
ThinkPad T14s Gen 7.
> diff --git a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
> index 2d6578edcc823..bad49ba5443f3 100644
> --- a/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
> +++ b/arch/arm64/boot/dts/qcom/mahua-lenovo-thinkpad-t14s-gen7-lcd.dts
> @@ -156,6 +156,16 @@ vreg_edp_bl: regulator-edp-bl {
> regulator-always-on;
> };
>
> + backlight: backlight {
> + compatible = "pwm-backlight";
> + pwms = <&pmk8850_pwm 0 4266537>;
> + enable-gpios = <&tlmm 18 GPIO_ACTIVE_HIGH>;
> + power-supply = <&vreg_edp_bl>;
[Severity: Medium]
Should regulator-always-on be removed from vreg_edp_bl now that the
backlight node manages it via power-supply? With regulator-always-on still
set, regulator_disable() in pwm_backlight_power_off() will not turn off the
backlight supply rail when the display is blanked or suspended.
> +
> + pinctrl-0 = <&edp_bl_en>, <&edp_bl_pwm>;
> + pinctrl-names = "default";
> + };
> +
> vreg_misc_3p3: regulator-misc-3p3 {
[Severity: Low]
This isn't a bug, but the other top-level child nodes under the root node
are ordered alphabetically by node name, whereas backlight is inserted in
the middle of the regulator-* nodes rather than before chosen.
[ ... ]
> diff --git a/arch/arm64/boot/dts/qcom/pmk8850.dtsi b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
> index 053ae42ef0fb7..dfa99cbd21d71 100644
> --- a/arch/arm64/boot/dts/qcom/pmk8850.dtsi
> +++ b/arch/arm64/boot/dts/qcom/pmk8850.dtsi
> @@ -69,9 +69,6 @@ reboot_reason: reboot-reason@48 {
>
> pmk8850_pwm: pwm {
> compatible = "qcom,pmk8850-pwm", "qcom,pmk8550-pwm";
> -
> - #address-cells = <1>;
> - #size-cells = <0>;
> #pwm-cells = <2>;
>
> status = "disabled";
[Severity: Low]
Should this removal of #address-cells and #size-cells from pmk8850.dtsi be
squashed into the preceding commit "arm64: dts: qcom: pmk8850: add PWM
node" that introduced pmk8850_pwm, rather than being included in this
board-specific patch?
--
Sashiko AI review · https://sashiko.dev/#/patchset/20261125195226.1563577-1-srinivas.kandagatla@oss.qualcomm.com?part=3
^ permalink raw reply [flat|nested] 5+ messages in thread