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

From: Nícolas F. R. A. Prado
Date: Tue Aug 03 2021 - 12:27:30 EST


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@xxxxxxxxxxxxx>
---

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@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@0 {
+ reg = <0>;
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ };
+
+ pm8941_flash1: led@1 {
+ reg = <1>;
+ function = LED_FUNCTION_FLASH;
+ color = <LED_COLOR_ID_WHITE>;
+ };
+ };
};
};
--
2.32.0