ARM: dts: alt: Add SW2 as GPIO keys
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Tue, 25 May 2021 09:15:12 +0000 (11:15 +0200)
committerGeert Uytterhoeven <geert+renesas@glider.be>
Thu, 27 May 2021 13:46:21 +0000 (15:46 +0200)
SW2 on Alt is connected as on Lager board. So, use the same GPIO
settings.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20210525091512.29119-1-wsa+renesas@sang-engineering.com
Signed-off-by: Geert Uytterhoeven <geert+renesas@glider.be>
arch/arm/boot/dts/r8a7794-alt.dts

index f9dba5688d3ffd18b623c3be04a7485e4ecc07f3..f330d796a772c394264020514873bf52aaca1682 100644 (file)
@@ -8,6 +8,7 @@
 /dts-v1/;
 #include "r8a7794.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Alt";
                #size-cells = <1>;
        };
 
+       keyboard {
+               compatible = "gpio-keys";
+
+               pinctrl-0 = <&keyboard_pins>;
+               pinctrl-names = "default";
+
+               one {
+                       linux,code = <KEY_1>;
+                       label = "SW2-1";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 9 GPIO_ACTIVE_LOW>;
+               };
+               two {
+                       linux,code = <KEY_2>;
+                       label = "SW2-2";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
+               };
+               three {
+                       linux,code = <KEY_3>;
+                       label = "SW2-3";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
+               };
+               four {
+                       linux,code = <KEY_4>;
+                       label = "SW2-4";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
+               };
+       };
+
        vga-encoder {
                compatible = "adi,adv7123";
 
                groups = "usb1";
                function = "usb1";
        };
+
+       keyboard_pins: keyboard {
+               pins = "GP_3_9", "GP_3_10", "GP_3_11", "GP_3_12";
+               bias-pull-up;
+       };
 };
 
 &cmt0 {