From ffc4ff2444e5b150c021eda8c16037e5e113408f Mon Sep 17 00:00:00 2001 From: Wu Jingchen Date: Mon, 13 Apr 2020 17:33:04 +0800 Subject: [PATCH] arm64: dts: rockchip: add gpio key and adc key config for rk3368-xikp board Change-Id: I300ad4e7b5d6e942813d6375bb85e6578f44d657 Signed-off-by: Wu Jingchen --- arch/arm64/boot/dts/rockchip/rk3368-xikp.dtsi | 36 +++++++++++-------- 1 file changed, 22 insertions(+), 14 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3368-xikp.dtsi b/arch/arm64/boot/dts/rockchip/rk3368-xikp.dtsi index b6efe14faa43..3380845c9fb3 100644 --- a/arch/arm64/boot/dts/rockchip/rk3368-xikp.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3368-xikp.dtsi @@ -41,6 +41,7 @@ */ /dts-v1/; +#include #include #include #include "rk3368.dtsi" @@ -132,29 +133,36 @@ status = "okay"; }; - rk_key: rockchip-key { - compatible = "rockchip,key"; - status = "okay"; + gpio_keys: gpio-keys { + compatible = "gpio-keys"; + autorepeat; + power { + debounce-interval = <100>; + gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; + label = "GPIO Key Power"; + linux,code = ; + wakeup-source; + }; + }; + + adc_keys: adc-keys { + compatible = "adc-keys"; io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1024000>; + poll-interval = <100>; vol-up-key { - linux,code = <115>; label = "volume up"; - rockchip,adc_value = <1>; + linux,code = ; + press-threshold-microvolt = <1000>; }; vol-down-key { - linux,code = <114>; label = "volume down"; - rockchip,adc_value = <170>; - }; - - power-key { - gpios = <&gpio0 2 GPIO_ACTIVE_LOW>; - linux,code = <116>; - label = "power"; - gpio-key,wakeup; + linux,code = ; + press-threshold-microvolt = <170000>; }; };