RE: [RFC net-next] net: phy: Add basic support for Synopsys XPCS using a PHY driver

From: Jose Abreu
Date: Mon Jan 13 2020 - 09:28:05 EST


From: Russell King - ARM Linux admin <linux@xxxxxxxxxxxxxxx>
Date: Jan/13/2020, 14:18:17 (UTC+00:00)

> On Mon, Jan 13, 2020 at 01:54:28PM +0000, Jose Abreu wrote:
> > From: Andrew Lunn <andrew@xxxxxxx>
> > Date: Jan/13/2020, 13:38:45 (UTC+00:00)
> >
> > > On Mon, Jan 13, 2020 at 02:11:08PM +0100, Jose Abreu wrote:
> > > > Adds the basic support for XPCS including support for USXGMII.
> > >
> > > Hi Jose
> > >
> > > Please could you describe the 'big picture'. What comes after the
> > > XPCS? An SFP? A copper PHY? How in Linux do you combine this PHY and
> > > whatever comes next using PHYLINK?
> > >
> > > Or do only support backplane with this, and the next thing in the line
> > > is the peers XPCS?
> >
> > My current setup is this:
> >
> > Host PC x86 -> PCI -> XGMAC -> XPCS -> SERDES 10G-BASE-R -> QSFP+
> >
> > The only piece that needs configuration besides XGMAC is the XPCS hereby
> > I "called" it a PHY ... Anyway, this is an RFC because I'm not entirely
> > sure about the approach. Hmm ?
>
> I don't seem to have been copied on the original mail, so I'm jumping
> in blind here.

Thanks for the comments. I'll add you in next versions, you can find
original posting at:
- https://patchwork.ozlabs.org/patch/1222133/

> In phylink, the
mac_pcs_get_state() method is supposed to read from
> the PCS - in your case, the XPCS. This wasn't obvious when phylink
> was first submitted, especially as mvneta and mvpp2 don't offer
> 802.3 MDIO compliant PCS interfaces. Hence the recent change in
> naming of that method.

Yes I saw that. The thing is that this is a different and stand-alone
IP. Maybe I can add it into some sort of module library in PHY folder ?

> I've recently suggested a patch to phylink to add a generic helper to
> read the state from a generic 802.3 clause 37 PCS, but I guess that
> won't be sufficient for an XPCS. However, it should give some clues
> if you're intending to use phylink.

This uses Clause 73 for Autoneg. I can add that into PHYLINK core if you
agree.

---
Thanks,
Jose Miguel Abreu