Devicetree
 help / color / mirror / Atom feed
* [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG
@ 2026-10-15 19:47 Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
                   ` (3 more replies)
  0 siblings, 4 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2026-10-15 19:47 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Bjorn Andersson, Konrad Dybcio
  Cc: Pavel Machek, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	linux-leds, devicetree, linux-arm-msm, linux-kernel,
	Srinivas Kandagatla

Enable brightness control for the Lenovo ThinkPad T14s Gen 7 (Mahua,
X2 Elite) eDP panel.

 - Add qcom,pmk8850-pwm to the LPG binding and driver; PMK8850 reuses
   the PMK8550 two-channel 0xe800/0xe900 layout.
 - Describe the PWM node in pmk8850.dtsi, left disabled.
 - Switch the Mahua T14s LCD overlay to a pwm-backlight.

Based on next-20261012. Tested on Lenovo ThinkPad T14s Gen 7.

Srinivas Kandagatla (4):
  dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible
  leds: rgb: qcom-lpg: add qcom,pmk8850-pwm compatible
  arm64: dts: qcom: pmk8850: add PWM node
  arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm

 .../bindings/leds/leds-qcom-lpg.yaml          |  2 ++
 .../mahua-lenovo-thinkpad-t14s-gen7-lcd.dts   | 26 ++++++++++++++++----
 arch/arm64/boot/dts/qcom/pmk8850.dtsi         | 10 +++++++++
 drivers/leds/rgb/leds-qcom-lpg.c              |  1 +
 4 files changed, 35 insertions(+), 4 deletions(-)


base-commit: f53c44783aacd8920469531e7c45f9f70afd291b
-- 
2.53.0


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

* [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible
  2026-10-15 19:47 [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG Srinivas Kandagatla
@ 2026-10-15 19:47 ` Srinivas Kandagatla
  2026-10-15 19:54   ` sashiko-bot
  2026-10-15 19:47 ` [PATCH 2/4] leds: rgb: " Srinivas Kandagatla
                   ` (2 subsequent siblings)
  3 siblings, 1 reply; 7+ messages in thread
From: Srinivas Kandagatla @ 2026-10-15 19:47 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Bjorn Andersson, Konrad Dybcio
  Cc: Pavel Machek, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	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.

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 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
index 3da0fe532e74..db30dd3dfc9f 100644
--- a/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
+++ b/Documentation/devicetree/bindings/leds/leds-qcom-lpg.yaml
@@ -36,6 +36,7 @@ properties:
           - qcom,pmi8994-lpg
           - qcom,pmi8998-lpg
           - qcom,pmk8550-pwm
+          - qcom,pmk8850-pwm
       - items:
           - enum:
               - qcom,pm6150l-lpg
@@ -161,6 +162,7 @@ allOf:
               - qcom,pmi8994-lpg
               - qcom,pmi8998-lpg
               - qcom,pmk8550-pwm
+              - qcom,pmk8850-pwm
     then:
       properties:
         nvmem: false
-- 
2.53.0


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

* [PATCH 2/4] leds: rgb: qcom-lpg: add qcom,pmk8850-pwm compatible
  2026-10-15 19:47 [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
@ 2026-10-15 19:47 ` Srinivas Kandagatla
  2026-10-15 19:51   ` sashiko-bot
  2026-10-15 19:47 ` [PATCH 3/4] arm64: dts: qcom: pmk8850: add PWM node Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 4/4] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla
  3 siblings, 1 reply; 7+ messages in thread
From: Srinivas Kandagatla @ 2026-10-15 19:47 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Bjorn Andersson, Konrad Dybcio
  Cc: Pavel Machek, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	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 at 0xe800/0xe900, so
reuse pmk8550_pwm_data.

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>
---
 drivers/leds/rgb/leds-qcom-lpg.c | 1 +
 1 file changed, 1 insertion(+)

diff --git a/drivers/leds/rgb/leds-qcom-lpg.c b/drivers/leds/rgb/leds-qcom-lpg.c
index 24ffe079f221..485fa2a7a848 100644
--- a/drivers/leds/rgb/leds-qcom-lpg.c
+++ b/drivers/leds/rgb/leds-qcom-lpg.c
@@ -1837,6 +1837,7 @@ static const struct of_device_id lpg_of_table[] = {
 	{ .compatible = "qcom,pmi8998-lpg", .data = &pmi8998_lpg_data },
 	{ .compatible = "qcom,pmc8180c-lpg", .data = &pm8150l_lpg_data },
 	{ .compatible = "qcom,pmk8550-pwm", .data = &pmk8550_pwm_data },
+	{ .compatible = "qcom,pmk8850-pwm", .data = &pmk8550_pwm_data },
 	{}
 };
 MODULE_DEVICE_TABLE(of, lpg_of_table);
-- 
2.53.0


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

* [PATCH 3/4] arm64: dts: qcom: pmk8850: add PWM node
  2026-10-15 19:47 [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 2/4] leds: rgb: " Srinivas Kandagatla
