Re: [PATCH 0/2] usb/phy: sunxi: Assert reset before deasserting on init

From: Philipp Zabel

Date: Tue Nov 17 2026 - 08:05:02 EST


On Di, 2026-11-17 at 13:00 +0000, Roadbobek via B4 Relay wrote:
> When a bootloader such as U-Boot (for example with
> CONFIG_USB_MUSB_HOST=y) initializes USB host mode and boots Linux
> without stopping USB first, both the MUSB controller and USB0 PHY
> reset lines are already deasserted when Linux probes them.
>
> Because reset_control_deassert() alone is a no-op on an already
> deasserted reset line, stale hardware register state persists across
> boot. On Allwinner A33, MUSB stays wedged in a_wait_bcon with
> DevCtl=0x99, Power=0xf0, and a frozen Frame counter even across
> hot-unplug and replug.
>
> This two-patch series briefly asserts reset before deasserting it in
> both drivers so USB starts cleanly regardless of prior bootloader state:
>
> - Patch 1 asserts glue->rst in sunxi_musb_init().
> - Patch 2 asserts phy->reset in sun4i_usb_phy_init().

While you are at it, could you also replace the
devm_reset_control_get() calls with devm_reset_control_get_exclusive(),
to make it clear the driver requires exclusive access to assert the
resets?

regards
Philipp