[PATCH 13/15] arm64: dts: rockchip: ADC button for opi5max

Jimmy Hon honyuenkwun at gmail.com
Sat Oct 26 02:48:29 PDT 2024


Mask Rom button for the Orange Pi 5 Max

Signed-off-by: Jimmy Hon <honyuenkwun at gmail.com>
---
 .../boot/dts/rockchip/rk3588-orangepi-5-max.dts  | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
index 0cf0e30a503a..dc5de21cddd1 100644
--- a/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
+++ b/arch/arm64/boot/dts/rockchip/rk3588-orangepi-5-max.dts
@@ -3,6 +3,7 @@
 /dts-v1/;
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 #include <dt-bindings/pinctrl/rockchip.h>
 #include "rk3588.dtsi"
@@ -20,6 +21,21 @@ chosen {
 		stdout-path = "serial2:1500000n8";
 	};
 
+	adc-keys-0 {
+		compatible = "adc-keys";
+		/* BOOT_SARADC_IN0 */
+		io-channels = <&saradc 0>;
+		io-channel-names = "buttons";
+		keyup-threshold-microvolt = <1800000>;
+		poll-interval = <100>;
+
+		button-maskrom {
+			label = "Mask Rom";
+			linux,code = <KEY_SETUP>;
+			press-threshold-microvolt = <2000>;
+		};
+	};
+
 	fan: pwm-fan {
 		compatible = "pwm-fan";
 		cooling-levels = <0 70 75 80 100>;
-- 
2.47.0




More information about the Linux-rockchip mailing list