[PATCH] phy: phy-google-usb: reset USB3 PHY before init

RD Babiera rdbabiera at google.com
Tue Dec 1 15:33:49 PST 2026


Hi André,

Thanks for taking the time to track and test this issue.

Adding my observations below:

On Thu, Nov 19, 2026 at 2:47 AM André Draszik <andre.draszik at linaro.org> 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: RD Babiera <rdbabiera at google.com>
Tested-by: RD Babiera <rdbabiera at google.com>

> +
> +       /*
> +        * Request the transition to 'no connection' the TCA does by itself
> +        * after a power-on reset, and clear the events of what happened
> +        * before: google_usb3_phy_power_on() waits for it to complete.
> +        */
> +       reg = readl(gphy->usb3_tca_base + TCA_INTR_STS_OFFSET);
> +       writel(reg, gphy->usb3_tca_base + TCA_INTR_STS_OFFSET);
> +       writel(TCA_TCPC_VALID, gphy->usb3_tca_base + TCA_TCPC_OFFSET);

There is a workaround for warm boot where if TCA_TCPC is not
its reset value (TCA_TCPC_VALID), then it would be fine to skip
the first wait_tca_xa_ack in google_usb3_phy_power_on.

But, since the register value isn't propagated until reset is lifted,
the DBG_ registers in usb3_tca_base are identical to cold boot
during phy_init() and phy_power_on() with this change.

I tested this on your same test cases—validating bootloader into
fastboot as well as unbinding and rebinding dwc3-google with the
power domain held on, and superspeed enumeration recovered in
all cases.

>         reg = readl(gphy->usb3_tca_base + TCA_CTRLSYNCMODE_CFG1_OFFSET);
>         reg &= ~TCA_CTRLSYNCMODE_CFG1_XA_TIMEOUT_VAL;
>         reg |= FIELD_PREP(TCA_CTRLSYNCMODE_CFG1_XA_TIMEOUT_VAL,
>
> ---
> base-commit: 749a4de370409464cf8501ec5b2451df45c84eb4
> change-id: 20261119-lga-usbphy-init-a624836eff26
>
> Best regards,
> --
> André Draszik <andre.draszik at linaro.org>
>

Best,
RD



More information about the linux-arm-kernel mailing list