diff options
author | Baolin Wang <baolin.wang@linaro.org> | 2018-04-16 05:40:03 +0300 |
---|---|---|
committer | Olof Johansson <olof@lixom.net> | 2018-05-26 01:28:29 +0300 |
commit | 1cea2c22ec0eb579e53a79eb903cd69f6bca62ce (patch) | |
tree | 350879886a68d537b4caf6832380d706058431d0 /arch/arm64/boot/dts/sprd/sc9860.dtsi | |
parent | 4b9743e84cab9ca3f9277ccb7ffa614567969e2e (diff) | |
download | linux-1cea2c22ec0eb579e53a79eb903cd69f6bca62ce.tar.xz |
arm64: dts: sprd: Add GPIO and GPIO keys device nodes
This patch adds device nodes to enable one GPIO controller located on
digital chip, 2 EIC (external interrupt controller) controllers loacted
on PMIC and digital chip for Spreadtrum SC9860 platform.
Moreover this patch adds 3 GPIO keys relied on EIC controller to support
power key and volume up/down keys.
Signed-off-by: Baolin Wang <baolin.wang@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'arch/arm64/boot/dts/sprd/sc9860.dtsi')
-rw-r--r-- | arch/arm64/boot/dts/sprd/sc9860.dtsi | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm64/boot/dts/sprd/sc9860.dtsi b/arch/arm64/boot/dts/sprd/sc9860.dtsi index dcd03ffcda03..3f5160d2f130 100644 --- a/arch/arm64/boot/dts/sprd/sc9860.dtsi +++ b/arch/arm64/boot/dts/sprd/sc9860.dtsi @@ -7,6 +7,8 @@ */ #include <dt-bindings/interrupt-controller/arm-gic.h> +#include <dt-bindings/input/input.h> +#include <dt-bindings/gpio/gpio.h> #include "whale2.dtsi" / { @@ -679,5 +681,33 @@ }; }; }; + + gpio-keys { + compatible = "gpio-keys"; + + key-volumedown { + label = "Volume Down Key"; + linux,code = <KEY_VOLUMEDOWN>; + gpios = <&eic_debounce 2 GPIO_ACTIVE_LOW>; + debounce-interval = <2>; + wakeup-source; + }; + + key-volumeup { + label = "Volume Up Key"; + linux,code = <KEY_VOLUMEUP>; + gpios = <&pmic_eic 10 GPIO_ACTIVE_HIGH>; + debounce-interval = <2>; + wakeup-source; + }; + + key-power { + label = "Power Key"; + linux,code = <KEY_POWER>; + gpios = <&pmic_eic 1 GPIO_ACTIVE_HIGH>; + debounce-interval = <2>; + wakeup-source; + }; + }; }; }; |