mvebu: puzzle-m902: add GPIO reset button
authorDaniel Golle <daniel@makrotopia.org>
Tue, 21 Dec 2021 21:49:25 +0000 (21:49 +0000)
committerDaniel Golle <daniel@makrotopia.org>
Sat, 1 Jan 2022 22:29:43 +0000 (22:29 +0000)
Add reset button to device tree so it has the function expected from
usual OpenWrt devices.

Signed-off-by: Daniel Golle <daniel@makrotopia.org>
(cherry picked from commit ddad936fc60ced1783232af3eddee75347f0d08f)

target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts

index 8d2d53d03cbf46914770e0a4acbec88d09e72a5f..bfa7874a679721be0512b11eab64101856aa4f18 100644 (file)
@@ -8,6 +8,7 @@
 #include "cn9130.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "iEi Puzzle-M902";
                reg = <0x0 0x0 0x0 0x80000000>;
        };
 
+       gpio_keys {
+               compatible = "gpio-keys";
+
+               reset {
+                       label = "Reset";
+                       linux,code = <KEY_RESTART>;
+                       gpios = <&cp0_gpio2 4 GPIO_ACTIVE_LOW>;
+               };
+       };
+
        cp2_reg_usb3_vbus0: cp2_usb3_vbus@0 {
                compatible = "regulator-fixed";
                regulator-name = "cp2-xhci0-vbus";