diff options
author | Marek Szyprowski <m.szyprowski@samsung.com> | 2014-07-15 13:54:07 -0400 |
---|---|---|
committer | Kukjin Kim <kgene.kim@samsung.com> | 2014-07-15 13:54:07 -0400 |
commit | 081a15e3fe926d88d3eb9f3a4161c1121a2a7d0b (patch) | |
tree | dc0a14a0687e95700a6d3b57b3f33a15909764f1 /arch/arm/boot | |
parent | 13681526bb0451f526e8b1872e9ea3842d579d98 (diff) |
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 @@ | |||
7 | * published by the Free Software Foundation. | 7 | * published by the Free Software Foundation. |
8 | */ | 8 | */ |
9 | 9 | ||
10 | #include <dt-bindings/input/input.h> | ||
10 | #include "exynos4412.dtsi" | 11 | #include "exynos4412.dtsi" |
11 | 12 | ||
12 | / { | 13 | / { |
@@ -15,6 +16,22 @@ | |||
15 | reg = <0x0204F000 0x1000>; | 16 | reg = <0x0204F000 0x1000>; |
16 | }; | 17 | }; |
17 | 18 | ||
19 | gpio_keys { | ||
20 | compatible = "gpio-keys"; | ||
21 | pinctrl-names = "default"; | ||
22 | pinctrl-0 = <&gpio_power_key>; | ||
23 | |||
24 | power_key { | ||
25 | interrupt-parent = <&gpx1>; | ||
26 | interrupts = <3 0>; | ||
27 | gpios = <&gpx1 3 1>; | ||
28 | linux,code = <KEY_POWER>; | ||
29 | label = "power key"; | ||
30 | debounce-interval = <10>; | ||
31 | gpio-key,wakeup; | ||
32 | }; | ||
33 | }; | ||
34 | |||
18 | mmc@12550000 { | 35 | mmc@12550000 { |
19 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; | 36 | pinctrl-0 = <&sd4_clk &sd4_cmd &sd4_bus4 &sd4_bus8>; |
20 | pinctrl-names = "default"; | 37 | pinctrl-names = "default"; |
@@ -316,3 +333,10 @@ | |||
316 | status = "okay"; | 333 | status = "okay"; |
317 | }; | 334 | }; |
318 | }; | 335 | }; |
336 | |||
337 | &pinctrl_1 { | ||
338 | gpio_power_key: power_key { | ||
339 | samsung,pins = "gpx1-3"; | ||
340 | samsung,pin-pud = <0>; | ||
341 | }; | ||
342 | }; | ||
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 @@ | |||
46 | status = "okay"; | 46 | status = "okay"; |
47 | }; | 47 | }; |
48 | 48 | ||
49 | gpio_keys { | ||
50 | pinctrl-0 = <&gpio_power_key &gpio_home_key>; | ||
51 | |||
52 | home_key { | ||
53 | interrupt-parent = <&gpx2>; | ||
54 | interrupts = <2 0>; | ||
55 | gpios = <&gpx2 2 0>; | ||
56 | linux,code = <KEY_HOME>; | ||
57 | label = "home key"; | ||
58 | debounce-interval = <10>; | ||
59 | gpio-key,wakeup; | ||
60 | }; | ||
61 | }; | ||
62 | |||
49 | regulator_p3v3 { | 63 | regulator_p3v3 { |
50 | compatible = "regulator-fixed"; | 64 | compatible = "regulator-fixed"; |
51 | regulator-name = "p3v3_en"; | 65 | regulator-name = "p3v3_en"; |
@@ -62,3 +76,10 @@ | |||
62 | status = "okay"; | 76 | status = "okay"; |
63 | }; | 77 | }; |
64 | }; | 78 | }; |
79 | |||
80 | &pinctrl_1 { | ||
81 | gpio_home_key: home_key { | ||
82 | samsung,pins = "gpx2-2"; | ||
83 | samsung,pin-pud = <0>; | ||
84 | }; | ||
85 | }; | ||