Commit d641c3d5 authored by Kevin Hilman's avatar Kevin Hilman Committed by Benoit Cousson

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: default avatarKevin Hilman <khilman@linaro.org>
Signed-off-by: default avatarBenoit Cousson <benoit.cousson@linaro.org>
parent b859c1ef
...@@ -57,6 +57,26 @@ sound { ...@@ -57,6 +57,26 @@ sound {
ti,mcbsp = <&mcbsp2>; ti,mcbsp = <&mcbsp2>;
ti,codec = <&twl_audio>; ti,codec = <&twl_audio>;
}; };
gpio_keys {
compatible = "gpio-keys";
user {
label = "user";
gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
linux,code = <0x114>;
gpio-key,wakeup;
};
};
};
&omap3_pmx_wkup {
gpio1_pins: pinmux_gpio1_pins {
pinctrl-single,pins = <
0x0e (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot2.gpio_4 */
>;
};
}; };
&i2c1 { &i2c1 {
...@@ -140,3 +160,8 @@ &uart3 { ...@@ -140,3 +160,8 @@ &uart3 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>; pinctrl-0 = <&uart3_pins>;
}; };
&gpio1 {
pinctrl-names = "default";
pinctrl-0 = <&gpio1_pins>;
};
...@@ -71,6 +71,26 @@ hsusb2_phy: hsusb2_phy { ...@@ -71,6 +71,26 @@ hsusb2_phy: hsusb2_phy {
reset-supply = <&hsusb2_reset>; reset-supply = <&hsusb2_reset>;
vcc-supply = <&hsusb2_power>; vcc-supply = <&hsusb2_power>;
}; };
gpio_keys {
compatible = "gpio-keys";
user {
label = "user";
gpios = <&gpio1 7 GPIO_ACTIVE_HIGH>;
linux,code = <0x114>;
gpio-key,wakeup;
};
};
};
&omap3_pmx_wkup {
gpio1_pins: pinmux_gpio1_pins {
pinctrl-single,pins = <
0x14 (PIN_INPUT | PIN_OFF_WAKEUPENABLE | MUX_MODE4) /* sys_boot5.gpio_7 */
>;
};
}; };
&omap3_pmx_core { &omap3_pmx_core {
...@@ -154,3 +174,8 @@ &uart3 { ...@@ -154,3 +174,8 @@ &uart3 {
pinctrl-names = "default"; pinctrl-names = "default";
pinctrl-0 = <&uart3_pins>; pinctrl-0 = <&uart3_pins>;
}; };
&gpio1 {
pinctrl-names = "default";
pinctrl-0 = <&gpio1_pins>;
};
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment