ARM: dts: qcom: msm8974-sony: Enable LPG
authorBjorn Andersson <bjorn.andersson@linaro.org>
Wed, 13 Jul 2022 21:23:09 +0000 (14:23 -0700)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Sun, 17 Jul 2022 02:38:51 +0000 (21:38 -0500)
Both Castor and Honami has RGB LEDs driven by the PM8941 LPG, define
these.

Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Konrad Dybcio <konrad.dybcio@somainline.org>
Link: https://lore.kernel.org/r/20220713212309.130230-3-bjorn.andersson@linaro.org
arch/arm/boot/dts/qcom-msm8974-sony-xperia-rhine.dtsi
arch/arm/boot/dts/qcom-msm8974pro-sony-xperia-shinano-castor.dts

index d42b85bda33ac88ae72d3bdb4c0752915c23ea70..5a70683d9103a03e772ad49c9f1e0e22de1640f7 100644 (file)
@@ -3,6 +3,7 @@
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
        };
 };
 
+&pm8941_lpg {
+       status = "okay";
+
+       qcom,power-source = <1>;
+
+       rgb-led {
+               color = <LED_COLOR_ID_RGB>;
+               function = LED_FUNCTION_STATUS;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               led@5 {
+                       reg = <5>;
+                       color = <LED_COLOR_ID_BLUE>;
+               };
+
+               led@6 {
+                       reg = <6>;
+                       color = <LED_COLOR_ID_GREEN>;
+               };
+
+               led@7 {
+                       reg = <7>;
+                       color = <LED_COLOR_ID_RED>;
+               };
+       };
+};
+
 &pm8941_wled {
        status = "okay";
 
index 9fc696a7399acc5ed4e55c3df39b47fed95a639e..3f45f5c5d37b589685bf9861a921a6559bd9f154 100644 (file)
@@ -3,6 +3,7 @@
 #include "qcom-pm8841.dtsi"
 #include "qcom-pm8941.dtsi"
 #include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 
 / {
 
 };
 
+&pm8941_lpg {
+       status = "okay";
+
+       qcom,power-source = <1>;
+
+       rgb-led {
+               color = <LED_COLOR_ID_RGB>;
+               function = LED_FUNCTION_STATUS;
+
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               led@5 {
+                       reg = <5>;
+                       color = <LED_COLOR_ID_BLUE>;
+               };
+
+               led@6 {
+                       reg = <6>;
+                       color = <LED_COLOR_ID_GREEN>;
+               };
+
+               led@7 {
+                       reg = <7>;
+                       color = <LED_COLOR_ID_RED>;
+               };
+       };
+};
+
 &rpm_requests {
        pm8941-regulators {
                compatible = "qcom,rpm-pm8941-regulators";