Skip to contentSkip to conversation

rockchip: rk3568: Disable USB3OTG U3 ports early

PATCH Superseded Jonas Karlman 2 participants 4 messages Oct 19, 2025 – Oct 20, 2025

Subsystems (4)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore
#0 lore raw

cover rockchip: rk3568: Disable USB3OTG U3 ports early

This series adopt similar change to the U-Boot rockchip naneng-combphy driver as was included in the Linux commit 7bb14b61b7d0 ("phy: rockchip:
naneng-combphy: Enable U3 OTG port for RK3568").

The Linux commit was merged into v6.18-rc1 and has been backported to v6.17.3, v6.12.53 and v6.6.112.

The first patch in this series should be safe to apply.

However, the second patch may break use of USB 3.0 on RK3568 on Linux kernel prior to version 6.6.112, 6.12.53, 6.17.3 and 6.18-rc1. Because of this I think it may be too soon to have the second patch applied for v2026.01.

Jonas Karlman (2):
phy: rockchip: naneng-combphy: Enable U3 port for USB3OTG on RK3568
rockchip: rk3568: Disable USB3OTG U3 ports early

 arch/arm/mach-rockchip/rk3568/rk3568.c             | 7 +++++++
 drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 8 ++++++++
 2 files changed, 15 insertions(+)
Signature · 1 line
2.51.0
#1 lore raw

PATCH 1/2 phy: rockchip: naneng-combphy: Enable U3 port for USB3OTG on RK3568

The USB OTG U3 port may have been disabled early, add support to the COMBPHY driver to re-enable the U3 port.

This matches changes made in the Linux commit 7bb14b61b7d0 ("phy:
rockchip: naneng-combphy: Enable U3 OTG port for RK3568").

---
 drivers/phy/rockchip/phy-rockchip-naneng-combphy.c | 8 ++++++++
 1 file changed, 8 insertions(+)
drivers/phy/rockchip/phy-rockchip-naneng-combphy.c +8 -0
index d602f965d6aa..82353ae7678c 100644
@@ -399,6 +399,14 @@ static int rk3568_combphy_cfg(struct rockchip_combphy_priv *priv)
 		param_write(priv->phy_grf, &cfg->pipe_txcomp_sel, false);
 		param_write(priv->phy_grf, &cfg->pipe_txelec_sel, false);
 		param_write(priv->phy_grf, &cfg->usb_mode_set, true);
+		switch (priv->id) {
+		case 0:
+			param_write(priv->pipe_grf, &cfg->u3otg0_port_en, true);
+			break;
+		case 1:
+			param_write(priv->pipe_grf, &cfg->u3otg1_port_en, true);
+			break;
+		}
 		break;
 	case PHY_TYPE_SATA:
 		writel(0x41, priv->mmio + 0x38);
Signature · 1 line
2.51.0
#2 lore raw

PATCH 2/2 rockchip: rk3568: Disable USB3OTG U3 ports early

In reply to Jonas Karlman

The RK3568 SoC comes with USB OTG support using a DWC3 controller with a USB2 PHY and a USB3 PHY (COMBPHY).

Some board designs may not use the COMBPHY for USB3 purpose. For these board to use USB OTG the input clock source must change to use UTMI clk instead of PIPE clk.

Change to always disable the USB3OTG U3 ports early and leave it to the COMBPHY driver to re-enable the U3 port when a usb3-phy is described in the board device tree.

Please note that this may break use of USB 3.0 on RK3568 on Linux kernel prior to version 6.6.112, 6.12.53, 6.17.3 and 6.18-rc1.

---
It may be too soon to apply this patch, we should possible give more time for OS to adopt to these changes.

The first patch in this series should however be safe to apply.

---
 arch/arm/mach-rockchip/rk3568/rk3568.c | 7 +++++++
 1 file changed, 7 insertions(+)
arch/arm/mach-rockchip/rk3568/rk3568.c +7 -0
index c2b96902d2dd..560af336be4f 100644
@@ -14,6 +14,9 @@
 #include <dt-bindings/clock/rk3568-cru.h>
 
 #define PMUGRF_BASE			0xfdc20000
+#define PIPE_GRF_BASE			0xfdc50000
+#define USB3OTG0_CON1			0x104
+#define USB3OTG1_CON1			0x144
 #define GRF_BASE			0xfdc60000
 #define GRF_GPIO1B_DS_2			0x218
 #define GRF_GPIO1B_DS_3			0x21c
@@ -139,6 +142,10 @@ int arch_cpu_init(void)
 	/* Enable VO power domain for display */
 	writel((PMU_PD_VO_DWN_ENA << 16),
 	       PMU_BASE_ADDR + PMU_PWR_GATE_SFTCON);
+
+	/* Disable USB3OTG U3 ports, later enabled in COMBPHY driver */
+	writel(0xffff0181, PIPE_GRF_BASE + USB3OTG0_CON1);
+	writel(0xffff0181, PIPE_GRF_BASE + USB3OTG1_CON1);
 #endif
 	return 0;
 }
Signature · 1 line
2.51.0
#3 lore raw

Hi Jonas,

Quoted 14 lines · Jonas Karlman

The RK3568 SoC comes with USB OTG support using a DWC3 controller with a USB2 PHY and a USB3 PHY (COMBPHY).

Some board designs may not use the COMBPHY for USB3 purpose. For these board to use USB OTG the input clock source must change to use UTMI clk instead of PIPE clk.

Change to always disable the USB3OTG U3 ports early and leave it to the COMBPHY driver to re-enable the U3 port when a usb3-phy is described in the board device tree.

Please note that this may break use of USB 3.0 on RK3568 on Linux kernel prior to version 6.6.112, 6.12.53, 6.17.3 and 6.18-rc1.

Quoted 6 lines

---
It may be too soon to apply this patch, we should possible give more time for OS to adopt to these changes.

The first patch in this series should however be safe to apply.

What's the cost of *NOT* applying this? I imagine if the PHY isn't used in the kernel it can be turned off by runtime PM? So would that be only about reducing power consumption while in U-Boot?

It may not be worth it to possibly break devices if we're simply talking about power efficiency for a boot stage that shouldn't last long anyway.

We cannot know what the user will be booting as kernel so there technically is not a safe date when this could be merged.

Cheers,
Quentin