[2/3] arm64: dts: allwinner: h616: orangepi-zero2w: add 24-pin expansion buttons and IR
Commit Message
The optional 24-pin expansion board exposes two LRADC buttons and an IR
receiver. KEY1/KEY2 are on LRADC channel 0 (measured ~1.0 V / ~1.6 V) and are
wired to KEY_1 / KEY_ENTER; the IR receiver is on the SoC ir controller (PH10).
Tested on: OrangePi Zero 2W (Allwinner H618).
Signed-off-by: Vladimir <anykey196@gmail.com>
---
.../allwinner/sun50i-h618-orangepi-zero2w.dts | 29 +++++++++++++++++++
1 file changed, 29 insertions(+)
@@ -10,6 +10,7 @@
#include <dt-bindings/gpio/gpio.h>
#include <dt-bindings/interrupt-controller/arm-gic.h>
+#include <dt-bindings/input/input.h>
#include <dt-bindings/leds/common.h>
/ {
@@ -189,3 +190,31 @@ &usbphy {
usb1_vbus-supply = <®_vcc5v>;
status = "okay";
};
+
+/*
+ * Buttons and IR receiver on the optional 24-pin expansion board.
+ * KEY1 -> KEY_1, KEY2 -> KEY_ENTER (LRADC channel 0).
+ */
+&lradc {
+ vref-supply = <®_vcc3v3>;
+ status = "okay";
+ wakeup-source;
+
+ button-1000 {
+ label = "KEY_1";
+ linux,code = <KEY_1>;
+ channel = <0>;
+ voltage = <1000000>;
+ };
+
+ button-1600 {
+ label = "KEY_ENTER";
+ linux,code = <KEY_ENTER>;
+ channel = <0>;
+ voltage = <1600000>;
+ };
+};
+
+&ir {
+ status = "okay";
+};