ARM: dts: dra7-evm: add gpio key support
authorGrygorii Strashko <grygorii.strashko@ti.com>
Thu, 27 Aug 2015 15:20:47 +0000 (18:20 +0300)
committerTony Lindgren <tony@atomide.com>
Mon, 12 Oct 2015 22:00:37 +0000 (15:00 -0700)
dra7-evm has 2 gpio keys wired through TS_LCD_GPIO3, TS_LCD_GPIO4
which in turn connected to PCF8575 GPIO pcf_lcd: gpio@20 expander
pins 2 and 3.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/dra7-evm.dts

index 9b4ce227f3fd2d59b00646cf9f7b6169b1238015..9e2dc8d8807034e92bdeaf1a0a9ba0d439f1d681 100644 (file)
@@ -10,6 +10,7 @@
 #include "dra74x.dtsi"
 #include <dt-bindings/gpio/gpio.h>
 #include <dt-bindings/clk/ti-dra7-atl.h>
+#include <dt-bindings/input/input.h>
 
 / {
        model = "TI DRA742";
                        default-state = "off";
                };
        };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+               autorepeat;
+
+               USER1 {
+                       label = "btnUser1";
+                       linux,code = <BTN_0>;
+                       gpios = <&pcf_lcd 2 GPIO_ACTIVE_LOW>;
+               };
+
+               USER2 {
+                       label = "btnUser2";
+                       linux,code = <BTN_1>;
+                       gpios = <&pcf_lcd 3 GPIO_ACTIVE_LOW>;
+               };
+       };
 };
 
 &dra7_pmx_core {