From 30e757b4c4e0017be2a36c28e18bba7e16372d3f Mon Sep 17 00:00:00 2001 From: Wu Liangqing Date: Wed, 18 Dec 2019 17:40:27 +0800 Subject: [PATCH] arm64: dts: rockchip: add adc_keys node for rk3399 board Change-Id: I0fde323d5924df5389e51abc584cc6eccbcb6166 Signed-off-by: Wu Liangqing --- .../boot/dts/rockchip/rk3399-evb-ind.dtsi | 39 ++++++++++--------- .../boot/dts/rockchip/rk3399-sapphire.dtsi | 16 -------- .../boot/dts/rockchip/rk3399-tve1030g.dtsi | 37 ++++++++++-------- 3 files changed, 40 insertions(+), 52 deletions(-) diff --git a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi index 230c81842ba6..cf753eeafb1e 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-evb-ind.dtsi @@ -14,6 +14,26 @@ / { compatible = "rockchip,rk3399-evb-ind", "rockchip,rk3399"; + adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + vol-up-key { + linux,code = <115>; + label = "volume up"; + rockchip,adc_value = <1000>; + }; + + vol-down-key { + linux,code = <114>; + label = "volume down"; + rockchip,adc_value = <170000>; + }; + }; + clkin_gmac: external-gmac-clock { compatible = "fixed-clock"; clock-frequency = <125000000>; @@ -48,25 +68,6 @@ }; }; - rk_key { - compatible = "rockchip,key"; - status = "okay"; - - io-channels = <&saradc 1>; - - vol-up-key { - linux,code = <115>; - label = "volume up"; - rockchip,adc_value = <1>; - }; - - vol-down-key { - linux,code = <114>; - label = "volume down"; - rockchip,adc_value = <170>; - }; - }; - dp_sound: dp-sound { status = "disabled"; compatible = "rockchip,cdndp-sound"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi index 0f05e716259e..b1f5621637a7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-sapphire.dtsi @@ -110,22 +110,6 @@ regulator-max-microvolt = <12000000>; }; - keys: gpio-keys { - compatible = "gpio-keys"; - autorepeat; - - power { - debounce-interval = <100>; - gpios = <&gpio0 RK_PA5 GPIO_ACTIVE_LOW>; - label = "GPIO Power"; - linux,code = ; - linux,input-type = <1>; - pinctrl-names = "default"; - pinctrl-0 = <&pwr_btn>; - wakeup-source; - }; - }; - dp_sound: dp-sound { status = "disabled"; compatible = "rockchip,cdndp-sound"; diff --git a/arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi b/arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi index cd8f2aa4fc04..4d16098348f7 100644 --- a/arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi +++ b/arch/arm64/boot/dts/rockchip/rk3399-tve1030g.dtsi @@ -14,6 +14,26 @@ #include / { + adc_keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + keyup-threshold-microvolt = <1800000>; + poll-interval = <100>; + + vol-up-key { + label = "volume up"; + linux,code = ; + press-threshold-microvolt = <1000>; + }; + + vol-down-key { + label = "volume down"; + linux,code = ; + press-threshold-microvolt = <170000>; + }; + }; + backlight: backlight { compatible = "pwm-backlight"; pwms = <&pwm0 0 25000 0>; @@ -183,23 +203,6 @@ }; }; -&adc_keys { - compatible = "adc-keys"; - io-channels = <&saradc 1>; - keyup-threshold-microvolt = <1800000>; - vol-up-key { - label = "volume up"; - linux,code = ; - press-threshold-microvolt = <1000>; - }; - - vol-down-key { - label = "volume down"; - linux,code = ; - press-threshold-microvolt = <170000>; - }; -}; - &cdn_dp { status = "okay"; extcon = <&fusb0>;