aboutsummaryrefslogtreecommitdiffstats
path: root/arch
diff options
context:
space:
mode:
authorKevin Hilman <khilman@linaro.org>2013-05-31 12:27:05 -0400
committerBenoit Cousson <benoit.cousson@linaro.org>2013-06-18 19:53:45 -0400
commitd641c3d5870db37709f9536054122255f007058c (patch)
treefe9db73323c0353bb227140211b027b73732a226 /arch
parentb859c1ef92fca08a3079d9ff81e0e0bf7980c855 (diff)
ARM: dts: OMAP3: beagle: enable user button via gpio_keys, enable wakeup
Using the gpio-keys bindings, configure the user button on Beagle boards. Since the user button is enabled as a wakeup source, also ensure the GPIO pin is mux'd correctly and has IO ring wakeups enabled, so it can also wakeup from off mode. Special thanks to Florian Vaussard for suggesting the preprocessor feature. Cc: Florian Vaussard <florian.vaussard@epfl.ch> Signed-off-by: Kevin Hilman <khilman@linaro.org> Signed-off-by: Benoit Cousson <benoit.cousson@linaro.org>
Diffstat (limited to 'arch')
-rw-r--r--arch/arm/boot/dts/omap3-beagle-xm.dts25
-rw-r--r--arch/arm/boot/dts/omap3-beagle.dts25
2 files changed, 50 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/omap3-beagle-xm.dts b/arch/arm/boot/dts/omap3-beagle-xm.dts
index 7fb806dafbc7..ad17b6bdc87a 100644
--- a/arch/arm/boot/dts/omap3-beagle-xm.dts
+++ b/arch/arm/boot/dts/omap3-beagle-xm.dts
@@ -57,6 +57,26 @@
57 ti,mcbsp = <&mcbsp2>; 57 ti,mcbsp = <&mcbsp2>;
58 ti,codec = <&twl_audio>; 58 ti,codec = <&twl_audio>;
59 }; 59 };
60
61 gpio_keys {
62 compatible = "gpio-keys";
63
64 user {
65 label = "user";
66 gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
67 linux,code = <0x114>;
68 gpio-key,wakeup;
69 };
70
71 };
72};
73
74&omap3_pmx_wkup {
75 gpio1_pins: pinmux_gpio1_pins {
76 pinctrl-single,pins = <
77 0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
78 >;
79 };
60}; 80};
61 81
62&i2c1 { 82&i2c1 {
@@ -140,3 +160,8 @@
140 pinctrl-names = "default"; 160 pinctrl-names = "default";
141 pinctrl-0 = <&uart3_pins>; 161 pinctrl-0 = <&uart3_pins>;
142}; 162};
163
164&gpio1 {
165 pinctrl-names = "default";
166 pinctrl-0 = <&gpio1_pins>;
167};
diff --git a/arch/arm/boot/dts/omap3-beagle.dts b/arch/arm/boot/dts/omap3-beagle.dts
index 0b6dbfa62c95..eb7e02a01a0b 100644
--- a/arch/arm/boot/dts/omap3-beagle.dts
+++ b/arch/arm/boot/dts/omap3-beagle.dts
@@ -71,6 +71,26 @@
71 reset-supply = <&hsusb2_reset>; 71 reset-supply = <&hsusb2_reset>;
72 vcc-supply = <&hsusb2_power>; 72 vcc-supply = <&hsusb2_power>;
73 }; 73 };
74
75 gpio_keys {
76 compatible = "gpio-keys";
77
78 user {
79 label = "user";
80 gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
81 linux,code = <0x114>;
82 gpio-key,wakeup;
83 };
84
85 };
86};
87
88&omap3_pmx_wkup {
89 gpio1_pins: pinmux_gpio1_pins {
90 pinctrl-single,pins = <
91 0x14 (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
92 >;
93 };
74}; 94};
75 95
76&omap3_pmx_core { 96&omap3_pmx_core {
@@ -154,3 +174,8 @@
154 pinctrl-names = "default"; 174 pinctrl-names = "default";
155 pinctrl-0 = <&uart3_pins>; 175 pinctrl-0 = <&uart3_pins>;
156}; 176};
177
178&gpio1 {
179 pinctrl-names = "default";
180 pinctrl-0 = <&gpio1_pins>;
181};