Re: [PATCH v2 2/2] phy: sun4i-usb: clear SIDDQ before the PHY reset on A733
From: Manivannan Sadhasivam
Date: Fri Nov 27 2026 - 09:05:15 EST
On 2026-11-16 07:55 -0300, Vinicius Pedrosa wrote:
> sun4i_usb_phy_init() deasserts the PHY reset first and clears SIDDQ in
> the PMU HCI_PHY_CTL register afterwards. The order comes from the H3
> support and the reason for it isn't documented.
>
> On a Cubie A7Z (A733), the Wi-Fi module on USB1 sometimes came up
> at full speed on the OHCI companion and failed enumeration with -62.
> This happened in 3 of 40 warm boots with a separate local PHY tuning
> change applied.
>
> With that tuning disabled, the current order failed once in 31 warm
> boots. Clearing SIDDQ before releasing reset had no failures in 60
> warm boots in the same interleaved run, or in 10 cold boots.
> Why the order matters is not understood.
>
> The vendor BSP clears SIDDQ while the PHY is still in reset, in its
> common host path.
>
> Add a config flag for the early clear and set it only for the A733,
> whose config is otherwise the D1 one. The other SoCs keep the current
> order: the manuals don't specify one and they weren't tested.
>
> Signed-off-by: Vinicius Pedrosa <vinicius.eduardo.pedrosa@xxxxxxxxx>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam@xxxxxxxxxxxxxxxx>
- Mani