]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: dts: qcom: qcs6490-rb3gen2: Configure onboard LEDs
authorKonrad Dybcio <quic_kdybcio@quicinc.com>
Sat, 5 Oct 2024 03:33:43 +0000 (20:33 -0700)
committerBjorn Andersson <andersson@kernel.org>
Thu, 26 Dec 2024 05:20:03 +0000 (23:20 -0600)
RB3 Gen2 has a trio of LEDs connected to the PM8350C's Light Pulse
Generator. Describe them.

Use the "red channel" as a panic indicator by default.

Signed-off-by: Konrad Dybcio <quic_kdybcio@quicinc.com>
[bjorn: Corrected colors]
Signed-off-by: Bjorn Andersson <bjorn.andersson@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20241004-rb3gen2-leds-v1-2-437cdbb4f6c0@oss.qualcomm.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/qcs6490-rb3gen2.dts

index 27695bd5422055123e43b4081964b91bf252f274..7a36c90ad4ec8b52f30b22b1621404857d6ef336 100644 (file)
@@ -9,6 +9,7 @@
 #define PM7250B_SID 8
 #define PM7250B_SID1 9
 
+#include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/qcom,pmic-gpio.h>
 #include <dt-bindings/regulator/qcom,rpmh-regulator.h>
 #include "sc7280.dtsi"
        };
 };
 
+&pm8350c_pwm {
+       nvmem = <&pmk8350_sdam_21>,
+               <&pmk8350_sdam_22>;
+       nvmem-names = "lpg_chan_sdam",
+                     "lut_sdam";
+
+       #address-cells = <1>;
+       #size-cells = <0>;
+
+       status = "okay";
+
+       led@1 {
+               reg = <1>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_INDICATOR;
+               function-enumerator = <3>;
+               linux,default-trigger = "none";
+               default-state = "off";
+               panic-indicator;
+       };
+
+       led@2 {
+               reg = <2>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_INDICATOR;
+               function-enumerator = <2>;
+               linux,default-trigger = "none";
+               default-state = "off";
+       };
+
+       led@3 {
+               reg = <3>;
+               color = <LED_COLOR_ID_GREEN>;
+               function = LED_FUNCTION_INDICATOR;
+               function-enumerator = <1>;
+               linux,default-trigger = "none";
+               default-state = "off";
+       };
+};
+
 &pmk8350_rtc {
        status = "okay";
 };