Linux LED subsystem development
 help / color / mirror / Atom feed
* [PATCH 0/3] PMI632 flash/torch support
@ 2026-12-02 17:00 Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI632 Konrad Dybcio
                   ` (3 more replies)
  0 siblings, 4 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-12-02 17:00 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Griffin Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Fenglin Wu, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa
  Cc: linux-arm-msm, linux-leds, devicetree, Konrad Dybcio

Just some boring plumbing, tested on a SM6115P Lenovo Tab P11.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
Konrad Dybcio (3):
      dt-bindings: leds: qcom,spmi-flash-led: add PMI632
      leds: flash: qcom: add PMI632 flash subtype
      arm64: dts: qcom: pmi632: add flash LED controller

 Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 +
 arch/arm64/boot/dts/qcom/pmi632.dtsi                            | 7 +++++++
 drivers/leds/flash/leds-qcom-flash.c                            | 8 ++++++++
 3 files changed, 16 insertions(+)
---
base-commit: d138596e9f822033490b2e577ec2ea64f2aa246c
change-id: 20261202-topic-pmi632_flash-30f63f331fdb

Best regards,
--  
Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>


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

* [PATCH 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI632
  2026-12-02 17:00 [PATCH 0/3] PMI632 flash/torch support Konrad Dybcio
@ 2026-12-02 17:00 ` Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 2/3] leds: flash: qcom: add PMI632 flash subtype Konrad Dybcio
                   ` (2 subsequent siblings)
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-12-02 17:00 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Griffin Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Fenglin Wu, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa
  Cc: linux-arm-msm, linux-leds, devicetree, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

The PMI632 flash block is a two-channel variant of the PMI8998 layout.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
NOTE: there seems to be some connection to the charger in downstream,
seemingly throttling both the charger and the flash under high load.
Implementing this may impact bindings in the future, but doesn't seem
necessary for the immediate functioning of the hw.
---
 Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
index 3bfa24ff58cd..fe72588e0d24 100644
--- a/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
+++ b/Documentation/devicetree/bindings/leds/qcom,spmi-flash-led.yaml
@@ -30,6 +30,7 @@ properties:
           - qcom,pm8350c-flash-led
           - qcom,pm8550-flash-led
           - qcom,pmh0101-flash-led
+          - qcom,pmi632-flash-led
           - qcom,pmi8998-flash-led
       - const: qcom,spmi-flash-led
 

-- 
2.56.1


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

* [PATCH 2/3] leds: flash: qcom: add PMI632 flash subtype
  2026-12-02 17:00 [PATCH 0/3] PMI632 flash/torch support Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI632 Konrad Dybcio
@ 2026-12-02 17:00 ` Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 3/3] arm64: dts: qcom: pmi632: add flash LED controller Konrad Dybcio
  2026-12-02 17:03 ` [PATCH 0/3] PMI632 flash/torch support sashiko-bot
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-12-02 17:00 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Griffin Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Fenglin Wu, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa
  Cc: linux-arm-msm, linux-leds, devicetree, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

PMI632 features a two-channel flash controller.
Recognize and accept it.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 drivers/leds/flash/leds-qcom-flash.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/drivers/leds/flash/leds-qcom-flash.c b/drivers/leds/flash/leds-qcom-flash.c
index 847a141271dd..34e1705968f9 100644
--- a/drivers/leds/flash/leds-qcom-flash.c
+++ b/drivers/leds/flash/leds-qcom-flash.c
@@ -23,6 +23,7 @@
 #define FLASH_SUBTYPE_REG		0x05
 #define FLASH_SUBTYPE_3CH_PM8150_VAL	0x04
 #define FLASH_SUBTYPE_3CH_PMI8998_VAL	0x03
+#define FLASH_SUBTYPE_2CH_PMI632_VAL	0x05
 #define FLASH_SUBTYPE_4CH_VAL		0x07
 
 #define FLASH_STS_3CH_OTST1		BIT(0)
@@ -892,6 +893,13 @@ static int qcom_flash_led_probe(struct platform_device *pdev)
 				    sizeof(mvflash_3ch_pmi8998_regs), GFP_KERNEL);
 		if (!regs)
 			return -ENOMEM;
+	} else if (val == FLASH_SUBTYPE_2CH_PMI632_VAL) {
+		flash_data->hw_type = QCOM_MVFLASH_3CH;
+		flash_data->max_channels = 2;
+		regs = devm_kmemdup(dev, mvflash_3ch_pmi8998_regs,
+				    sizeof(mvflash_3ch_pmi8998_regs), GFP_KERNEL);
+		if (!regs)
+			return -ENOMEM;
 	} else if (val == FLASH_SUBTYPE_4CH_VAL) {
 		flash_data->hw_type = QCOM_MVFLASH_4CH;
 		flash_data->max_channels = 4;

-- 
2.56.1


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

* [PATCH 3/3] arm64: dts: qcom: pmi632: add flash LED controller
  2026-12-02 17:00 [PATCH 0/3] PMI632 flash/torch support Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI632 Konrad Dybcio
  2026-12-02 17:00 ` [PATCH 2/3] leds: flash: qcom: add PMI632 flash subtype Konrad Dybcio
