netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Romain Gantois <romain.gantois@bootlin.com>
To: Andrew Lunn <andrew@lunn.ch>
Cc: Heiner Kallweit <hkallweit1@gmail.com>,
	Russell King <linux@armlinux.org.uk>,
	"David S. Miller" <davem@davemloft.net>,
	Eric Dumazet <edumazet@google.com>,
	Jakub Kicinski <kuba@kernel.org>, Paolo Abeni <pabeni@redhat.com>,
	Maxime Chevallier <maxime.chevallier@bootlin.com>,
	Thomas Petazzoni <thomas.petazzoni@bootlin.com>,
	netdev@vger.kernel.org, linux-kernel@vger.kernel.org
Subject: Re: [PATCH net-next 3/3] net: phy: dp83869: Support 1000Base-X SFP modules
Date: Wed, 14 May 2025 14:32:00 +0200	[thread overview]
Message-ID: <10709391.nUPlyArG6x@fw-rgant> (raw)
In-Reply-To: <99c9d8f8-1557-4f90-8762-b04a09cb497c@lunn.ch>

[-- Attachment #1: Type: text/plain, Size: 1571 bytes --]

On Wednesday, 14 May 2025 14:22:48 CEST Andrew Lunn wrote:
> > +static int dp83869_port_configure_serdes(struct phy_port *port, bool
> > enable, +					 phy_interface_t interface)
> > +{
> > +	struct phy_device *phydev = port_phydev(port);
> > +	struct dp83869_private *dp83869;
> > +	int ret;
> > +
> > +	if (!enable)
> > +		return 0;
> > +
> > +	dp83869 = phydev->priv;
> > +
> > +	switch (interface) {
> > +	case PHY_INTERFACE_MODE_1000BASEX:
> > +		dp83869->mode = DP83869_RGMII_1000_BASE;
> > +		break;
> > +	default:
> > +		phydev_err(phydev, "Incompatible SFP module inserted\n");
> > +		return -EINVAL;
> > +	}
> 
> There is also DP83869_RGMII_SGMII_BRIDGE. Can this be used with the
> SERDES? Copper SFPs often want SGMII.

It can definitely be used to support non-DAC copper modules. In fact, I've 
implemented support for these modules locally, but I'm planning to upstream 
this part of the SFP support later, as there is some additional trickiness to 
solve beforehand.

To quickly summarize the issue, non-DAC copper module support requires reading 
autonegotiation results from the downstream PHY and relaying them back to the 
MAC. This requires some kind of stacked PHY support in the kernel, which has 
been in discussion for a while now:

https://lore.kernel.org/all/20241119115136.74297db7@fedora.home/

So as things currently stand, SGMII SFP support in this driver is blocked 
until some kind of generic stacked PHY support is implemented in the kernel.

Thanks,

-- 
Romain Gantois, Bootlin
Embedded Linux and Kernel engineering
https://bootlin.com

[-- Attachment #2: This is a digitally signed message part. --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  reply	other threads:[~2025-05-14 12:56 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-05-14  7:49 [PATCH net-next 0/3] net: phy: dp83869: Support 1Gbps fiber SFP modules Romain Gantois
2025-05-14  7:49 ` [PATCH net-next 1/3] net: phy: dp83869: Restart PHY when configuring mode Romain Gantois
2025-05-14  7:49 ` [PATCH net-next 2/3] net: phy: dp83869: ensure FORCE_LINK_GOOD is cleared Romain Gantois
2025-05-14  7:49 ` [PATCH net-next 3/3] net: phy: dp83869: Support 1000Base-X SFP modules Romain Gantois
2025-05-14  9:01   ` Antoine Tenart
2025-05-14 10:00     ` Romain Gantois
2025-05-14 12:32       ` Andrew Lunn
2025-05-14 12:48         ` Romain Gantois
2025-05-14 12:22   ` Andrew Lunn
2025-05-14 12:32     ` Romain Gantois [this message]
2025-05-14 12:34       ` Andrew Lunn
2025-05-14 12:20 ` [PATCH net-next 0/3] net: phy: dp83869: Support 1Gbps fiber " Maxime Chevallier
2025-05-14 12:53   ` Romain Gantois

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=10709391.nUPlyArG6x@fw-rgant \
    --to=romain.gantois@bootlin.com \
    --cc=andrew@lunn.ch \
    --cc=davem@davemloft.net \
    --cc=edumazet@google.com \
    --cc=hkallweit1@gmail.com \
    --cc=kuba@kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux@armlinux.org.uk \
    --cc=maxime.chevallier@bootlin.com \
    --cc=netdev@vger.kernel.org \
    --cc=pabeni@redhat.com \
    --cc=thomas.petazzoni@bootlin.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;
as well as URLs for NNTP newsgroup(s).