[PATCH] arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons

Manikanta Mylavarapu posted 1 patch 1 year ago
arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 43 +++++++++++++++++++++
1 file changed, 43 insertions(+)
[PATCH] arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons
Posted by Manikanta Mylavarapu 1 year ago
Add support for wlan-2g LED on GPIO 42 and wps buttons on GPIO 19.

Signed-off-by: Manikanta Mylavarapu <quic_mmanikan@quicinc.com>
---
 arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts | 43 +++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
index b6e4bb3328b3..3c842aafca4f 100644
--- a/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
+++ b/arch/arm64/boot/dts/qcom/ipq5424-rdp466.dts
@@ -7,6 +7,8 @@
 
 /dts-v1/;
 
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
 #include "ipq5424.dtsi"
 
 / {
@@ -17,6 +19,33 @@ aliases {
 		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>;
@@ -95,6 +124,20 @@ &ssphy_0 {
 };
 
 &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";
-- 
2.34.1
Re: [PATCH] arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons
Posted by Bjorn Andersson 10 months, 4 weeks ago
On Mon, 20 Jan 2025 12:15:08 +0530, Manikanta Mylavarapu wrote:
> Add support for wlan-2g LED on GPIO 42 and wps buttons on GPIO 19.
> 
> 

Applied, thanks!

[1/1] arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons
      commit: 4bf9fac3a85b90002de373b2f067864d837bac31

Best regards,
-- 
Bjorn Andersson <andersson@kernel.org>
Re: [PATCH] arm64: dts: qcom: ipq5424: enable GPIO based LEDs and Buttons
Posted by Konrad Dybcio 1 year ago
On 20.01.2025 7:45 AM, Manikanta Mylavarapu wrote:
> 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>

Konrad