[PATCH 2/2] phy: sun4i-usb: Assert reset before deasserting in phy init
From: Roadbobek via B4 Relay
Date: Tue Nov 17 2026 - 08:00:53 EST
From: Roadbobek <admin@xxxxxxxxxxxxx>
When a bootloader initializes USB before booting Linux without
first tearing down the controller, phy->reset may already be
deasserted when sun4i_usb_phy_init() runs.
Because reset_control_deassert() alone is a no-op on an
already deasserted reset line, stale USB PHY state can
persist across the bootloader-to-kernel handoff.
Assert phy->reset briefly before deasserting it in
sun4i_usb_phy_init() so the PHY starts cleanly regardless of
prior bootloader USB usage. Tested on an Allwinner A33 Q8
tablet (Laser MID-786).
Signed-off-by: Roadbobek <admin@xxxxxxxxxxxxx>
---
drivers/phy/allwinner/phy-sun4i-usb.c | 2 ++
1 file changed, 2 insertions(+)
diff --git a/drivers/phy/allwinner/phy-sun4i-usb.c b/drivers/phy/allwinner/phy-sun4i-usb.c
index f26eed0db17e..05e6dcf035a1 100644
--- a/drivers/phy/allwinner/phy-sun4i-usb.c
+++ b/drivers/phy/allwinner/phy-sun4i-usb.c
@@ -270,6 +270,8 @@ static int sun4i_usb_phy_init(struct phy *_phy)
return ret;
}
+ reset_control_assert(phy->reset);
+ usleep_range(10, 20);
ret = reset_control_deassert(phy->reset);
if (ret) {
clk_disable_unprepare(phy->clk2);
--
2.53.0