ARM: dts: Declare push button as GPIO key on stm32f429 boards

Signed-off-by: Maxime Coquelin <mcoquelin.stm32@gmail.com>
Signed-off-by: Alexandre TORGUE <alexandre.torgue@st.com>
This commit is contained in:
Maxime Coquelin 2016-09-02 15:45:53 +02:00 committed by Alexandre TORGUE
parent ed01154fe7
commit 5670501c99
2 changed files with 31 additions and 0 deletions

View File

@ -47,6 +47,7 @@
/dts-v1/; /dts-v1/;
#include "stm32f429.dtsi" #include "stm32f429.dtsi"
#include <dt-bindings/input/input.h>
/ { / {
model = "STMicroelectronics STM32429i-EVAL board"; model = "STMicroelectronics STM32429i-EVAL board";
@ -82,6 +83,23 @@ blue {
}; };
}; };
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
label = "Wake up";
linux,code = <KEY_WAKEUP>;
gpios = <&gpioa 0 0>;
};
button@1 {
label = "Tamper";
linux,code = <KEY_RESTART>;
gpios = <&gpioc 13 0>;
};
};
usbotg_hs_phy: usbphy { usbotg_hs_phy: usbphy {
#phy-cells = <0>; #phy-cells = <0>;
compatible = "usb-nop-xceiv"; compatible = "usb-nop-xceiv";

View File

@ -47,6 +47,7 @@
/dts-v1/; /dts-v1/;
#include "stm32f429.dtsi" #include "stm32f429.dtsi"
#include <dt-bindings/input/input.h>
/ { / {
model = "STMicroelectronics STM32F429i-DISCO board"; model = "STMicroelectronics STM32F429i-DISCO board";
@ -75,6 +76,18 @@ green {
linux,default-trigger = "heartbeat"; linux,default-trigger = "heartbeat";
}; };
}; };
gpio_keys {
compatible = "gpio-keys";
#address-cells = <1>;
#size-cells = <0>;
autorepeat;
button@0 {
label = "User";
linux,code = <KEY_HOME>;
gpios = <&gpioa 0 0>;
};
};
}; };
&clk_hse { &clk_hse {