linux-doc.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next 0/9] net: ethernet backplane support
@ 2020-03-26 13:51 Florinel Iordache
  2020-03-26 13:51 ` [PATCH net-next 1/9] doc: net: add backplane documentation Florinel Iordache
                   ` (8 more replies)
  0 siblings, 9 replies; 43+ messages in thread
From: Florinel Iordache @ 2020-03-26 13:51 UTC (permalink / raw)
  To: davem, netdev, andrew, f.fainelli, hkallweit1, linux
  Cc: devicetree, linux-doc, robh+dt, mark.rutland, kuba, corbet,
	shawnguo, leoyang.li, madalin.bucur, ioana.ciornei, linux-kernel,
	Florinel Iordache

Add support for Ethernet Backplane KR generic driver using link training
(ieee802.3ap/ba standards), equalization algorithms (bee, fixed) and
enable qoriq family of devices

Florinel Iordache (9):
  doc: net: add backplane documentation
  dt-bindings: net: add backplane dt bindings
  net: phy: add support for kr phy connection type
  net: fman: add kr support for dpaa1 mac
  net: dpaa2: add kr support for dpaa2 mac
  net: phy: add backplane kr driver support
  net: phy: enable qoriq backplane support
  net: phy: add bee algorithm for kr training
  arm64: dts: add serdes and mdio description

 .../bindings/net/ethernet-controller.yaml          |    3 +-
 .../devicetree/bindings/net/ethernet-phy.yaml      |   53 +
 Documentation/devicetree/bindings/net/serdes.yaml  |   90 ++
 Documentation/networking/backplane.rst             |  165 ++
 arch/arm64/boot/dts/freescale/fsl-ls1046a.dtsi     |   33 +-
 arch/arm64/boot/dts/freescale/fsl-ls1088a.dtsi     |   97 +-
 arch/arm64/boot/dts/freescale/fsl-ls208xa.dtsi     |  160 +-
 arch/arm64/boot/dts/freescale/fsl-lx2160a.dtsi     |  128 +-
 .../boot/dts/freescale/qoriq-fman3-0-10g-0.dtsi    |    5 +-
 .../boot/dts/freescale/qoriq-fman3-0-10g-1.dtsi    |    5 +-
 drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c   |   10 +-
 drivers/net/ethernet/freescale/fman/mac.c          |   10 +-
 drivers/net/phy/Kconfig                            |    2 +
 drivers/net/phy/Makefile                           |    1 +
 drivers/net/phy/backplane/Kconfig                  |   40 +
 drivers/net/phy/backplane/Makefile                 |   12 +
 drivers/net/phy/backplane/backplane.c              | 1538 +++++++++++++++++++
 drivers/net/phy/backplane/backplane.h              |  262 ++++
 drivers/net/phy/backplane/eq_bee.c                 | 1078 +++++++++++++
 drivers/net/phy/backplane/eq_fixed.c               |   83 +
 drivers/net/phy/backplane/equalization.h           |  282 ++++
 drivers/net/phy/backplane/link_training.c          | 1604 ++++++++++++++++++++
 drivers/net/phy/backplane/link_training.h          |   34 +
 drivers/net/phy/backplane/qoriq_backplane.c        |  442 ++++++
 drivers/net/phy/backplane/qoriq_backplane.h        |   33 +
 drivers/net/phy/backplane/qoriq_serdes_10g.c       |  470 ++++++
 drivers/net/phy/backplane/qoriq_serdes_28g.c       |  533 +++++++
 drivers/net/phy/phylink.c                          |   15 +-
 include/linux/phy.h                                |    6 +-
 29 files changed, 7176 insertions(+), 18 deletions(-)
 create mode 100644 Documentation/devicetree/bindings/net/serdes.yaml
 create mode 100644 Documentation/networking/backplane.rst
 create mode 100644 drivers/net/phy/backplane/Kconfig
 create mode 100644 drivers/net/phy/backplane/Makefile
 create mode 100644 drivers/net/phy/backplane/backplane.c
 create mode 100644 drivers/net/phy/backplane/backplane.h
 create mode 100644 drivers/net/phy/backplane/eq_bee.c
 create mode 100644 drivers/net/phy/backplane/eq_fixed.c
 create mode 100644 drivers/net/phy/backplane/equalization.h
 create mode 100644 drivers/net/phy/backplane/link_training.c
 create mode 100644 drivers/net/phy/backplane/link_training.h
 create mode 100644 drivers/net/phy/backplane/qoriq_backplane.c
 create mode 100644 drivers/net/phy/backplane/qoriq_backplane.h
 create mode 100644 drivers/net/phy/backplane/qoriq_serdes_10g.c
 create mode 100644 drivers/net/phy/backplane/qoriq_serdes_28g.c

-- 
1.9.1


