[U-Boot] [PATCH 2/3] rockchip: rv1108: add adc key dt node for evb_rv1108

Andy Yan andy.yan at rock-chips.com
Tue Nov 28 06:34:17 UTC 2017


RV1108 EVB uses a adc-based recovery(VOL+) key, which
connected to saradc channel 0.
This patch add dt node for it.

Signed-off-by: Andy Yan <andy.yan at rock-chips.com>
---

 arch/arm/dts/rv1108-evb.dts | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/arch/arm/dts/rv1108-evb.dts b/arch/arm/dts/rv1108-evb.dts
index 8e857b2..66da40c 100644
--- a/arch/arm/dts/rv1108-evb.dts
+++ b/arch/arm/dts/rv1108-evb.dts
@@ -7,11 +7,32 @@
 /dts-v1/;
 
 #include "rv1108.dtsi"
+#include <dt-bindings/input/input.h>
 
 / {
 	model = "Rockchip RV1108 Evaluation board";
 	compatible = "rockchip,rv1108-evb", "rockchip,rv1108";
 
+	adc-keys {
+		compatible = "adc-keys";
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		poll-interval = <100>;
+		keyup-threshold-microvolt = <3300000>;
+
+		button-up {
+			label = "Volume Up";
+			linux,code = <KEY_VOLUMEUP>;
+			press-threshold-microvolt = <0>;
+		};
+
+		button-down {
+			label = "Volume Down";
+			linux,code = <KEY_VOLUMEDOWN>;
+			press-threshold-microvolt = <1650000>;
+		};
+	};
+
 	memory at 60000000 {
 		device_type = "memory";
 		reg = <0x60000000 0x08000000>;
-- 
2.7.4




More information about the U-Boot mailing list