arm64: dts: qcom: qrb4210-rb2: Add GPIO LEDs
authorKonrad Dybcio <konrad.dybcio@linaro.org>
Mon, 15 May 2023 13:04:14 +0000 (15:04 +0200)
committerBjorn Andersson <andersson@kernel.org>
Tue, 23 May 2023 13:26:11 +0000 (06:26 -0700)
Add the three LEDs (blue/yellow/green) connected to TLMM GPIOs.

Signed-off-by: Konrad Dybcio <konrad.dybcio@linaro.org>
Reviewed-and-Tested-by: Bhupesh Sharma <bhupesh.sharma@linaro.org>
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
Link: https://lore.kernel.org/r/20230515-topic-rb2-bits-v1-3-a52d154a639d@linaro.org
arch/arm64/boot/dts/qcom/qrb4210-rb2.dts

index fc0e05c..42f1693 100644 (file)
@@ -5,6 +5,7 @@
 
 /dts-v1/;
 
+#include <dt-bindings/leds/common.h>
 #include "sm4250.dtsi"
 
 / {
                };
        };
 
+       leds {
+               compatible = "gpio-leds";
+
+               led-bt {
+                       label = "blue:bt";
+                       function = LED_FUNCTION_BLUETOOTH;
+                       color = <LED_COLOR_ID_BLUE>;
+                       gpios = <&tlmm 45 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "bluetooth-power";
+                       default-state = "off";
+               };
+
+               led-user0 {
+                       label = "green:user0";
+                       function = LED_FUNCTION_INDICATOR;
+                       color = <LED_COLOR_ID_GREEN>;
+                       gpios = <&tlmm 52 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "none";
+                       default-state = "off";
+                       panic-indicator;
+               };
+
+               led-wlan {
+                       label = "yellow:wlan";
+                       function = LED_FUNCTION_WLAN;
+                       color = <LED_COLOR_ID_YELLOW>;
+                       gpios = <&tlmm 47 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "phy0tx";
+                       default-state = "off";
+               };
+       };
+
        vreg_hdmi_out_1p2: regulator-hdmi-out-1p2 {
                compatible = "regulator-fixed";
                regulator-name = "VREG_HDMI_OUT_1P2";
 };
 
 &tlmm {
-       gpio-reserved-ranges = <43 2>, <47 1>,
-                              <49 1>, <52 1>, <54 1>,
+       gpio-reserved-ranges = <43 2>, <49 1>, <54 1>,
                               <56 3>, <61 2>, <64 1>,
                               <68 1>, <72 8>, <96 1>;