~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

TOMOYO Linux Cross Reference
Linux/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-h.dts

Version: ~ [ linux-6.11-rc3 ] ~ [ linux-6.10.4 ] ~ [ linux-6.9.12 ] ~ [ linux-6.8.12 ] ~ [ linux-6.7.12 ] ~ [ linux-6.6.45 ] ~ [ linux-6.5.13 ] ~ [ linux-6.4.16 ] ~ [ linux-6.3.13 ] ~ [ linux-6.2.16 ] ~ [ linux-6.1.104 ] ~ [ linux-6.0.19 ] ~ [ linux-5.19.17 ] ~ [ linux-5.18.19 ] ~ [ linux-5.17.15 ] ~ [ linux-5.16.20 ] ~ [ linux-5.15.164 ] ~ [ linux-5.14.21 ] ~ [ linux-5.13.19 ] ~ [ linux-5.12.19 ] ~ [ linux-5.11.22 ] ~ [ linux-5.10.223 ] ~ [ linux-5.9.16 ] ~ [ linux-5.8.18 ] ~ [ linux-5.7.19 ] ~ [ linux-5.6.19 ] ~ [ linux-5.5.19 ] ~ [ linux-5.4.281 ] ~ [ linux-5.3.18 ] ~ [ linux-5.2.21 ] ~ [ linux-5.1.21 ] ~ [ linux-5.0.21 ] ~ [ linux-4.20.17 ] ~ [ linux-4.19.319 ] ~ [ linux-4.18.20 ] ~ [ linux-4.17.19 ] ~ [ linux-4.16.18 ] ~ [ linux-4.15.18 ] ~ [ linux-4.14.336 ] ~ [ linux-4.13.16 ] ~ [ linux-4.12.14 ] ~ [ linux-4.11.12 ] ~ [ linux-4.10.17 ] ~ [ linux-4.9.337 ] ~ [ linux-4.4.302 ] ~ [ linux-3.10.108 ] ~ [ linux-2.6.32.71 ] ~ [ linux-2.6.0 ] ~ [ linux-2.4.37.11 ] ~ [ unix-v6-master ] ~ [ ccs-tools-1.8.9 ] ~ [ policy-sample ] ~
Architecture: ~ [ i386 ] ~ [ alpha ] ~ [ m68k ] ~ [ mips ] ~ [ ppc ] ~ [ sparc ] ~ [ sparc64 ] ~

  1 // SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
  2 /*
  3  * Copyright (C) 2024 Ryan Walklin <ryan@testtoast.com>.
  4  * Copyright (C) 2024 Chris Morgan <macroalpha82@gmail.com>.
  5  */
  6 
  7 #include "sun50i-h700-anbernic-rg35xx-plus.dts"
  8 
  9 / {
 10         model = "Anbernic RG35XX H";
 11         compatible = "anbernic,rg35xx-h", "allwinner,sun50i-h700";
 12 
 13         adc-joystick {
 14                 compatible = "adc-joystick";
 15                 io-channels = <&adc_mux 0>,
 16                               <&adc_mux 1>,
 17                               <&adc_mux 2>,
 18                               <&adc_mux 3>;
 19                 pinctrl-0 = <&joy_mux_pin>;
 20                 pinctrl-names = "default";
 21                 poll-interval = <60>;
 22                 #address-cells = <1>;
 23                 #size-cells = <0>;
 24 
 25                 axis@0 {
 26                         reg = <0>;
 27                         abs-flat = <32>;
 28                         abs-fuzz = <32>;
 29                         abs-range = <4096 0>;
 30                         linux,code = <ABS_X>;
 31                 };
 32 
 33                 axis@1 {
 34                         reg = <1>;
 35                         abs-flat = <32>;
 36                         abs-fuzz = <32>;
 37                         abs-range = <0 4096>;
 38                         linux,code = <ABS_Y>;
 39                 };
 40 
 41                 axis@2 {
 42                         reg = <2>;
 43                         abs-flat = <32>;
 44                         abs-fuzz = <32>;
 45                         abs-range = <0 4096>;
 46                         linux,code = <ABS_RX>;
 47                 };
 48 
 49                 axis@3 {
 50                         reg = <3>;
 51                         abs-flat = <32>;
 52                         abs-fuzz = <32>;
 53                         abs-range = <4096 0>;
 54                         linux,code = <ABS_RY>;
 55                 };
 56         };
 57 
 58         adc_mux: adc-mux {
 59                 compatible = "io-channel-mux";
 60                 channels = "left_x", "left_y", "right_x", "right_y";
 61                 #io-channel-cells = <1>;
 62                 io-channels = <&gpadc 0>;
 63                 io-channel-names = "parent";
 64                 mux-controls = <&gpio_mux>;
 65                 settle-time-us = <100>;
 66         };
 67 
 68         gpio_mux: mux-controller {
 69                 compatible = "gpio-mux";
 70                 mux-gpios = <&pio 8 1 GPIO_ACTIVE_LOW>,
 71                             <&pio 8 2 GPIO_ACTIVE_LOW>;
 72                 #mux-control-cells = <0>;
 73         };
 74 };
 75 
 76 &gpadc {
 77         #address-cells = <1>;
 78         #size-cells = <0>;
 79         status = "okay";
 80 
 81         channel@0 {
 82                 reg = <0>;
 83         };
 84 };
 85 
 86 &gpio_keys_gamepad {
 87         button-thumbl {
 88                 label = "GPIO Thumb Left";
 89                 gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
 90                 linux,input-type = <EV_KEY>;
 91                 linux,code = <BTN_THUMBL>;
 92         };
 93 
 94         button-thumbr {
 95                 label = "GPIO Thumb Right";
 96                 gpios = <&pio 4 9 GPIO_ACTIVE_LOW>; /* PE9 */
 97                 linux,input-type = <EV_KEY>;
 98                 linux,code = <BTN_THUMBR>;
 99         };
100 };
101 
102 &ehci1 {
103         status = "okay";
104 };
105 
106 &ohci1 {
107         status = "okay";
108 };
109 
110 &pio {
111         joy_mux_pin: joy-mux-pin {
112                 pins = "PI0";
113                 function = "gpio_out";
114         };
115 };

~ [ source navigation ] ~ [ diff markup ] ~ [ identifier search ] ~

kernel.org | git.kernel.org | LWN.net | Project Home | SVN repository | Mail admin

Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.

sflogo.php