diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-07-15 19:54:07 +0200 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-15 19:54:07 +0200 |
commit | 081a15e3fe926d88d3eb9f3a4161c1121a2a7d0b (patch) | |
tree | dc0a14a0687e95700a6d3b57b3f33a15909764f1 /arch/arm/boot | |
parent | ARM: dts: disable 'always on' for BUCK8 regulator for exynos4412-odroid-common (diff) | |
download | linux-081a15e3fe926d88d3eb9f3a4161c1121a2a7d0b.tar.xz linux-081a15e3fe926d88d3eb9f3a4161c1121a2a7d0b.zip |
ARM: dts: add support for GPIO buttons for exynos4412-odroid
This patch adds support for simple GPIO-based button availabled on
Exynos4 based Odroid boards. All supported boards have POWER button,
which has been defined in exynos4412-odroid-common.dtsi. X/X2 boards
also have additional user-configurable button which has been mapped to
KEY_HOME. All defined keys have been marked as possible wakeup source.
Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
Signed-off-by: Kukjin Kim <kgene.kim@samsung.com>
Diffstat (limited to 'arch/arm/boot')
-rw-r--r-- | arch/arm/boot/dts/exynos4412-odroid-common.dtsi | 24 | ||||
-rw-r--r-- | arch/arm/boot/dts/exynos4412-odroidx.dts | 21 |
2 files changed, 45 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi index ad2cb32a3439..d1b33a8efa9d 100644 --- a/arch/arm/boot/dts/exynos4412-odroid-common.dtsi +++ b/arch/arm/boot/dts/exynos4412-odroid-common.dtsi @@ -7,6 +7,7 @@ * published by the Free Software Foundation. */ +#include <dt-bindings/input/input.h> #include "exynos4412.dtsi" / { @@ -15,6 +16,22 @@ reg = <0x0204F000 0x1000>; }; + gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_power_key>; + + power_key { + interrupt-parent = <&gpx1>; + interrupts = <3 0>; + gpios = <&gpx1 3 1>; + linux,code = <KEY_POWER>; + label = "power key"; + debounce-interval = <10>; + gpio-key,wakeup; + }; + }; + mmc@12550000 { pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; pinctrl-names = "default"; @@ -316,3 +333,10 @@ status = "okay"; }; }; + +&pinctrl_1 { + gpio_power_key: power_key { + samsung,pins = "gpx1-3"; + samsung,pin-pud = <0>; + }; +}; diff --git a/arch/arm/boot/dts/exynos4412-odroidx.dts b/arch/arm/boot/dts/exynos4412-odroidx.dts index 8b453a31410d..cb1cfe7239c4 100644 --- a/arch/arm/boot/dts/exynos4412-odroidx.dts +++ b/arch/arm/boot/dts/exynos4412-odroidx.dts @@ -46,6 +46,20 @@ status = "okay"; }; + gpio_keys { + pinctrl-0 = <&gpio_power_key &gpio_home_key>; + + home_key { + interrupt-parent = <&gpx2>; + interrupts = <2 0>; + gpios = <&gpx2 2 0>; + linux,code = <KEY_HOME>; + label = "home key"; + debounce-interval = <10>; + gpio-key,wakeup; + }; + }; + regulator_p3v3 { compatible = "regulator-fixed"; regulator-name = "p3v3_en"; @@ -62,3 +76,10 @@ status = "okay"; }; }; + +&pinctrl_1 { + gpio_home_key: home_key { + samsung,pins = "gpx2-2"; + samsung,pin-pud = <0>; + }; +}; |