[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20170615030417.14059-11-guodong.xu@linaro.org>
Date: Thu, 15 Jun 2017 11:04:07 +0800
From: Guodong Xu <guodong.xu@...aro.org>
To: lee.jones@...aro.org, robh+dt@...nel.org, mark.rutland@....com,
xuwei5@...ilicon.com, catalin.marinas@....com, will.deacon@....com,
lgirdwood@...il.com, broonie@...nel.org, khilman@...libre.com,
arnd@...db.de, gregory.clement@...e-electrons.com,
horms+renesas@...ge.net.au, olof@...om.net,
thomas.petazzoni@...e-electrons.com, yamada.masahiro@...ionext.com,
riku.voipio@...aro.org, treding@...dia.com, krzk@...nel.org,
eric@...olt.net, damm+renesas@...nsource.se,
ard.biesheuvel@...aro.org, linus.walleij@...aro.org,
geert+renesas@...der.be
Cc: devicetree@...r.kernel.org, linux-kernel@...r.kernel.org,
linux-arm-kernel@...ts.infradead.org, hw.wangxiaoyin@...ilicon.com,
Chen Jun <chenjun14@...wei.com>,
John Stultz <john.stultz@...aro.org>,
Guodong Xu <guodong.xu@...aro.org>
Subject: [PATCH v4 10/20] arm64: dts: hi3660: add power key dts node
From: Chen Jun <chenjun14@...wei.com>
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 <chenjun14@...wei.com>
Signed-off-by: John Stultz <john.stultz@...aro.org>
Signed-off-by: Guodong Xu <guodong.xu@...aro.org>
---
arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts | 15 +++++++++++++++
1 file changed, 15 insertions(+)
diff --git a/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts b/arch/arm64/boot/dts/hisilicon/hi3660-hikey960.dts
index c25fff9..7aac35b 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 <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/interrupt-controller/irq.h>
/ {
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 = <KEY_POWER>;
+ };
+ };
};
&i2c0 {
--
2.10.2
Powered by blists - more mailing lists