diff options
author | Felipe Balbi <balbi@ti.com> | 2014-12-26 23:53:13 +0300 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2015-01-08 03:25:10 +0300 |
commit | cd5bca6f627442b63012ac0cafc6452bc929832e (patch) | |
tree | 3eda3db265379b9e57cd41cb66be1e2648a5368e /arch/arm/boot/dts/am437x-idk-evm.dts | |
parent | f4b36909353ada35374dc51676f73362443bf206 (diff) | |
download | linux-cd5bca6f627442b63012ac0cafc6452bc929832e.tar.xz |
ARM: dts: am437x-idk: add gpio-based power key
AM437x IDK board has a User Switch which we can
program to whatever we want. Because this board
doesn't have a PMIC which can give us power button
presses, let's use this user switch as a gpio-keys
power button.
Signed-off-by: Felipe Balbi <balbi@ti.com>
Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/boot/dts/am437x-idk-evm.dts')
-rw-r--r-- | arch/arm/boot/dts/am437x-idk-evm.dts | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/arch/arm/boot/dts/am437x-idk-evm.dts b/arch/arm/boot/dts/am437x-idk-evm.dts index b52dd0a72d61..f9a17e2ca8cb 100644 --- a/arch/arm/boot/dts/am437x-idk-evm.dts +++ b/arch/arm/boot/dts/am437x-idk-evm.dts @@ -96,9 +96,29 @@ regulator-boot-on; vin-supply = <&v1_5dreg>; }; + + gpio_keys: gpio_keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&gpio_keys_pins_default>; + #address-cells = <1>; + #size-cells = <0>; + + switch@0 { + label = "power-button"; + linux,code = <KEY_POWER>; + gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; + }; + }; }; &am43xx_pinmux { + gpio_keys_pins_default: gpio_keys_pins_default { + pinctrl-single,pins = < + 0x1b8 (PIN_INPUT | MUX_MODE7) /* cam0_field.gpio4_2 */ + >; + }; + i2c0_pins_default: i2c0_pins_default { pinctrl-single,pins = < 0x188 (PIN_INPUT | SLEWCTRL_FAST | MUX_MODE0) /* i2c0_sda.i2c0_sda */ @@ -282,6 +302,10 @@ status = "okay"; }; +&gpio4 { + status = "okay"; +}; + &gpio5 { status = "okay"; }; |