arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons
authorManikanta Mylavarapu <quic_mmanikan@quicinc.com>
Mon, 20 Jan 2025 06:45:08 +0000 (12:15 +0530)
committerBjorn Andersson <andersson@kernel.org>
Sat, 15 Mar 2025 15:42:38 +0000 (10:42 -0500)
Add support for wlan-2g LED on GPIO 42 and wps buttons on GPIO 19.

Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
Reviewed-by: Konrad Dybcio <konrad.dybcio@oss.qualcomm.com>
Link: https://lore.kernel.org/r/20250120064508.2722341-1-quic_mmanikan@quicinc.com
Signed-off-by: Bjorn Andersson <andersson@kernel.org>
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts

index b9752e8d579eb31523403113da22909c1a284380..0fd0ebe0251d1cbcb50ea16307f952274589e6a6 100644 (file)
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include "ipq5424.dtsi"
 
 / {
                serial0 = &uart1;
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-0 = <&gpio_keys_default>;
+               pinctrl-names = "default";
+
+               button-wps {
+                       label = "wps";
+                       linux,code = <KEY_WPS_BUTTON>;
+                       gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
+                       debounce-interval = <60>;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+               pinctrl-0 = <&gpio_leds_default>;
+               pinctrl-names = "default";
+
+               led-0 {
+                       color = <LED_COLOR_ID_GREEN>;
+                       function = LED_FUNCTION_WLAN;
+                       gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
+                       linux,default-trigger = "phy0tx";
+                       default-state = "off";
+               };
+       };
+
        vreg_misc_3p3: regulator-usb-3p3 {
                compatible = "regulator-fixed";
                regulator-min-microvolt = <3300000>;
 };
 
 &tlmm {
+       gpio_keys_default: gpio-keys-default-state {
+               pins = "gpio19";
+               function = "gpio";
+               drive-strength = <8>;
+               bias-pull-up;
+       };
+
+       gpio_leds_default: gpio-leds-default-state {
+               pins = "gpio42";
+               function = "gpio";
+               drive-strength = <8>;
+               bias-pull-down;
+       };
+
        spi0_default_state: spi0-default-state {
                clk-pins {
                        pins = "gpio6";