ARM: dts: rza2mevb: Add input switch
authorChris Brandt <chris.brandt@renesas.com>
Tue, 4 Jun 2019 20:09:14 +0000 (15:09 -0500)
committerSimon Horman <horms+renesas@verge.net.au>
Fri, 21 Jun 2019 07:45:35 +0000 (09:45 +0200)
Add support for input switch SW3 on the Renesas RZ/A2M EVB
development board.

Note that this uses the IRQ interrupt, as the RZ/A2 GPIO controller
does not include interrupt support

Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r7s9210-rza2mevb.dts

index 49c40065741bef3a2eebbc6fae901f51114fd3e4..d062d02865e7dfbb34a7ad6ebf76ee1ffd3b25e5 100644 (file)
@@ -9,6 +9,7 @@
 /dts-v1/;
 #include "r7s9210.dtsi"
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/pinctrl/r7s9210-pinctrl.h>
 
 / {
                stdout-path = "serial0:115200n8";
        };
 
+       keyboard {
+               compatible = "gpio-keys";
+
+               pinctrl-names = "default";
+               pinctrl-0 = <&keyboard_pins>;
+
+               key-3 {
+                       interrupt-parent = <&irqc>;
+                       interrupts = <0 IRQ_TYPE_EDGE_BOTH>;
+                       linux,code = <KEY_3>;
+                       label = "SW3";
+                       wakeup-source;
+               };
+       };
+
        lbsc {
                #address-cells = <1>;
                #size-cells = <1>;
                         <RZA2_PINMUX(PORTL, 1, 5)>; /* IRQ5 */
        };
 
+       keyboard_pins: keyboard {
+               pinmux = <RZA2_PINMUX(PORTJ, 1, 6)>;    /* IRQ0 */
+       };
+
        /* Serial Console */
        scif4_pins: serial4 {
                pinmux = <RZA2_PINMUX(PORT9, 0, 4)>,    /* TxD4 */