From: Jonas Karlman Date: Tue, 4 Mar 2025 20:16:35 +0000 (+0000) Subject: arm64: dts: rockchip: Add user button to Radxa E20C X-Git-Tag: v6.15-rc1~159^2~23^2~4 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=ad8afc8813567994164f2720189c819da8c22b99;p=thirdparty%2Flinux.git arm64: dts: rockchip: Add user button to Radxa E20C Radxa E20C has two buttons, one SARADC maskrom button and one GPIO user button. Add support for the user button using a gpio-keys node. Signed-off-by: Jonas Karlman Link: https://lore.kernel.org/r/20250304201642.831218-3-jonas@kwiboo.se Signed-off-by: Heiko Stuebner --- diff --git a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts index 7f0237206405a..b378774d2a4e4 100644 --- a/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts +++ b/arch/arm64/boot/dts/rockchip/rk3528-radxa-e20c.dts @@ -7,6 +7,7 @@ /dts-v1/; +#include #include #include "rk3528.dtsi" @@ -18,6 +19,19 @@ stdout-path = "serial0:1500000n8"; }; + gpio-keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&user_key>; + + button-user { + gpios = <&gpio0 RK_PA0 GPIO_ACTIVE_LOW>; + label = "USER"; + linux,code = ; + wakeup-source; + }; + }; + leds { compatible = "gpio-leds"; pinctrl-names = "default"; @@ -50,6 +64,12 @@ }; &pinctrl { + gpio-keys { + user_key: user-key { + rockchip,pins = <0 RK_PA0 RK_FUNC_GPIO &pcfg_pull_up>; + }; + }; + leds { lan_led_g: lan-led-g { rockchip,pins = <4 RK_PB5 RK_FUNC_GPIO &pcfg_pull_none>;