linux-loongson/arch/arm64/boot/dts/allwinner/sun50i-h700-anbernic-rg35xx-h.dts
Chris Morgan 81009e49dd arm64: dts: allwinner: h700: Add USB Host for RG35XX-H
The RG35XX-H has a USB host port in addition to the USB OTG port used
for charging. The host port receives its power from two distinct GPIO
controlled regulators.

Signed-off-by: Chris Morgan <macromorgan@hotmail.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Link: https://patch.msgid.link/20241018160617.157083-5-macroalpha82@gmail.com
Signed-off-by: Chen-Yu Tsai <wens@csie.org>
2025-02-22 21:08:38 +08:00

139 lines
2.7 KiB
Plaintext

// SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
/*
* Copyright (C) 2024 Ryan Walklin <ryan@testtoast.com>.
* Copyright (C) 2024 Chris Morgan <macroalpha82@gmail.com>.
*/
#include "sun50i-h700-anbernic-rg35xx-plus.dts"
/ {
model = "Anbernic RG35XX H";
compatible = "anbernic,rg35xx-h", "allwinner,sun50i-h700";
adc-joystick {
compatible = "adc-joystick";
io-channels = <&adc_mux 0>,
<&adc_mux 1>,
<&adc_mux 2>,
<&adc_mux 3>;
pinctrl-0 = <&joy_mux_pin>;
pinctrl-names = "default";
poll-interval = <60>;
#address-cells = <1>;
#size-cells = <0>;
axis@0 {
reg = <0>;
abs-flat = <32>;
abs-fuzz = <32>;
abs-range = <4096 0>;
linux,code = <ABS_X>;
};
axis@1 {
reg = <1>;
abs-flat = <32>;
abs-fuzz = <32>;
abs-range = <0 4096>;
linux,code = <ABS_Y>;
};
axis@2 {
reg = <2>;
abs-flat = <32>;
abs-fuzz = <32>;
abs-range = <0 4096>;
linux,code = <ABS_RX>;
};
axis@3 {
reg = <3>;
abs-flat = <32>;
abs-fuzz = <32>;
abs-range = <4096 0>;
linux,code = <ABS_RY>;
};
};
adc_mux: adc-mux {
compatible = "io-channel-mux";
channels = "left_x", "left_y", "right_x", "right_y";
#io-channel-cells = <1>;
io-channels = <&gpadc 0>;
io-channel-names = "parent";
mux-controls = <&gpio_mux>;
settle-time-us = <100>;
};
gpio_mux: mux-controller {
compatible = "gpio-mux";
mux-gpios = <&pio 8 1 GPIO_ACTIVE_LOW>,
<&pio 8 2 GPIO_ACTIVE_LOW>;
#mux-control-cells = <0>;
};
reg_vcc3v8_usb: regulator-vcc3v8-usb {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&pio 4 5 GPIO_ACTIVE_HIGH>; /* PE5 */
regulator-min-microvolt = <3800000>;
regulator-max-microvolt = <3800000>;
regulator-name = "vcc3v8-usb";
};
reg_vcc5v0_usb: regulator-vcc5v0-usb {
compatible = "regulator-fixed";
enable-active-high;
gpio = <&pio 8 7 GPIO_ACTIVE_HIGH>; /* PI7 */
regulator-min-microvolt = <5000000>;
regulator-max-microvolt = <5000000>;
regulator-name = "vcc5v0-usb";
vin-supply = <&reg_vcc3v8_usb>;
};
};
&gpadc {
#address-cells = <1>;
#size-cells = <0>;
status = "okay";
channel@0 {
reg = <0>;
};
};
&gpio_keys_gamepad {
button-thumbl {
label = "GPIO Thumb Left";
gpios = <&pio 4 8 GPIO_ACTIVE_LOW>; /* PE8 */
linux,input-type = <EV_KEY>;
linux,code = <BTN_THUMBL>;
};
button-thumbr {
label = "GPIO Thumb Right";
gpios = <&pio 4 9 GPIO_ACTIVE_LOW>; /* PE9 */
linux,input-type = <EV_KEY>;
linux,code = <BTN_THUMBR>;
};
};
&ehci1 {
status = "okay";
};
&ohci1 {
status = "okay";
};
&pio {
joy_mux_pin: joy-mux-pin {
pins = "PI0";
function = "gpio_out";
};
};
&usbphy {
usb1_vbus-supply = <&reg_vcc5v0_usb>;
};