ARM: dts: blanche: add support for general purpose switches
authorSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Wed, 17 Aug 2016 19:03:06 +0000 (22:03 +0300)
committerSimon Horman <horms+renesas@verge.net.au>
Mon, 22 Aug 2016 07:17:28 +0000 (09:17 +0200)
Add support  for the  general purpose  software switches  SW2 and tactile
switches SW24/25 as a virtual keyboard (like it was done with the Lager/
Koelsch boards).

Signed-off-by: Sergei Shtylyov <sergei.shtylyov@cogentembedded.com>
Signed-off-by: Simon Horman <horms+renesas@verge.net.au>
arch/arm/boot/dts/r8a7792-blanche.dts

index eeffba8..808a6aa 100644 (file)
@@ -11,6 +11,8 @@
 
 /dts-v1/;
 #include "r8a7792.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "Blanche";
                pinctrl-0 = <&lan89218_pins>;
                pinctrl-names = "default";
        };
+
+       keyboard {
+               compatible = "gpio-keys";
+
+               key-1 {
+                       linux,code = <KEY_1>;
+                       label = "SW2-1";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 10 GPIO_ACTIVE_LOW>;
+               };
+               key-2 {
+                       linux,code = <KEY_2>;
+                       label = "SW2-2";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 11 GPIO_ACTIVE_LOW>;
+               };
+               key-3 {
+                       linux,code = <KEY_3>;
+                       label = "SW2-3";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 12 GPIO_ACTIVE_LOW>;
+               };
+               key-4 {
+                       linux,code = <KEY_4>;
+                       label = "SW2-4";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 15 GPIO_ACTIVE_LOW>;
+               };
+               key-a {
+                       linux,code = <KEY_A>;
+                       label = "SW24";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio3 20 GPIO_ACTIVE_LOW>;
+               };
+               key-b {
+                       linux,code = <KEY_B>;
+                       label = "SW25";
+                       wakeup-source;
+                       debounce-interval = <20>;
+                       gpios = <&gpio11 2 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &extal_clk {