[PATCH v2 1/3] arm64: dts: mediatek: mt8390-genio-common: Fix type C port mode and connection
Chen-Yu Tsai
wenst at chromium.org
Thu Nov 5 22:06:18 PST 2026
The USB controller complex ssusb1 and xhci1 operate in host mode only,
as it is immediately connected to a USB hub. The user manual has a block
diagram showing this, and a USB usage table showing port 1 as "host
only".
The block diagrams for both the Genio 700 EVK and the Genio 510 EVK
show that the type C port's USB 2.0 data lines are connected to the
USB hub's second downstream port directly, while its USB 3.x data lines
go through the USB 3.1 / DP mux to the same hub port. The type C port's
VBUS is supplied by a 5V 1A boost converter and current limiter. The
port cannot sink power; the charger input is on a separate type C
connector.
Change the controller's operating mode to "host", and drop the USB role
switch property. Fix the USB type C port data line connections to go
through the USB hub. The TI TUSB8020B's USB 3.0 hub uses PID 0x8025,
and the USB 2.0 hub uses PID 0x8027, so the SuperSpeed lines connect to
the former and the HighSpeed lines to the latter.
Change the type C port to a source-only, host-only port. Drop the sink
related properties, and limit the source PDO to 5V 1A, matching the
hardware. Also drop the dual role and data swap flags from the source
PDO, since the port supports neither.
Fixes: 1afaeca17238 ("arm64: dts: mediatek: mt8390-genio-700: Add USB, TypeC Controller, MUX")
Signed-off-by: Chen-Yu Tsai <wenst at chromium.org>
---
Changes since v1:
- Switched type C port to source-only, and dropped sink related
properties (Sashiko)
- Limited source PDO to 5V 1A, matching the hardware, and dropped dual
role and data swap flags
- Fixed swapped SuperSpeed / HighSpeed connections to the USB hubs
- Expanded commit message with details from the Genio 700 / 510 EVK
block diagrams
Compile tested only.
The v2 changes were done with the help of an LLM coding assistant:
the source-only connector and PDO changes, the swapped hub endpoint
fix, most of the expanded commit message, and these notes. The input
was Sashiko's review, the TI USB8020B datasheet and the Genio 510 / 700
EVK block diagrams. The PIDs in the datasheet and the block diagrams
were checked by hand.
This patch depends on "dt-bindings: usb: ti,usb8041: Fold in TI
USB8020B" [1] to allow graph ports under the TI USB8020B hub nodes.
The downstream port number of the USB hub is based on the order shown
in the block diagram. I don't have a board or the schematics to confirm
this.
The hub_2_0 and hub_3_0 labels are swapped relative to the actual hubs
(usb451,8025 is the USB 3.0 hub). This is fixed in a separate patch.
[1] https://lore.kernel.org/all/20261103095425.3097720-1-wenst@chromium.org/
---
.../dts/mediatek/mt8390-genio-common.dtsi | 54 ++++++++++---------
1 file changed, 30 insertions(+), 24 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index 669eaec662f3..d10ee1603103 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -512,18 +512,11 @@ rt1715 at 4e {
connector {
compatible = "usb-c-connector";
label = "USB-C";
- data-role = "dual";
- op-sink-microwatt = <10000000>;
- power-role = "dual";
- try-power-role = "sink";
+ data-role = "host";
+ power-role = "source";
pd-revision = /bits/ 8 <0x03 0x00 0x01 0x08>;
- sink-pdos = <PDO_FIXED(5000, 2000,
- PDO_FIXED_DUAL_ROLE |
- PDO_FIXED_DATA_SWAP)>;
- source-pdos = <PDO_FIXED(5000, 2000,
- PDO_FIXED_DUAL_ROLE |
- PDO_FIXED_DATA_SWAP)>;
+ source-pdos = <PDO_FIXED(5000, 1000, 0)>;
altmodes {
displayport {
@@ -539,14 +532,14 @@ ports {
port at 0 {
reg = <0>;
typec_con_hs: endpoint {
- remote-endpoint = <&mtu3_hs1_role_sw>;
+ remote-endpoint = <&usb_2_0_p2>;
};
};
port at 1 {
reg = <1>;
typec_con_ss: endpoint {
- remote-endpoint = <&xhci_ss_ep>;
+ remote-endpoint = <&usb_3_0_p2>;
};
};
@@ -1528,19 +1521,12 @@ &xhci0 {
};
&ssusb1 {
- dr_mode = "otg";
- usb-role-switch;
+ dr_mode = "host";
wakeup-source;
vusb33-supply = <&mt6359_vusb_ldo_reg>;
pinctrl-0 = <&usb1_default_pins>;
pinctrl-names = "default";
status = "okay";
-
- port {
- mtu3_hs1_role_sw: endpoint {
- remote-endpoint = <&typec_con_hs>;
- };
- };
};
&xhci1 {
@@ -1555,6 +1541,19 @@ hub_2_0: hub at 1 {
peer-hub = <&hub_3_0>;
reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
vdd-supply = <&usb_hub_fixed_3v3>;
+
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 2 {
+ reg = <2>;
+
+ usb_3_0_p2: endpoint {
+ remote-endpoint = <&typec_con_ss>;
+ };
+ };
+ };
};
hub_3_0: hub at 2 {
@@ -1563,11 +1562,18 @@ hub_3_0: hub at 2 {
peer-hub = <&hub_2_0>;
reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
vdd-supply = <&usb_hub_fixed_3v3>;
- };
- port {
- xhci_ss_ep: endpoint {
- remote-endpoint = <&typec_con_ss>;
+ ports {
+ #address-cells = <1>;
+ #size-cells = <0>;
+
+ port at 2 {
+ reg = <2>;
+
+ usb_2_0_p2: endpoint {
+ remote-endpoint = <&typec_con_hs>;
+ };
+ };
};
};
};
--
2.56.0.455.g6c5a503b38-goog
More information about the Linux-mediatek
mailing list