From: Sridharan S N Date: Fri, 16 Jun 2023 08:32:37 +0000 (+0530) Subject: arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons X-Git-Url: http://git.maquefel.me/?a=commitdiff_plain;h=0354e2d4d203bcffb61d671265f9f0bc52b244ff;p=linux.git arm64: dts: qcom: ipq5332: enable GPIO based LEDs and Buttons Add support for wlan-2g LED on GPIO 36 and wps buttons on GPIO 35. Signed-off-by: Sridharan S N Reviewed-by: Konrad Dybcio Link: https://lore.kernel.org/r/20230616083238.20690-2-quic_sridsn@quicinc.com Signed-off-by: Bjorn Andersson --- diff --git a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi index f13dea7d67fea..4870cdb764d00 100644 --- a/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi +++ b/arch/arm64/boot/dts/qcom/ipq5332-rdp-common.dtsi @@ -19,6 +19,31 @@ chosen { stdout-path = "serial0"; }; + + gpio-keys { + compatible = "gpio-keys"; + pinctrl-0 = <&gpio_keys_default>; + pinctrl-names = "default"; + + button-wps { + label = "wps"; + linux,code = ; + gpios = <&tlmm 35 GPIO_ACTIVE_LOW>; + debounce-interval = <60>; + }; + }; + + leds { + compatible = "gpio-leds"; + pinctrl-0 = <&gpio_leds_default>; + pinctrl-names = "default"; + + led-0 { + gpios = <&tlmm 36 GPIO_ACTIVE_HIGH>; + linux,default-trigger = "phy0tx"; + default-state = "off"; + }; + }; }; &blsp1_uart0 { @@ -34,3 +59,20 @@ &xo_board { clock-frequency = <24000000>; }; + +/* PINCTRL */ +&tlmm { + gpio_keys_default: gpio-keys-default-state { + pins = "gpio35"; + function = "gpio"; + drive-strength = <8>; + bias-pull-up; + }; + + gpio_leds_default: gpio-leds-default-state { + pins = "gpio36"; + function = "gpio"; + drive-strength = <8>; + bias-pull-down; + }; +};