Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ARM: dts: rockchip: add adc-keys node to rk3066a-mk808

The MK808 has a button inside the cover for the boot loader to do
some action. Add the adc-keys node to the rk3066a-mk808.dts file.
The rk3066 has a higher maximum DC supply voltage for the analog part of
SAR-ADC VDDA_SARADC of 2.75V then other Rockchip SoCs.
For the "rockchip,saradc" node is a vref-supply property required,
so add a regulator for it as well.

Signed-off-by: Johan Jonker <jbx6244@gmail.com>
Link: https://lore.kernel.org/r/20210828092755.24560-1-jbx6244@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>

authored by

Johan Jonker and committed by
Heiko Stuebner
d7197d56 6880fa6c

+27
+27
arch/arm/boot/dts/rk3066a-mk808.dts
··· 4 4 */ 5 5 6 6 /dts-v1/; 7 + #include <dt-bindings/input/input.h> 7 8 #include "rk3066a.dtsi" 8 9 9 10 / { ··· 23 22 memory@60000000 { 24 23 reg = <0x60000000 0x40000000>; 25 24 device_type = "memory"; 25 + }; 26 + 27 + adc-keys { 28 + compatible = "adc-keys"; 29 + io-channels = <&saradc 1>; 30 + io-channel-names = "buttons"; 31 + keyup-threshold-microvolt = <2500000>; 32 + poll-interval = <100>; 33 + 34 + recovery { 35 + label = "recovery"; 36 + linux,code = <KEY_VENDOR>; 37 + press-threshold-microvolt = <0>; 38 + }; 26 39 }; 27 40 28 41 gpio-leds { ··· 59 44 remote-endpoint = <&hdmi_out_con>; 60 45 }; 61 46 }; 47 + }; 48 + 49 + vcc_2v5: vcc-2v5 { 50 + compatible = "regulator-fixed"; 51 + regulator-name = "vcc_2v5"; 52 + regulator-min-microvolt = <2500000>; 53 + regulator-max-microvolt = <2500000>; 62 54 }; 63 55 64 56 vcc_io: vcc-io { ··· 184 162 rockchip,pins = <3 RK_PD0 RK_FUNC_GPIO &pcfg_pull_none>; 185 163 }; 186 164 }; 165 + }; 166 + 167 + &saradc { 168 + vref-supply = <&vcc_2v5>; 169 + status = "okay"; 187 170 }; 188 171 189 172 &uart2 {