Re: [PATCH 3/3] phy: qcom: sgmii-eth: add Nord USXGMII support
From: Mohd Ayaan Anwar
Date: Thu Oct 29 2026 - 00:43:51 EST
On Wed, Oct 28, 2026 at 04:43:36PM +0530, Manivannan Sadhasivam wrote:
> On 2026-09-23 05:34 +0530, Mohd Ayaan Anwar wrote:
> > Nord uses a QMP v7 SerDes block which is an updated version of the
> > SGMII SerDes PHY IP.
> >
> > The SGMII SerDes PHY supports multiple operating modes by programming
> > different SerDes line rates. The driver currently handles SGMII and
> > 2500BASE-X configurations only.
> >
> > Add support for configuring the SerDes to operate at 10.3125 Gbaud,
> > enabling both USXGMII and 10GBASE-R PHY interface modes. Finally, add a
> > driver compatible for Nord.
> >
> > Select USXGMII as the initial interface mode for Nord. phy_power_on()
> > can run before the consumer calls set_mode(), so this ensures that the
> > first calibration selects the 10.3125 Gbaud programming sequence.
> >
> > Signed-off-by: Mohd Ayaan Anwar <mohd.anwar@xxxxxxxxxxxxxxxx>
> > ---
> > ...
> > static int qcom_dwmac_sgmii_phy_calibrate(struct phy *phy)
> > {
> > struct qcom_dwmac_sgmii_phy_data *data = phy_get_drvdata(phy);
> > @@ -275,16 +419,19 @@ static int qcom_dwmac_sgmii_phy_calibrate(struct phy *phy)
> > case PHY_INTERFACE_MODE_1000BASEX:
> > /* 1.25Gbps mode */
> > qcom_dwmac_sgmii_phy_init_1g(data->regmap);
> > - break;
> > + return qcom_dwmac_sgmii_phy_poll_sgmii_ready(dev, data->regmap);
> > case PHY_INTERFACE_MODE_2500BASEX:
> > /* 3.125Gbps mode */
> > qcom_dwmac_sgmii_phy_init_2p5g(data->regmap);
> > - break;
> > + return qcom_dwmac_sgmii_phy_poll_sgmii_ready(dev, data->regmap);
> > + case PHY_INTERFACE_MODE_USXGMII:
> > + case PHY_INTERFACE_MODE_10GBASER:
> > + /* 10.3125Gbps mode */
> > + qcom_dwmac_sgmii_phy_init_10g(data->regmap);
> > + return qcom_dwmac_sgmii_phy_poll_usxgmii_ready(dev, data->regmap);
> > default:
> > return -EINVAL;
> > }
> > -
> > - return qcom_dwmac_sgmii_phy_poll_sgmii_ready(dev, data->regmap);
> > }
> >
> > static int qcom_dwmac_sgmii_phy_power_on(struct phy *phy)
> > @@ -340,7 +487,9 @@ static int qcom_dwmac_sgmii_phy_validate(struct phy *phy, enum phy_mode mode,
> >
> > if (submode == PHY_INTERFACE_MODE_SGMII ||
> > submode == PHY_INTERFACE_MODE_1000BASEX ||
> > - submode == PHY_INTERFACE_MODE_2500BASEX)
> > + submode == PHY_INTERFACE_MODE_2500BASEX ||
> > + submode == PHY_INTERFACE_MODE_USXGMII ||
> > + submode == PHY_INTERFACE_MODE_10GBASER)
>
> So the driver supports all these modes for all platforms? The commit message
> sounds like only Nord supports USXGMII and 10GBASER.
>
That is a valid point and something I have been working on for v2
(Sashiko also raised concerns about the possibility of the existing
platform using the offsets/programming sequences intended for Nord).
Going through the programming guide, the existing SA8775p PHY (QMP v5)
only supports SGMII/1000BASE-X/2500BASE-X whereas Nord (QMP v7)
supports SGMII/1000BASE-X/2500BASE-X/USXGMII/10GBASE-R. Therefore, we
need something like a supported_interfaces check for each platform.
Ayaan