* [PATCH v2 1/3] arm64: dts: mediatek: mt8390-genio-common: Fix type C port mode and connection
2026-11-06 6:06 [PATCH v2 0/3] arm64: dts: mediatek: mt8390-genio-common: USB fixes Chen-Yu Tsai
@ 2026-11-06 6:06 ` Chen-Yu Tsai
2026-11-06 6:22 ` sashiko-bot
2026-11-06 6:06 ` [PATCH v2 2/3] arm64: dts: mediatek: mt8390-genio-common: Split out USB hub enable pin mux Chen-Yu Tsai
2026-11-06 6:06 ` [PATCH v2 3/3] arm64: dts: mediatek: mt8390-genio-common: Fix swapped USB hub labels Chen-Yu Tsai
2 siblings, 1 reply; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-11-06 6:06 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, linux-mediatek, linux-arm-kernel, devicetree
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@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@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@0 {
reg = <0>;
typec_con_hs: endpoint {
- remote-endpoint = <&mtu3_hs1_role_sw>;
+ remote-endpoint = <&usb_2_0_p2>;
};
};
port@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@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@2 {
+ reg = <2>;
+
+ usb_3_0_p2: endpoint {
+ remote-endpoint = <&typec_con_ss>;
+ };
+ };
+ };
};
hub_3_0: hub@2 {
@@ -1563,11 +1562,18 @@ hub_3_0: hub@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@2 {
+ reg = <2>;
+
+ usb_2_0_p2: endpoint {
+ remote-endpoint = <&typec_con_hs>;
+ };
+ };
};
};
};
--
2.56.0.455.g6c5a503b38-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 2/3] arm64: dts: mediatek: mt8390-genio-common: Split out USB hub enable pin mux
2026-11-06 6:06 [PATCH v2 0/3] arm64: dts: mediatek: mt8390-genio-common: USB fixes Chen-Yu Tsai
2026-11-06 6:06 ` [PATCH v2 1/3] arm64: dts: mediatek: mt8390-genio-common: Fix type C port mode and connection Chen-Yu Tsai
@ 2026-11-06 6:06 ` Chen-Yu Tsai
2026-11-06 6:06 ` [PATCH v2 3/3] arm64: dts: mediatek: mt8390-genio-common: Fix swapped USB hub labels Chen-Yu Tsai
2 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-11-06 6:06 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, linux-mediatek, linux-arm-kernel, devicetree
"pins-usb-hub-3v3-en" listed in "usb1-default-pins" is actually the
enable pin for the USB hub's supply regulator.
Split it out as a separate pinmux node attached to the regulator
instead.
Fixes: 7982bf7ec2e3 ("arm64: dts: mediatek: add device-tree for Genio 700 EVK board")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Compile tested only.
---
.../boot/dts/mediatek/mt8390-genio-common.dtsi | 14 +++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index d10ee1603103..63b4af476959 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -216,6 +216,8 @@ touch0_fixed_3v3: regulator-5 {
usb_hub_fixed_3v3: regulator-6 {
compatible = "regulator-fixed";
+ pinctrl-names = "default";
+ pinctrl-0 = <&usb_hub_3v3_pins>;
regulator-name = "vhub_3v3";
regulator-min-microvolt = <3300000>;
regulator-max-microvolt = <3300000>;
@@ -1249,16 +1251,18 @@ pins-vbus {
};
+ usb_hub_3v3_pins: usb-hub-3v3-pins {
+ pins-usb-hub-3v3-en {
+ pinmux = <PINMUX_GPIO112__FUNC_B_GPIO112>;
+ output-high;
+ };
+ };
+
usb1_default_pins: usb1-default-pins {
pins-valid {
pinmux = <PINMUX_GPIO88__FUNC_I0_VBUSVALID_1P>;
input-enable;
};
-
- pins-usb-hub-3v3-en {
- pinmux = <PINMUX_GPIO112__FUNC_B_GPIO112>;
- output-high;
- };
};
usb2_default_pins: usb2-default-pins {
--
2.56.0.455.g6c5a503b38-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread* [PATCH v2 3/3] arm64: dts: mediatek: mt8390-genio-common: Fix swapped USB hub labels
2026-11-06 6:06 [PATCH v2 0/3] arm64: dts: mediatek: mt8390-genio-common: USB fixes Chen-Yu Tsai
2026-11-06 6:06 ` [PATCH v2 1/3] arm64: dts: mediatek: mt8390-genio-common: Fix type C port mode and connection Chen-Yu Tsai
2026-11-06 6:06 ` [PATCH v2 2/3] arm64: dts: mediatek: mt8390-genio-common: Split out USB hub enable pin mux Chen-Yu Tsai
@ 2026-11-06 6:06 ` Chen-Yu Tsai
2 siblings, 0 replies; 5+ messages in thread
From: Chen-Yu Tsai @ 2026-11-06 6:06 UTC (permalink / raw)
To: Matthias Brugger, AngeloGioacchino Del Regno
Cc: Chen-Yu Tsai, linux-mediatek, linux-arm-kernel, devicetree
The TI TUSB8020B USB 3.0 hub on the Genio 510 / 700 EVKs presents
itself as two USB hubs, a USB 3.0 hub with the default PID 0x8025 and
a USB 2.0 hub with PID 0x8027 (the USB 3.0 PID XOR 0x2), as described
in the datasheet.
The hub nodes have the correct compatible strings, and are attached to
the correct XHCI ports (port 1 being SuperSpeed and port 2 being
HighSpeed), but the labels are swapped: the USB 3.0 hub (usb451,8025)
is labeled "hub_2_0", and the USB 2.0 hub (usb451,8027) is labeled
"hub_3_0".
Swap the labels so they match the hubs they are attached to. This
change has no functional impact.
Fixes: 20d959fa6fd0 ("arm64: dts: mediatek: mt8390-genio-700-evk: add keys and USB HUB")
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Changes since v1:
- New patch
Compile tested only.
This patch, including the commit message, was written by an LLM coding
assistant at my request, based on the PID scheme described in the TI
USB8020B datasheet. The PIDs in the datasheet were checked by hand.
---
arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi | 8 ++++----
1 file changed, 4 insertions(+), 4 deletions(-)
diff --git a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
index 63b4af476959..e5c7608dca6b 100644
--- a/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
+++ b/arch/arm64/boot/dts/mediatek/mt8390-genio-common.dtsi
@@ -1539,10 +1539,10 @@ &xhci1 {
#address-cells = <1>;
#size-cells = <0>;
- hub_2_0: hub@1 {
+ hub_3_0: hub@1 {
compatible = "usb451,8025";
reg = <1>;
- peer-hub = <&hub_3_0>;
+ peer-hub = <&hub_2_0>;
reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
vdd-supply = <&usb_hub_fixed_3v3>;
@@ -1560,10 +1560,10 @@ usb_3_0_p2: endpoint {
};
};
- hub_3_0: hub@2 {
+ hub_2_0: hub@2 {
compatible = "usb451,8027";
reg = <2>;
- peer-hub = <&hub_2_0>;
+ peer-hub = <&hub_3_0>;
reset-gpios = <&pio 7 GPIO_ACTIVE_HIGH>;
vdd-supply = <&usb_hub_fixed_3v3>;
--
2.56.0.455.g6c5a503b38-goog
^ permalink raw reply related [flat|nested] 5+ messages in thread