]> git.baikalelectronics.ru Git - kernel.git/commit
dpaa2-eth: add MAC/PHY support through phylink
authorIoana Ciornei <ioana.ciornei@nxp.com>
Wed, 30 Oct 2019 23:18:31 +0000 (01:18 +0200)
committerDavid S. Miller <davem@davemloft.net>
Thu, 31 Oct 2019 21:19:45 +0000 (14:19 -0700)
commitb96dc6eb861b1db760d9e699bf0afadd8e7b099c
treea8f14abd6236be20867f758535c1f820696bebd0
parenta4db76504fbfd277a0f13fd786226e65241deb8a
dpaa2-eth: add MAC/PHY support through phylink

The dpaa2-eth driver now has support for connecting to its associated
PHY device found through standard OF bindings.

This happens when the DPNI object (that the driver probes on) gets
connected to a DPMAC. When that happens, the device tree is looked up by
the DPMAC ID, and the associated PHY bindings are found.

The old logic of handling the net device's link state by hand still
needs to be kept, as the DPNI can be connected to other devices on the
bus than a DPMAC: other DPNI, DPSW ports, etc. This logic is only
engaged when there is no DPMAC (and therefore no phylink instance)
attached.

The MC firmware support multiple type of DPMAC links: TYPE_FIXED,
TYPE_PHY. The TYPE_FIXED mode does not require any DPMAC management from
Linux side, and as such, the driver will not handle such a DPMAC.

Although PHYLINK typically handles SFP cages and in-band AN modes, for
the moment the driver only supports the RGMII interfaces found on the
LX2160A. Support for other modes will come later.

Signed-off-by: Ioana Ciornei <ioana.ciornei@nxp.com>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
MAINTAINERS
drivers/net/ethernet/freescale/dpaa2/Makefile
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-eth.h
drivers/net/ethernet/freescale/dpaa2/dpaa2-ethtool.c
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.c [new file with mode: 0644]
drivers/net/ethernet/freescale/dpaa2/dpaa2-mac.h [new file with mode: 0644]
drivers/net/ethernet/freescale/dpaa2/dpmac-cmd.h [new file with mode: 0644]
drivers/net/ethernet/freescale/dpaa2/dpmac.c [new file with mode: 0644]
drivers/net/ethernet/freescale/dpaa2/dpmac.h [new file with mode: 0644]