Skip to content

Commit afa933c

Browse files
sremmind
authored andcommitted
arm64: dts: rockchip: add ADC buttons to rk3588-evb1
The Rockchip EVB1 has a couple of buttons connected via an ADC line. Let's add them to its devicetree. Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20231005134357.37171-1-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent dd6dc0c commit afa933c

1 file changed

Lines changed: 38 additions & 0 deletions

File tree

arch/arm64/boot/dts/rockchip/rk3588-evb1-v10.dts

Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88

99
#include <dt-bindings/gpio/gpio.h>
10+
#include <dt-bindings/input/input.h>
1011
#include <dt-bindings/pinctrl/rockchip.h>
1112
#include "rk3588.dtsi"
1213

@@ -23,6 +24,38 @@
2324
stdout-path = "serial2:1500000n8";
2425
};
2526

27+
adc-keys {
28+
compatible = "adc-keys";
29+
io-channels = <&saradc 1>;
30+
io-channel-names = "buttons";
31+
keyup-threshold-microvolt = <1800000>;
32+
poll-interval = <100>;
33+
34+
button-vol-up {
35+
label = "Volume Up";
36+
linux,code = <KEY_VOLUMEUP>;
37+
press-threshold-microvolt = <17000>;
38+
};
39+
40+
button-vol-down {
41+
label = "Volume Down";
42+
linux,code = <KEY_VOLUMEDOWN>;
43+
press-threshold-microvolt = <417000>;
44+
};
45+
46+
button-menu {
47+
label = "Menu";
48+
linux,code = <KEY_MENU>;
49+
press-threshold-microvolt = <890000>;
50+
};
51+
52+
button-escape {
53+
label = "Escape";
54+
linux,code = <KEY_ESC>;
55+
press-threshold-microvolt = <1235000>;
56+
};
57+
};
58+
2659
backlight: backlight {
2760
compatible = "pwm-backlight";
2861
power-supply = <&vcc12v_dcin>;
@@ -286,6 +319,11 @@
286319
status = "okay";
287320
};
288321

322+
&saradc {
323+
vref-supply = <&vcc_1v8_s0>;
324+
status = "okay";
325+
};
326+
289327
&sdhci {
290328
bus-width = <8>;
291329
no-sdio;

0 commit comments

Comments
 (0)