]> www.infradead.org Git - users/jedix/linux-maple.git/commitdiff
arm64: dts: rockchip: Move device specific properties
authorChris Morgan <macromorgan@hotmail.com>
Tue, 23 Jan 2024 21:21:08 +0000 (15:21 -0600)
committerHeiko Stuebner <heiko@sntech.de>
Thu, 25 Jan 2024 20:03:21 +0000 (21:03 +0100)
Move device specific properties related to the ADC Joystick to
different board specific device trees. This is in preparation for
adding the Anbernic RG-Arc series of devices.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Link: https://lore.kernel.org/r/20240123212111.202146-2-macroalpha82@gmail.com
Signed-off-by: Heiko Stuebner <heiko@sntech.de>
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg353x.dtsi
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rg503.dts
arch/arm64/boot/dts/rockchip/rk3566-anbernic-rgxx3.dtsi

index 2a2821f4c580b0afe219394e0de64072e924482f..63a18ff36ceaeff81e5ca80cc6fa3868f8b03b9d 100644 (file)
@@ -8,11 +8,73 @@
 #include "rk3566-anbernic-rgxx3.dtsi"
 
 / {
+       adc-joystick {
+               compatible = "adc-joystick";
+               io-channels = <&adc_mux 0>,
+                             <&adc_mux 1>,
+                             <&adc_mux 2>,
+                             <&adc_mux 3>;
+               pinctrl-0 = <&joy_mux_en>;
+               pinctrl-names = "default";
+               poll-interval = <60>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               axis@0 {
+                       reg = <0>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <1023 15>;
+                       linux,code = <ABS_X>;
+               };
+
+               axis@1 {
+                       reg = <1>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <15 1023>;
+                       linux,code = <ABS_RX>;
+               };
+
+               axis@2 {
+                       reg = <2>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <15 1023>;
+                       linux,code = <ABS_Y>;
+               };
+
+               axis@3 {
+                       reg = <3>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <1023 15>;
+                       linux,code = <ABS_RY>;
+               };
+       };
+
+       adc_mux: adc-mux {
+               compatible = "io-channel-mux";
+               channels = "left_x", "right_x", "left_y", "right_y";
+               #io-channel-cells = <1>;
+               io-channels = <&saradc 3>;
+               io-channel-names = "parent";
+               mux-controls = <&gpio_mux>;
+               settle-time-us = <100>;
+       };
+
        backlight: backlight {
                compatible = "pwm-backlight";
                power-supply = <&vcc_sys>;
                pwms = <&pwm4 0 25000 0>;
        };
+
+       gpio_mux: mux-controller {
+               compatible = "gpio-mux";
+               mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
+                           <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
+               #mux-control-cells = <0>;
+       };
 };
 
 &cru {
                linux,code = <BTN_DPAD_RIGHT>;
        };
 
+       button-thumbl {
+               gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
+               label = "THUMBL";
+               linux,code = <BTN_THUMBL>;
+       };
+
+       button-thumbr {
+               gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
+               label = "THUMBR";
+               linux,code = <BTN_THUMBR>;
+       };
+
        button-y {
                gpios = <&gpio3 RK_PC1 GPIO_ACTIVE_LOW>;
                label = "WEST";
index c763c7f3b1b38b71fc1702c1e6a157d58e6af2e8..94e6dd61a2dbb4f1bca3efb7106c1d500ac3cb06 100644 (file)
                mmc2 = &sdmmc2;
        };
 
+       adc-joystick {
+               compatible = "adc-joystick";
+               io-channels = <&adc_mux 0>,
+                             <&adc_mux 1>,
+                             <&adc_mux 2>,
+                             <&adc_mux 3>;
+               pinctrl-0 = <&joy_mux_en>;
+               pinctrl-names = "default";
+               poll-interval = <60>;
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               axis@0 {
+                       reg = <0>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <1023 15>;
+                       linux,code = <ABS_X>;
+               };
+
+               axis@1 {
+                       reg = <1>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <15 1023>;
+                       linux,code = <ABS_RX>;
+               };
+
+               axis@2 {
+                       reg = <2>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <15 1023>;
+                       linux,code = <ABS_Y>;
+               };
+
+               axis@3 {
+                       reg = <3>;
+                       abs-flat = <32>;
+                       abs-fuzz = <32>;
+                       abs-range = <1023 15>;
+                       linux,code = <ABS_RY>;
+               };
+       };
+
+       adc_mux: adc-mux {
+               compatible = "io-channel-mux";
+               channels = "left_x", "right_x", "left_y", "right_y";
+               #io-channel-cells = <1>;
+               io-channels = <&saradc 3>;
+               io-channel-names = "parent";
+               mux-controls = <&gpio_mux>;
+               settle-time-us = <100>;
+       };
+
        battery: battery {
                compatible = "simple-battery";
                charge-full-design-microamp-hours = <3472000>;
                                        <3400000 0>;
        };
 
