Devicetree
 help / color / mirror / Atom feed
From: Mohd Ayaan Anwar <mohd.anwar@oss.qualcomm.com>
To: Manivannan Sadhasivam <mani@kernel.org>
Cc: Vinod Koul <vkoul@kernel.org>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Bartosz Golaszewski <brgl@kernel.org>,
	linux-arm-msm@vger.kernel.org, linux-phy@lists.infradead.org,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	Lorenzo Bianconi <lorenzo.bianconi@oss.qualcomm.com>,
	Shawn Guo <shengchao.guo@oss.qualcomm.com>,
	Zhangfei Gao <zhangfei.gao@oss.qualcomm.com>
Subject: Re: [PATCH 3/3] phy: qcom: sgmii-eth: add Nord USXGMII support
Date: Thu, 29 Oct 2026 10:13:19 +0530	[thread overview]
Message-ID: <auLO5z9kXDaHl1ka@oss.qualcomm.com> (raw)
In-Reply-To: <179318601645.5872.14222392238387100610.b4-reply@b4>

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@oss.qualcomm.com>
> > ---
> > ...
> >  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


  reply	other threads:[~2026-10-29  4:43 UTC|newest]

Thread overview: 20+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-09-23  0:04 [PATCH 0/3] phy: qcom: sgmii-eth: add Nord USXGMII support Mohd Ayaan Anwar
2026-09-23  0:04 ` [PATCH 1/3] dt-bindings: phy: qcom,sa8775p-dwmac-sgmii-phy: add Nord compatible Mohd Ayaan Anwar
2026-09-25 13:35   ` Lorenzo Bianconi
2026-09-25 13:59   ` Bartosz Golaszewski
2026-09-28 10:16   ` Krzysztof Kozlowski
2026-09-28 10:26     ` Krzysztof Kozlowski
2026-09-28 10:56     ` Mohd Ayaan Anwar
2026-09-28 11:02       ` Krzysztof Kozlowski
2026-09-23  0:04 ` [PATCH 2/3] phy: qcom: sgmii-eth: prepare for additional PHY modes Mohd Ayaan Anwar
2026-09-25 13:49   ` Lorenzo Bianconi
2026-09-23  0:04 ` [PATCH 3/3] phy: qcom: sgmii-eth: add Nord USXGMII support Mohd Ayaan Anwar
2026-09-23  0:12   ` sashiko-bot
2026-09-25 13:59   ` Lorenzo Bianconi
2026-10-28 11:13   ` Manivannan Sadhasivam
2026-10-29  4:43     ` Mohd Ayaan Anwar [this message]
2026-09-23  8:58 ` [PATCH 0/3] " Zhangfei Gao
2026-09-28 10:19   ` Krzysztof Kozlowski
2026-09-29 10:49     ` Zhangfei Gao
2026-09-30  5:16       ` Krzysztof Kozlowski
2026-10-08  4:13         ` Zhangfei Gao

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=auLO5z9kXDaHl1ka@oss.qualcomm.com \
    --to=mohd.anwar@oss.qualcomm.com \
    --cc=brgl@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzk+dt@kernel.org \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-phy@lists.infradead.org \
    --cc=lorenzo.bianconi@oss.qualcomm.com \
    --cc=mani@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=robh@kernel.org \
    --cc=shengchao.guo@oss.qualcomm.com \
    --cc=vkoul@kernel.org \
    --cc=zhangfei.gao@oss.qualcomm.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox