ARM: dts: pandaboard: add gpio user button
authorPeter Robinson <pbrobinson@gmail.com>
Wed, 4 Jul 2018 08:37:38 +0000 (09:37 +0100)
committerTony Lindgren <tony@atomide.com>
Mon, 9 Jul 2018 10:45:15 +0000 (03:45 -0700)
The PandaBoard has a user button connected to GPIO. On the ES this is connected
to GPIO 113, on all the other Panda editons this is GPIO 121.

Signed-off-by: Peter Robinson <pbrobinson@gmail.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
arch/arm/boot/dts/omap4-panda-common.dtsi
arch/arm/boot/dts/omap4-panda-es.dts

index 563b47c5f0c7270d6051111c4ddab8ad6d4df0e5..27895c1604b9bb7837bdb674a3b581c4325c0fdd 100644 (file)
@@ -5,6 +5,7 @@
  * it under the terms of the GNU General Public License version 2 as
  * published by the Free Software Foundation.
  */
+#include <dt-bindings/input/input.h>
 #include "elpida_ecb240abacn.dtsi"
 
 / {
                };
        };
 
+       gpio_keys: gpio_keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <
+                       &button_pins
+               >;
+
+               buttonS2 {
+                       label = "button S2";
+                       gpios = <&gpio4 25 GPIO_ACTIVE_LOW>;    /* gpio_121 */
+                       linux,code = <BTN_0>;
+                       wakeup-source;
+               };
+       };
+
        sound: sound {
                compatible = "ti,abe-twl6040";
                ti,model = "PandaBoard";
                        OMAP4_IOPAD(0x152, PIN_INPUT_PULLUP | MUX_MODE0)        /* sdmmc5_dat3.sdmmc5_dat3 */
                >;
        };
+
+       button_pins: pinmux_button_pins {
+               pinctrl-single,pins = <
+                       OMAP4_IOPAD(0x114, PIN_INPUT_PULLUP | MUX_MODE3)        /* gpio_121 */
+               >;
+       };
 };
 
 &omap4_pmx_wkup {
index 940fe4f7c5f6e148a1e22e7b2daaadc91c627c10..984f642639fab9bb3899be862274268d5ab9d9ae 100644 (file)
                        OMAP4_IOPAD(0x0f6, PIN_OUTPUT | MUX_MODE3)      /* gpio_110 */
                >;
        };
+
+       button_pins: pinmux_button_pins {
+               pinctrl-single,pins = <
+                       OMAP4_IOPAD(0x11b, PIN_INPUT_PULLUP | MUX_MODE3) /* gpio_113 */
+               >;
+       };
 };
 
 &led_wkgpio_pins {
        };
 };
 
+&gpio_keys {
+       buttonS2 {
+               gpios = <&gpio4 17 GPIO_ACTIVE_LOW>; /* gpio_113 */
+       };
+};
+
 &gpio1 {
         ti,no-reset-on-init;
 };