@ 2026-12-02 17:00 ` Konrad Dybcio
  2026-12-02 17:03 ` [PATCH 0/3] PMI632 flash/torch support sashiko-bot
  3 siblings, 0 replies; 5+ messages in thread
From: Konrad Dybcio @ 2026-12-02 17:00 UTC (permalink / raw)
  To: Lee Jones, Pavel Machek, Griffin Kroah-Hartman, Rob Herring,
	Krzysztof Kozlowski, Conor Dooley, Fenglin Wu, Bjorn Andersson,
	Konrad Dybcio, Abel Vesa
  Cc: linux-arm-msm, linux-leds, devicetree, Konrad Dybcio

From: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>

Describe the flash LED block at 0xd300 on SID 3.

Signed-off-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
---
 arch/arm64/boot/dts/qcom/pmi632.dtsi | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/pmi632.dtsi b/arch/arm64/boot/dts/qcom/pmi632.dtsi
index b0ed35094a98..cfabde03b052 100644
--- a/arch/arm64/boot/dts/qcom/pmi632.dtsi
+++ b/arch/arm64/boot/dts/qcom/pmi632.dtsi
@@ -204,5 +204,12 @@ pmi632_vib: vibrator@5700 {
 			reg = <0x5700>;
 			status = "disabled";
 		};
+
+		pmi632_flash: led-controller@d300 {
+			compatible = "qcom,pmi632-flash-led", "qcom,spmi-flash-led";
+			reg = <0xd300>;
+
+			status = "disabled";
+		};
 	};
 };

-- 
2.56.1


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

* Re: [PATCH 0/3] PMI632 flash/torch support
  2026-12-02 17:00 [PATCH 0/3] PMI632 flash/torch support Konrad Dybcio
                   ` (2 preceding siblings ...)
  2026-12-02 17:00 ` [PATCH 3/3] arm64: dts: qcom: pmi632: add flash LED controller Konrad Dybcio
@ 2026-12-02 17:03 ` sashiko-bot
  3 siblings, 0 replies; 5+ messages in thread
From: sashiko-bot @ 2026-12-02 17:03 UTC (permalink / raw)
  To: Konrad Dybcio; +Cc: linux-leds, lee

Sashiko has reviewed this 3-patch series and found no issues.

-- 
Sashiko AI review · https://sashiko.dev/#/patchset/20261202-topic-pmi632_flash-v1-0-b4a092729377@oss.qualcomm.com

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

end of thread, other threads:[~2026-12-02 17:03 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-12-02 17:00 [PATCH 0/3] PMI632 flash/torch support Konrad Dybcio
2026-12-02 17:00 ` [PATCH 1/3] dt-bindings: leds: qcom,spmi-flash-led: add PMI632 Konrad Dybcio
2026-12-02 17:00 ` [PATCH 2/3] leds: flash: qcom: add PMI632 flash subtype Konrad Dybcio
2026-12-02 17:00 ` [PATCH 3/3] arm64: dts: qcom: pmi632: add flash LED controller Konrad Dybcio
2026-12-02 17:03 ` [PATCH 0/3] PMI632 flash/torch support sashiko-bot

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