^ permalink raw reply	[flat|nested] 43+ messages in thread
* Re: [PATCH net-next 2/9] dt-bindings: net: add backplane dt bindings
@ 2020-03-27 19:18 Ioana Ciornei
  2020-03-27 19:49 ` Russell King - ARM Linux admin
  0 siblings, 1 reply; 43+ messages in thread
From: Ioana Ciornei @ 2020-03-27 19:18 UTC (permalink / raw)
  To: Russell King - ARM Linux admin, Florinel Iordache
  Cc: Andrew Lunn, davem, netdev, f.fainelli, hkallweit1, devicetree,
	linux-doc, robh+dt, mark.rutland, kuba, corbet, shawnguo, Leo Li,
	Madalin Bucur (OSS),
	linux-kernel


> Subject: Re: [PATCH net-next 2/9] dt-bindings: net: add backplane dt
> bindings
> 
> On Fri, Mar 27, 2020 at 03:00:22PM +0000, Florinel Iordache wrote:
> > > On Thu, Mar 26, 2020 at 03:51:15PM +0200, Florinel Iordache wrote:
> > > > Add ethernet backplane device tree bindings
> > >
> > > > +  - |
> > > > +    /* Backplane configurations for specific setup */
> > > > +    &mdio9 {
> > > > +        bpphy6: ethernet-phy@0 {
> > > > +            compatible = "ethernet-phy-ieee802.3-c45";
> > > > +            reg = <0x0>;
> > > > +            lane-handle = <&lane_d>; /* use lane D */
> > > > +            eq-algorithm = "bee";
> > > > +            /* 10G Short cables setup: up to 30 cm cable */
> > > > +            eq-init = <0x2 0x5 0x29>;
> > > > +            eq-params = <0>;
> > > > +        };
> > > > +    };
> > >
> > > So you are modelling this as just another PHY? Does the driver get
> > > loaded based on the PHY ID in registers 2 and 3? Does the standard
> > > define these IDs or are they vendor specific?
> > >
> > > Thanks
> > >         Andrew
> >
> > Hi Andrew,
> > Thank you all for the feedback.
> > I am currently working to address the entire feedback received so far
> > for this new Backplane driver.
> >
> > Yes, we are modelling backplane driver as a phy driver.
> 
> I think we need to think very carefully about that, and consider whether that
> really is a good idea.  phylib is currently built primarily around copper PHYs,
> although there are some which also support fiber as well in weird "non-
> standard" forms.
> 
> What worries me is the situation which I've been working on, where we want
> access to the PCS PHYs, and we can't have the PCS PHYs represented as a phylib
> PHY because we may have a copper PHY behind the PCS PHY, and we want to be
> talking to the copper PHY in the first instance (the PCS PHY effectively becomes
> a slave to the copper PHY.)
> 

We should think about the case when the PCS is the only transceiver on the local
board, as is happening in the backplane case, and the Ethernet driver does not
support phylink but rather phylib. By suggesting to not register the PCS with
phylib, you're effectively implying that the interface should operate as a fixed-link.
This PCS is shared for DPAA1 and DPAA2, and only one of those drivers uses phylink.

> My worry is that we're ending up with conflicting implementations for the same
> hardware which may only end up causing problems down the line.
> 
> Please can you look at my DPAA2 PCS series which has been previously posted to
> netdev -

I had a go today with your DPAA2 PCS patches and tried to see how one could
extend your approach in order to use it in combination with quad PCSs.

As I mentioned yesterday, in case of QSGMII all the 4 PCSs sit on the first MAC's
internal MDIO. This leads to an error in probing the second MAC from the group
of 4 since the mdio_device_register() will fail when trying with the same internal
MDIO bus the second time.

I cannot see how this limitation can be overcome going forward if we still pass the
entire internal MDIO bus as a handle, as you are doing, and not just the specific
PCS node as the current patch set is proposing.

> it's rather difficult to work out who in NXP should be copied, because
> that information is not visible to those of us in the community - we only find that
> out after someone inside NXP posts patches, and even then the MAINTAINERS
> file doesn't seem to get updated.
> 
> It's also worth mentioning that on other SoCs, such as Marvell SoCs, the serdes
> and "PCS" are entirely separate hardware blocks, and the implementation in the
> kernel, which works very well, is to use the drivers/phy for the serdes/comphy as
> they call it, and the ethernet driver binds to the comphy to control the serdes
> settings, whereas the ethernet driver looks after the PCS.  I haven't been able to
> look at your code enough yet to work out if that would be possible.
> 
> I also wonder whether we want a separate class of MDIO device for PCS PHYs,
> just as we have things like DSA switches implemented entirely separately from
> phylib - they're basically different sub- classes of a mdio device.
> 
> I think we have around 20 or so weeks to hash this out, since it's clear that the
> 10gbase-kr (10GKR) phy interface mode can't be used until we've eliminated it
> from existing dts files.
> 
> > The driver is loaded based on PHY ID in registers 2 and 3 which are
> > specified by the standard but it is a vendor specific value:
> > 32-Bit identifier composed of the 3rd through 24th bits of the
> > Organizationally Unique Identifier (OUI) assigned to the device
> > manufacturer by the IEEE, plus a six-bit model number, plus a four-bit
> > revision number.
> > This is done in the device specific code and not in backplane generic
> > driver.
> > You can check support for QorIQ devices where qoriq_backplane_driver
> > is registered as a phy_driver:
> >
> > @file: qoriq_backplane.c
> > +static struct phy_driver qoriq_backplane_driver[] = {
> > +	{
> > +	.phy_id		= PCS_PHY_DEVICE_ID,
> > +	.name		= QORIQ_BACKPLANE_DRIVER_NAME,
> > +	.phy_id_mask	= PCS_PHY_DEVICE_ID_MASK,
> > +	.features       = BACKPLANE_FEATURES,
> > +	.probe          = qoriq_backplane_probe,
> > +	.remove         = backplane_remove,
> > +	.config_init    = qoriq_backplane_config_init,
> > +	.aneg_done      = backplane_aneg_done,
> >
> > Here we register the particular phy device ID/mask and driver name
> > specific for qoriq devices.
> > Also we can use generic routines provided by generic backplane driver
> > if they are suitable for particular qoriq device or otherwise we can
> > use more specialized specific routines like:
> > qoriq_backplane_config_init
> >
> 
> --


^ permalink raw reply	[flat|nested] 43+ messages in thread

end of thread, other threads:[~2020-03-30 15:39 UTC | newest]

Thread overview: 43+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-03-26 13:51 [PATCH net-next 0/9] net: ethernet backplane support Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 1/9] doc: net: add backplane documentation Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 2/9] dt-bindings: net: add backplane dt bindings Florinel Iordache
2020-03-27  1:04   ` Andrew Lunn
2020-03-27 12:06     ` Russell King - ARM Linux admin
2020-03-27 15:00     ` [EXT] " Florinel Iordache
2020-03-27 15:28       ` Russell King - ARM Linux admin
2020-03-27 15:44         ` Andrew Lunn
2020-03-27 17:35           ` Russell King - ARM Linux admin
2020-03-30  5:43             ` Madalin Bucur (OSS)
2020-03-30 15:39   ` Rob Herring
2020-03-26 13:51 ` [PATCH net-next 3/9] net: phy: add kr phy connection type Florinel Iordache
2020-03-27  0:15   ` Andrew Lunn
2020-03-27 12:01     ` Russell King - ARM Linux admin
2020-03-27 12:12       ` Madalin Bucur (OSS)
2020-03-27 12:40         ` Russell King - ARM Linux admin
2020-03-29  8:22     ` [EXT] " Florinel Iordache
2020-03-29  9:01       ` Russell King - ARM Linux admin
2020-03-27  0:32   ` Florian Fainelli
2020-03-26 13:51 ` [PATCH net-next 4/9] net: fman: add kr support for dpaa1 mac Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 5/9] net: dpaa2: add kr support for dpaa2 mac Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 7/9] net: phy: enable qoriq backplane support Florinel Iordache
2020-03-26 20:03   ` Joe Perches
2020-03-26 20:13     ` Andrew Lunn
2020-03-26 20:27       ` Joe Perches
2020-03-26 13:51 ` [PATCH net-next 8/9] net: phy: add bee algorithm for kr training Florinel Iordache
2020-03-26 13:51 ` [PATCH net-next 9/9] arm64: dts: add serdes and mdio description Florinel Iordache
2020-03-27 12:09   ` Russell King - ARM Linux admin
     [not found] ` <1585230682-24417-7-git-send-email-florinel.iordache@nxp.com>
2020-03-26 18:53   ` [PATCH net-next 6/9] net: phy: add backplane kr driver support David Miller
2020-03-26 18:55     ` Joe Perches
2020-03-26 19:07       ` David Miller
2020-03-26 19:42         ` Joe Perches
2020-03-27  1:07   ` Andrew Lunn
2020-03-27 13:02     ` [EXT] " Florinel Iordache
2020-03-27 13:23       ` Andrew Lunn
2020-03-27 17:43     ` Florian Fainelli
2020-03-27 14:22   ` Andrew Lunn
2020-03-27 18:25     ` Joe Perches
2020-03-27 14:28   ` Andrew Lunn
2020-03-27 14:33   ` Andrew Lunn
2020-03-27 14:38   ` Andrew Lunn
2020-03-27 19:18 [PATCH net-next 2/9] dt-bindings: net: add backplane dt bindings Ioana Ciornei
2020-03-27 19:49 ` Russell King - ARM Linux admin

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).