From: Chen Jun Date: Thu, 15 Jun 2017 03:04:07 +0000 (+0800) Subject: arm64: dts: hi3660: add power key dts node X-Git-Tag: v4.13-rc1~165^2~13^2~11 X-Git-Url: https://git.karo-electronics.de/?a=commitdiff_plain;h=8cb53a8d18fd548c2eac0f951a43d840bcd5f54c;p=karo-tx-linux.git arm64: dts: hi3660: add power key dts node We use gpio_034 as power key on hikey960, and set gpio with pull-up state, when key press the voltage on the gpio will come to lower, and power key event will be reported. Signed-off-by: Chen Jun Signed-off-by: John Stultz Signed-off-by: Guodong Xu Signed-off-by: Wei Xu --- diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts index c25fff980b77..7aac35bceced 100644 --- a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts +++ b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts @@ -10,6 +10,8 @@ #include "hi3660.dtsi" #include "hikey960-pinctrl.dtsi" #include +#include +#include / { model = "HiKey960"; @@ -34,6 +36,19 @@ /* rewrite this at bootloader */ reg = <0x0 0x0 0x0 0x0>; }; + + keys { + compatible = "gpio-keys"; + pinctrl-names = "default"; + pinctrl-0 = <&pwr_key_pmx_func &pwr_key_cfg_func>; + + power { + wakeup-source; + gpios = <&gpio4 2 GPIO_ACTIVE_LOW>; + label = "GPIO Power"; + linux,code = ; + }; + }; }; &i2c0 {