RE: [PATCH v2 2/3] phy: add AST2700 usb3.2 phy driver
From: Ryan Chen
Date: Wed Jul 22 2026 - 03:17:14 EST
> Subject: Re: [PATCH v2 2/3] phy: add AST2700 usb3.2 phy driver
>
> On Wed, 2026-07-15 at 05:55 +0000, Ryan Chen wrote:
> >
> > >
> > > > + }
> > > > +
> > > > + /* Wait for USB3 PHY internal SRAM initialization done */
> > > > + ret = readl_poll_timeout(aspeed_phy->regs + PHY3S00, val,
> > > > + val & PHY3S00_INIT_DONE,
> > > > + USEC_PER_MSEC, 10 * USEC_PER_MSEC);
> > > > + if (ret) {
> > > > + dev_err(aspeed_phy->dev, "SRAM init timeout\n");
> > > > + goto err_assert_reset;
> > > > + }
> > > > +
> > > > + val = readl(aspeed_phy->regs + PHY3S00);
> > > > + val |= PHY3S00_SRAM_BYPASS;
> > > > + writel(val, aspeed_phy->regs + PHY3S00);
> > >
> > > According to the datasheet PHY3S00[15] (PHY3S00_INIT_DONE above)
> > > indicates that the PHY internal SRAM initialisation is complete. The
> > > datasheet reports the SRAM is used for configuration of calibration among
> other things.
> > > PHY3S00[6] instructs the PHY that software has completed loading the
> > > configuration data into SRAM, however PHY3S00_SRAM_BYPASS
> > > (PHY3S00[7]) tells the PHY to load configuration from "hard wired" values.
> > >
> > > Is it necessary to wait for SRAM initialisation to complete if we're
> bypassing it?
> > > Or are there other side-effects involved in the setting of PHY3S00[15]?
> >
> > Yes, it is necessary to wait SRAM initial, the driver polls PHY3S00[15].
> > It reports that the boot loader in the PCS has finished initialising
> > the SRAM (loading the contents into the PCS), and that initialisation
> > has to complete before sram_bypass (PHY3S00[7]) may be asserted.
> >
>
> Can you improve the comment then to make it clear that the wait is necessary
> despite the bypass?
>
Thanks, will update.