]> git.karo-electronics.de Git - karo-tx-linux.git/commitdiff
ARM: dts: imx6qdl-sabrelite: add gpio-keys
authorTroy Kisky <troy.kisky@boundarydevices.com>
Wed, 18 Dec 2013 21:51:44 +0000 (14:51 -0700)
committerShawn Guo <shawn.guo@linaro.org>
Thu, 19 Dec 2013 02:53:59 +0000 (10:53 +0800)
Add power, menu, home, back, volume up, and volume down
buttons.

Also, apply same changes to imx6qdl-nitrogen6x.

Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
Signed-off-by: Shawn Guo <shawn.guo@linaro.org>
arch/arm/boot/dts/imx6qdl-nitrogen6x.dtsi
arch/arm/boot/dts/imx6qdl-sabrelite.dtsi

index eab77df783ae725e8ee6636284ee21841d2fb156..d7691c06cf5e0402bd2f1c4f35be5553cc86bfdb 100644 (file)
@@ -10,6 +10,8 @@
  * http://www.opensource.org/licenses/gpl-license.html
  * http://www.gnu.org/copyleft/gpl.html
  */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        memory {
                };
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               power {
+                       label = "Power Button";
+                       gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       gpio-key,wakeup;
+               };
+
+               menu {
+                       label = "Menu";
+                       gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_MENU>;
+               };
+
+               home {
+                       label = "Home";
+                       gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_HOME>;
+               };
+
+               back {
+                       label = "Back";
+                       gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_BACK>;
+               };
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&gpio7 13 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+       };
+
        sound {
                compatible = "fsl,imx6q-nitrogen6x-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
                        >;
                };
 
+               pinctrl_gpio_keys: gpio_keysgrp {
+                       fsl,pins = <
+                               /* Power Button */
+                               MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
+                               /* Menu Button */
+                               MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1b0b0
+                               /* Home Button */
+                               MX6QDL_PAD_NANDF_D4__GPIO2_IO04         0x1b0b0
+                               /* Back Button */
+                               MX6QDL_PAD_NANDF_D2__GPIO2_IO02         0x1b0b0
+                               /* Volume Up Button */
+                               MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
+                               /* Volume Down Button */
+                               MX6QDL_PAD_GPIO_19__GPIO4_IO05          0x1b0b0
+                       >;
+               };
+
                pinctrl_i2c1: i2c1grp {
                        fsl,pins = <MX6QDL_I2C1_PINGRP1>;
                };
index dbfc040121389d848d314faeae6fba0bfacfe5fb..80031ee5ddc743ce620887c5a3437a4fe222a829 100644 (file)
@@ -9,6 +9,8 @@
  * http://www.opensource.org/licenses/gpl-license.html
  * http://www.gnu.org/copyleft/gpl.html
  */
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 
 / {
        memory {
                };
        };
 
+       gpio-keys {
+               compatible = "gpio-keys";
+               pinctrl-names = "default";
+               pinctrl-0 = <&pinctrl_gpio_keys>;
+
+               power {
+                       label = "Power Button";
+                       gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_POWER>;
+                       gpio-key,wakeup;
+               };
+
+               menu {
+                       label = "Menu";
+                       gpios = <&gpio2 1 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_MENU>;
+               };
+
+               home {
+                       label = "Home";
+                       gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_HOME>;
+               };
+
+               back {
+                       label = "Back";
+                       gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_BACK>;
+               };
+
+               volume-up {
+                       label = "Volume Up";
+                       gpios = <&gpio7 13 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEUP>;
+               };
+
+               volume-down {
+                       label = "Volume Down";
+                       gpios = <&gpio4 5 GPIO_ACTIVE_LOW>;
+                       linux,code = <KEY_VOLUMEDOWN>;
+               };
+       };
+
        sound {
                compatible = "fsl,imx6q-sabrelite-sgtl5000",
                             "fsl,imx-audio-sgtl5000";
                        >;
                };
 
+               pinctrl_gpio_keys: gpio_keysgrp {
+                       fsl,pins = <
+                               /* Power Button */
+                               MX6QDL_PAD_NANDF_D3__GPIO2_IO03         0x1b0b0
+                               /* Menu Button */
+                               MX6QDL_PAD_NANDF_D1__GPIO2_IO01         0x1b0b0
+                               /* Home Button */
+                               MX6QDL_PAD_NANDF_D4__GPIO2_IO04         0x1b0b0
+                               /* Back Button */
+                               MX6QDL_PAD_NANDF_D2__GPIO2_IO02         0x1b0b0
+                               /* Volume Up Button */
+                               MX6QDL_PAD_GPIO_18__GPIO7_IO13          0x1b0b0
+                               /* Volume Down Button */
+                               MX6QDL_PAD_GPIO_19__GPIO4_IO05          0x1b0b0
+                       >;
+               };
+
                pinctrl_i2c1: i2c1grp {
                        fsl,pins = <MX6QDL_I2C1_PINGRP1>;
                };