[PATCH v3 4/5] ARM: dts: qcom: pm8941: Add nodes for QCOM SPMI Flash LEDs

Nícolas F. R. A. Prado nfraprado at collabora.com
Tue Aug 3 09:26:40 PDT 2021


Add nodes for Qualcomm's SPMI Flash LEDs present in PM8941. There are
two white LEDs which can be used as flash or torch.

Signed-off-by: Nícolas F. R. A. Prado <nfraprado at collabora.com>
---

Changes in v3:
- Disabled node
- Removed LED configuration (moved to hammerhead dts in patch 5)

Changes in v2:
- Moved from hammerhead dts to pm8941 dtsi, as it was this way downstream
- Now using values from leds-qcom-spmi-flash.h

 arch/arm/boot/dts/qcom-pm8941.dtsi | 25 +++++++++++++++++++++++++
 1 file changed, 25 insertions(+)

diff --git a/arch/arm/boot/dts/qcom-pm8941.dtsi b/arch/arm/boot/dts/qcom-pm8941.dtsi
index c1f2012d1c8b..e9e4369a488b 100644
--- a/arch/arm/boot/dts/qcom-pm8941.dtsi
+++ b/arch/arm/boot/dts/qcom-pm8941.dtsi
@@ -2,6 +2,7 @@
 #include <dt-bindings/iio/qcom,spmi-vadc.h>
 #include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/spmi/spmi.h>
+#include <dt-bindings/leds/common.h>
 
 &spmi_bus {
 
@@ -189,5 +190,29 @@ pm8941_5vs2: 5vs2 {
 				regulator-initial-mode = <1>;
 			};
 		};
+
+		spmi-flash-leds at d300 {
+			status = "disabled";
+
+			compatible = "qcom,spmi-flash-leds";
+			reg = <0xd300 0x100>;
+			flash-boost-supply = <&pm8941_5vs1>;
+			torch-boost-supply = <&pm8941_5v>;
+
+			#address-cells = <1>;
+			#size-cells = <0>;
+
+			pm8941_flash0: led at 0 {
+				reg = <0>;
+				function = LED_FUNCTION_FLASH;
+				color = <LED_COLOR_ID_WHITE>;
+			};
+
+			pm8941_flash1: led at 1 {
+				reg = <1>;
+				function = LED_FUNCTION_FLASH;
+				color = <LED_COLOR_ID_WHITE>;
+			};
+		};
 	};
 };
-- 
2.32.0




More information about the linux-arm-kernel mailing list