[PATCH v2 13/14] arm64: dts: allwinner: sun60i-a733-cubie-a7s: Enable USB 3.0

Alastair D'Silva alastair at d-silva.org
Sun Nov 29 21:34:08 PST 2026


Enable the DWC3 controller, USB2 PHY, combophy0 orientation switch, and
HUSB311 Type-C controller on the Radxa Cubie A7S. Add the PL2-controlled
5V Type-C VBUS regulator and wire combophy0 to CLDO5.

Signed-off-by: Alastair D'Silva <alastair at d-silva.org>
---
 .../dts/allwinner/sun60i-a733-cubie-a7s.dts   | 85 +++++++++++++++++++
 1 file changed, 85 insertions(+)

diff --git a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
index 98a878a2d739..7be1223d2ef5 100644
--- a/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
+++ b/arch/arm64/boot/dts/allwinner/sun60i-a733-cubie-a7s.dts
@@ -4,7 +4,9 @@
 #include "sun60i-a733.dtsi"
 
 #include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/interrupt-controller/irq.h>
 #include <dt-bindings/leds/common.h>
+#include <dt-bindings/usb/pd.h>
 
 / {
 	model = "Radxa Cubie A7S";
@@ -59,6 +61,16 @@ reg_ps: regulator-ps-output {
 		vin-supply = <&reg_vcc5v0_sys>;
 	};
 
+	reg_vbus_typec: regulator-vbus-typec {
+		compatible = "regulator-fixed";
+		regulator-name = "vbus-typec";
+		regulator-min-microvolt = <5000000>;
+		regulator-max-microvolt = <5000000>;
+		gpios = <&r_pio 0 2 GPIO_ACTIVE_HIGH>; /* PL2 */
+		enable-active-high;
+		vin-supply = <&reg_vcc5v0_sys>;
+	};
+
 	reg_vcc5v0_sys: regulator-vcc5v0-sys {
 		compatible = "regulator-fixed";
 		regulator-name = "vcc5v0-sys";
@@ -68,6 +80,18 @@ reg_vcc5v0_sys: regulator-vcc5v0-sys {
 	};
 };
 
+&combophy0 {
+	phy-supply = <&reg_cldo5>;
+	orientation-switch;
+	status = "okay";
+
+	port {
+		combophy0_typec_ss: endpoint {
+			remote-endpoint = <&typec_con_ss>;
+		};
+	};
+};
+
 &cpu0 {
 	cpu-supply = <&reg_dcdc5>;
 };
@@ -100,6 +124,19 @@ &cpu7 {
 	cpu-supply = <&reg_dcdc3>;
 };
 
+&dwc3 {
+	dr_mode = "otg";
+	usb-role-switch;
+	role-switch-default-mode = "host";
+	status = "okay";
+
+	port {
+		dwc3_typec_hs: endpoint {
+			remote-endpoint = <&typec_con_hs>;
+		};
+	};
+};
+
 &hosc {
 	clock-frequency = <26000000>;
 };
@@ -315,6 +352,50 @@ reg_swout2: swout2 {
 	};
 };
 
+&r_i2c1 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&r_i2c1_pl_pins>;
+	status = "okay";
+
+	typec-portc at 4e {
+		compatible = "hynetek,husb311", "richtek,rt1711h";
+		reg = <0x4e>;
+		interrupt-parent = <&r_pio>;
+		interrupts = <0 3 IRQ_TYPE_LEVEL_LOW>; /* PL3 */
+		vbus-supply = <&reg_vbus_typec>;
+
+		connector {
+			compatible = "usb-c-connector";
+			label = "USB-C";
+			data-role = "dual";
+			power-role = "source";
+			source-pdos = <PDO_FIXED(5000, 1500,
+						 PDO_FIXED_USB_COMM | PDO_FIXED_DATA_SWAP)>;
+
+			ports {
+				#address-cells = <1>;
+				#size-cells = <0>;
+
+				port at 0 {
+					reg = <0>;
+
+					typec_con_hs: endpoint {
+						remote-endpoint = <&dwc3_typec_hs>;
+					};
+				};
+
+				port at 1 {
+					reg = <1>;
+
+					typec_con_ss: endpoint {
+						remote-endpoint = <&combophy0_typec_ss>;
+					};
+				};
+			};
+		};
+	};
+};
+
 &r_pio {
 	/* PL powers the PMIC bus itself; firmware must keep ALDO1 enabled. */
 	vcc-pm-supply = <&reg_aldo1>;
@@ -326,6 +407,10 @@ &rtc {
 	clock-names = "bus", "hosc", "ahb", "ext-osc32k";
 };
 
+&u2phy {
+	status = "okay";
+};
+
 &uart0 {
 	pinctrl-names = "default";
 	pinctrl-0 = <&uart0_pb_pins>;
-- 
2.53.0




More information about the linux-arm-kernel mailing list