+       gpio_mux: mux-controller {
+               compatible = "gpio-mux";
+               mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
+                           <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
+               #mux-control-cells = <0>;
+       };
+
        gpio_spi: spi {
                compatible = "spi-gpio";
                pinctrl-names = "default";
                linux,code = <BTN_DPAD_RIGHT>;
        };
 
+       button-thumbl {
+               gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
+               label = "THUMBL";
+               linux,code = <BTN_THUMBL>;
+       };
+
+       button-thumbr {
+               gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
+               label = "THUMBR";
+               linux,code = <BTN_THUMBR>;
+       };
+
        button-y {
                gpios = <&gpio3 RK_PC2 GPIO_ACTIVE_LOW>;
                label = "WEST";
index 8cbf3d9a4f22ee975fe45616c31c71f351597b0b..18b8c2e7befa75712c0e2b1af9b35113ffec4d84 100644 (file)
                stdout-path = "serial2:1500000n8";
        };
 
-       adc-joystick {
-               compatible = "adc-joystick";
-               io-channels = <&adc_mux 0>,
-                             <&adc_mux 1>,
-                             <&adc_mux 2>,
-                             <&adc_mux 3>;
-               pinctrl-0 = <&joy_mux_en>;
-               pinctrl-names = "default";
-               poll-interval = <60>;
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               axis@0 {
-                       reg = <0>;
-                       abs-flat = <32>;
-                       abs-fuzz = <32>;
-                       abs-range = <1023 15>;
-                       linux,code = <ABS_X>;
-               };
-
-               axis@1 {
-                       reg = <1>;
-                       abs-flat = <32>;
-                       abs-fuzz = <32>;
-                       abs-range = <15 1023>;
-                       linux,code = <ABS_RX>;
-               };
-
-               axis@2 {
-                       reg = <2>;
-                       abs-flat = <32>;
-                       abs-fuzz = <32>;
-                       abs-range = <15 1023>;
-                       linux,code = <ABS_Y>;
-               };
-
-               axis@3 {
-                       reg = <3>;
-                       abs-flat = <32>;
-                       abs-fuzz = <32>;
-                       abs-range = <1023 15>;
-                       linux,code = <ABS_RY>;
-               };
-       };
-
        adc_keys: adc-keys {
                compatible = "adc-keys";
                io-channels = <&saradc 0>;
                };
        };
 
-       adc_mux: adc-mux {
-               compatible = "io-channel-mux";
-               channels = "left_x", "right_x", "left_y", "right_y";
-               #io-channel-cells = <1>;
-               io-channels = <&saradc 3>;
-               io-channel-names = "parent";
-               mux-controls = <&gpio_mux>;
-               settle-time-us = <100>;
-       };
-
        gpio_keys_control: gpio-keys-control {
                compatible = "gpio-keys";
                pinctrl-0 = <&btn_pins_ctrl>;
                        linux,code = <BTN_START>;
                };
 
-               button-thumbl {
-                       gpios = <&gpio3 RK_PA1 GPIO_ACTIVE_LOW>;
-                       label = "THUMBL";
-                       linux,code = <BTN_THUMBL>;
-               };
-
-               button-thumbr {
-                       gpios = <&gpio3 RK_PA2 GPIO_ACTIVE_LOW>;
-                       label = "THUMBR";
-                       linux,code = <BTN_THUMBR>;
-               };
-
                button-up {
                        gpios = <&gpio3 RK_PA3 GPIO_ACTIVE_LOW>;
                        label = "DPAD-UP";
                };
        };
 
-       gpio_mux: mux-controller {
-               compatible = "gpio-mux";
-               mux-gpios = <&gpio0 RK_PB6 GPIO_ACTIVE_LOW>,
-                           <&gpio0 RK_PB7 GPIO_ACTIVE_LOW>;
-               #mux-control-cells = <0>;
-       };
-
        hdmi-con {
                compatible = "hdmi-connector";
                ddc-i2c-bus = <&i2c5>;