]> git.ipfire.org Git - thirdparty/kernel/linux.git/commitdiff
arm64: dts: amlogic: meson-s4-s905y4-khadas-vim1s: add POWER key support
authorNick Xie <nick@khadas.com>
Sat, 28 Feb 2026 06:37:50 +0000 (14:37 +0800)
committerNeil Armstrong <neil.armstrong@linaro.org>
Tue, 21 Apr 2026 13:55:20 +0000 (15:55 +0200)
Add the gpio-keys-polled node to support the Power button found on the
Khadas VIM1S board. The button is connected to the GPIOD_8 pin.

Use polled mode instead of gpio-keys because the GPIO interrupt
controller support for Meson S4 SoC is not yet available upstream.

Signed-off-by: Nick Xie <nick@khadas.com>
Reviewed-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Link: https://patch.msgid.link/20260228063750.701887-5-nick@khadas.com
Signed-off-by: Neil Armstrong <neil.armstrong@linaro.org>
arch/arm64/boot/dts/amlogic/meson-s4-s905y4-khadas-vim1s.dts

index 0bd738c1e786221b3dd95995776023e878b36dea..664d64a267f2d2712fa1a43ad0b58bf9afe8a7c3 100644 (file)
@@ -6,6 +6,7 @@
 /dts-v1/;
 
 #include "meson-s4.dtsi"
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 
 / {
                reset-gpios = <&gpio GPIOB_9 GPIO_ACTIVE_LOW>;
        };
 
+       gpio-keys-polled {
+               compatible = "gpio-keys-polled";
+               poll-interval = <100>;
+
+               power-button {
+                       label = "power";
+                       linux,code = <KEY_POWER>;
+                       gpios = <&gpio GPIOD_8 GPIO_ACTIVE_LOW>;
+               };
+       };
+
        pwm-leds {
                compatible = "pwm-leds";