[PATCH] phy: phy-google-usb: reset USB3 PHY before init
Manivannan Sadhasivam
mani at kernel.org
Fri Nov 27 07:47:30 PST 2026
On 2026-11-19 10:47 +0000, André Draszik wrote:
> google_usb3_phy_init() assumes that the PHY is in reset and that the
> Type-C Assist (TCA) block is in its power-on state. Neither is the
> case when the driver probes for the first time on Pixel 10, where the
> boot loader has used USB before: the PHY is out of reset and
> operational (lane0 phystatus is low right away, whereas it takes about
> 12ms for a PHY that really was in reset), and the TCA has been
> switched to USB already (TCA_TCPC reads 0x1).
>
> When the PHY is initialised in that state, the soft reset of the DWC3
> controller hangs in about one out of four boots on blazer (Pixel 10
> Pro, 12 of 50 boots), with DCTL.CSFTRST still set seconds later:
>
> dwc3-google c400000.usb: DWC3 controller soft reset failed.
> dwc3-google c400000.usb: error -ETIMEDOUT: failed to initialize core
>
> In addition, google_usb3_phy_power_on() waits for the TCA to report
> that the transition to 'no connection' has completed. The TCA starts
> that transition by itself after a power-on reset (TCA_TCPC resets to a
> request for it). Without a power-on reset there is no such transition,
> and the wait only succeeds as long as the event is still pending from
> earlier. Just asserting the PHY resets before initialising the PHY is
> therefore not enough: the event was gone in 8 of 32 boots then, and
> powering on the PHY failed with "PoR->NC transition timeout".
>
> So, before initialising the PHY:
> * assert its resets and drop the reference clock request, which is the
> state google_usb3_phy_exit() leaves the PHY in
> * clear the TCA's events and request the transition to 'no
> connection', so that google_usb3_phy_power_on() waits for a
> transition that this initialisation has caused
>
> The resets are kept asserted for 1ms. That is the duration that has
> been tested, not a documented requirement.
>
> With this, USB came up in 20 of 20 boots on blazer, and in 25 of 25
> re-probes of the controller (unbind and bind of dwc3-google).
>
> Fixes: 8c2b331e6327 ("phy: Add USB3 PHY support to Google Tensor SoC USB PHY driver")
> Signed-off-by: André Draszik <andre.draszik at linaro.org>
Reviewed-by: Manivannan Sadhasivam <manivannan.sadhasivam at oss.qualcomm.com>
- Mani
More information about the linux-arm-kernel
mailing list