From: Jacob Chen Date: Wed, 18 Jan 2017 07:45:08 +0000 (+0800) Subject: arm: dts: rk3288-evb add adc keys X-Git-Tag: firefly_0821_release~727 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=5f488abc7792f242fd86be19eab95f80b139b11b;p=firefly-linux-kernel-4.4.55.git arm: dts: rk3288-evb add adc keys Change-Id: I976f05f9152895c02d44c4eb741b5691d3539969 Signed-off-by: Jacob Chen --- diff --git a/arch/arm/boot/dts/rk3288-evb.dtsi b/arch/arm/boot/dts/rk3288-evb.dtsi index db399ca4ca90..d8a64fd1c1f2 100644 --- a/arch/arm/boot/dts/rk3288-evb.dtsi +++ b/arch/arm/boot/dts/rk3288-evb.dtsi @@ -39,6 +39,7 @@ */ #include +#include #include "rk3288.dtsi" / { @@ -156,6 +157,44 @@ #clock-cells = <0>; }; + adc-keys { + compatible = "adc-keys"; + io-channels = <&saradc 1>; + io-channel-names = "buttons"; + poll-interval = <100>; + keyup-threshold-microvolt = <1800000>; + + button-up { + label = "Volume Up"; + linux,code = ; + press-threshold-microvolt = <100000>; + }; + + button-down { + label = "Volume Down"; + linux,code = ; + press-threshold-microvolt = <300000>; + }; + + menu { + label = "Menu"; + linux,code = ; + press-threshold-microvolt = <640000>; + }; + + esc { + label = "Esc"; + linux,code = ; + press-threshold-microvolt = <1000000>; + }; + + home { + label = "Home"; + linux,code = ; + press-threshold-microvolt = <1300000>; + }; + }; + gpio-keys { compatible = "gpio-keys"; #address-cells = <1>; @@ -167,7 +206,7 @@ button@0 { gpios = <&gpio0 5 GPIO_ACTIVE_LOW>; - linux,code = <116>; + linux,code = ; label = "GPIO Key Power"; linux,input-type = <1>; gpio-key,wakeup = <1>; @@ -175,6 +214,15 @@ }; }; + vccadc_ref: vccadc-ref { + compatible = "regulator-fixed"; + regulator-name = "vcc1v8_sys"; + regulator-always-on; + regulator-boot-on; + regulator-min-microvolt = <1800000>; + regulator-max-microvolt = <1800000>; + }; + /* This turns on USB vbus for both host0 (ehci) and host1 (dwc2) */ vcc_host: vcc-host-regulator { compatible = "regulator-fixed"; @@ -299,6 +347,11 @@ }; }; +&saradc { + vref-supply = <&vccadc_ref>; + status = "okay"; +}; + &sdmmc { supports-sd; bus-width = <4>;