arm64: dts: rockchip: add adc joystick to Odroid Go Advance
authorHeiko Stuebner <heiko.stuebner@theobroma-systems.com>
Fri, 3 Jul 2020 22:14:13 +0000 (00:14 +0200)
committerHeiko Stuebner <heiko@sntech.de>
Sun, 8 Nov 2020 00:29:21 +0000 (01:29 +0100)
Add the now usable adc-joystick node that describes the analog
joystick connected to two saradc channels from the rk3326 soc.

Signed-off-by: Heiko Stuebner <heiko.stuebner@theobroma-systems.com>
Link: https://lore.kernel.org/r/20200703221413.269800-1-heiko@sntech.de
arch/arm64/boot/dts/rockchip/rk3326-odroid-go2.dts

index 35bd6b9..e21372b 100644 (file)
                stdout-path = "serial2:115200n8";
        };
 
+       adc-joystick {
+               compatible = "adc-joystick";
+               io-channels = <&saradc 1>,
+                             <&saradc 2>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               axis@0 {
+                       reg = <0>;
+                       abs-flat = <10>;
+                       abs-fuzz = <10>;
+                       abs-range = <172 772>;
+                       linux,code = <ABS_X>;
+               };
+
+               axis@1 {
+                       reg = <1>;
+                       abs-flat = <10>;
+                       abs-fuzz = <10>;
+                       abs-range = <278 815>;
+                       linux,code = <ABS_Y>;
+               };
+       };
+
        backlight: backlight {
                compatible = "pwm-backlight";
                power-supply = <&vcc_bl>;