@ 2026-10-15 19:47 ` Srinivas Kandagatla
  2026-10-15 19:47 ` [PATCH 4/4] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla
  3 siblings, 0 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2026-10-15 19:47 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Bjorn Andersson, Konrad Dybcio
  Cc: Pavel Machek, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	linux-leds, devicetree, linux-arm-msm, linux-kernel,
	Srinivas Kandagatla

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.

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..79c87db8e95d 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";
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+			#pwm-cells = <2>;
+
+			status = "disabled";
+		};
 	};
 };
-- 
2.53.0


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

* [PATCH 4/4] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm
  2026-10-15 19:47 [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG Srinivas Kandagatla
                   ` (2 preceding siblings ...)
  2026-10-15 19:47 ` [PATCH 3/4] arm64: dts: qcom: pmk8850: add PWM node Srinivas Kandagatla
@ 2026-10-15 19:47 ` Srinivas Kandagatla
  3 siblings, 0 replies; 7+ messages in thread
From: Srinivas Kandagatla @ 2026-10-15 19:47 UTC (permalink / raw)
  To: Lee Jones, Rob Herring, Bjorn Andersson, Konrad Dybcio
  Cc: Pavel Machek, Krzysztof Kozlowski, Conor Dooley, Abel Vesa,
	linux-leds, devicetree, linux-arm-msm, linux-kernel,
	Srinivas Kandagatla

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).

Signed-off-by: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>
---
 .../mahua-lenovo-thinkpad-t14s-gen7-lcd.dts   | 26 ++++++++++++++++---
 1 file changed, 22 insertions(+), 4 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 26d6d8285e04..be094f9a6ef2 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
@@ -39,6 +39,16 @@ aliases {
 		serial1 = &uart14;
 	};
 
+	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";
+	};
+
 	chosen {
 		stdout-path = "serial0:115200n8";
 	};
@@ -773,11 +783,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 {
@@ -902,6 +909,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;
 };
-- 
2.53.0


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

* Re: [PATCH 2/4] leds: rgb: qcom-lpg: add qcom,pmk8850-pwm compatible
  2026-10-15 19:47 ` [PATCH 2/4] leds: rgb: " Srinivas Kandagatla
@ 2026-10-15 19:51   ` sashiko-bot
  0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-15 19:51 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-leds, devicetree, robh, conor+dt, lee

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] leds: commit message description is not capitalized
--

commit fdffeb52b0445eebc400d36aacc9eefa0dff0de2
Author: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

leds: rgb: qcom-lpg: add qcom,pmk8850-pwm compatible

This commit adds support for the PMK8850 sleep-clock PMIC on the Snapdragon
X2 Elite by reusing the PMK8550 PWM data. This enables the eDP backlight on
devices such as the Lenovo ThinkPad T14s Gen 7.

> leds: rgb: qcom-lpg: add qcom,pmk8850-pwm compatible

[Severity: Low]
This isn't a bug, but the LED subsystem guidelines request that the commit
description following the subsystem prefix is capitalized. Could the word
add be changed to Add to follow this naming convention?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015194732.64428-1-srinivas.kandagatla@oss.qualcomm.com?part=2

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

* Re: [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible
  2026-10-15 19:47 ` [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
@ 2026-10-15 19:54   ` sashiko-bot
  0 siblings, 0 replies; 7+ messages in thread
From: sashiko-bot @ 2026-10-15 19:54 UTC (permalink / raw)
  To: Srinivas Kandagatla; +Cc: linux-leds, devicetree, robh, conor+dt, lee

Thank you for your contribution! Sashiko AI review found 1 potential issue(s) to consider:
- [Low] leds: commit message description is not capitalized
--

commit 196975238d12d86173118b995f0ffaed53199278
Author: Srinivas Kandagatla <srinivas.kandagatla@oss.qualcomm.com>

dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible

This commit adds the qcom,pmk8850-pwm compatible string to the qcom-lpg
bindings, as the PMK8850 sleep-clock PMIC on Snapdragon X2 Elite exposes
the same LPG/PWM block as the PMK8550.

> dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible

[Severity: Low]
This isn't a bug, but the commit message description is not capitalized.
Should this start with "Add" instead of "add" to strictly follow the LED
subsystem capitalization conventions?

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261015194732.64428-1-srinivas.kandagatla@oss.qualcomm.com?part=1

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

end of thread, other threads:[~2026-10-15 19:54 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-10-15 19:47 [PATCH 0/4] Mahua T14s Gen 7 eDP backlight via PMK8850 LPG Srinivas Kandagatla
2026-10-15 19:47 ` [PATCH 1/4] dt-bindings: leds: qcom-lpg: add qcom,pmk8850-pwm compatible Srinivas Kandagatla
2026-10-15 19:54   ` sashiko-bot
2026-10-15 19:47 ` [PATCH 2/4] leds: rgb: " Srinivas Kandagatla
2026-10-15 19:51   ` sashiko-bot
2026-10-15 19:47 ` [PATCH 3/4] arm64: dts: qcom: pmk8850: add PWM node Srinivas Kandagatla
2026-10-15 19:47 ` [PATCH 4/4] arm64: dts: qcom: mahua-t14s: wire backlight through pmk8850 pwm Srinivas Kandagatla

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