OpenCloudOS-Kernel/drivers/net/ethernet/freescale
Stefan Agner 3d125f9c91 net: fec: fix MDIO bus assignement for dual fec SoC's
On i.MX28, the MDIO bus is shared between the two FEC instances.
The driver makes sure that the second FEC uses the MDIO bus of the
first FEC. This is done conditionally if FEC_QUIRK_ENET_MAC is set.
However, in newer designs, such as Vybrid or i.MX6SX, each FEC MAC
has its own MDIO bus. Simply removing the quirk FEC_QUIRK_ENET_MAC
is not an option since other logic, triggered by this quirk, is
still needed.

Furthermore, there are board designs which use the same MDIO bus
for both PHY's even though the second bus would be available on the
SoC side. Such layout are popular since it saves pins on SoC side.
Due to the above quirk, those boards currently do work fine. The
boards in the mainline tree with such a layout are:
- Freescale Vybrid Tower with TWR-SER2 (vf610-twr.dts)
- Freescale i.MX6 SoloX SDB Board (imx6sx-sdb.dts)

This patch adds a new quirk FEC_QUIRK_SINGLE_MDIO for i.MX28, which
makes sure that the MDIO bus of the first FEC is used in any case.

However, the boards above do have a SoC with a MDIO bus for each FEC
instance. But the PHY's are not connected in a 1:1 configuration. A
proper device tree description is needed to allow the driver to
figure out where to find its PHY. This patch fixes that shortcoming
by adding a MDIO bus child node to the first FEC instance, along
with the two PHY's on that bus, and making use of the phy-handle
property to add a reference to the PHY's.

Acked-by: Sascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: Stefan Agner <stefan@agner.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
2015-01-14 00:27:10 -05:00
..
fs_enet Merge branch 'platform/remove_owner' of git://git.kernel.org/pub/scm/linux/kernel/git/wsa/linux into driver-core-next 2014-11-03 19:53:56 -08:00
Kconfig net/fsl: xgmac_mdio is dependent on OF_MDIO 2014-06-11 15:50:59 -07:00
Makefile gianfar: Remove sysfs stubs for FIFOCFG and stashing 2014-02-18 15:03:02 -05:00
fec.h net: fec: fix MDIO bus assignement for dual fec SoC's 2015-01-14 00:27:10 -05:00
fec_main.c net: fec: fix MDIO bus assignement for dual fec SoC's 2015-01-14 00:27:10 -05:00
fec_mpc52xx.c net: ethernet: freescale: drop owner assignment from platform_drivers 2014-10-20 16:21:07 +02:00
fec_mpc52xx.h drivers/net: fix up stale paths from driver reorg 2012-01-30 12:54:40 -05:00
fec_mpc52xx_phy.c net: fec_mpc52xx_phy: remove unnecessary dev_set_drvdata() 2013-08-21 12:27:04 -07:00
fec_ptp.c net: fec: ptp: fix convergence issue to support LinuxPTP stack 2014-10-15 16:40:11 -04:00
fsl_pq_mdio.c net: ethernet: freescale: drop owner assignment from platform_drivers 2014-10-20 16:21:07 +02:00
gianfar.c Driver core patches for 3.19-rc1 2014-12-14 16:10:09 -08:00
gianfar.h gianfar: Implement PAUSE frame generation support 2014-10-29 14:33:16 -04:00
gianfar_ethtool.c gianfar: Implement PAUSE frame generation support 2014-10-29 14:33:16 -04:00
gianfar_ptp.c net: ethernet: freescale: drop owner assignment from platform_drivers 2014-10-20 16:21:07 +02:00
ucc_geth.c net: ethernet: freescale: drop owner assignment from platform_drivers 2014-10-20 16:21:07 +02:00
ucc_geth.h net: remove skb recycling 2012-10-07 00:40:54 -04:00
ucc_geth_ethtool.c net: get rid of SET_ETHTOOL_OPS 2014-05-13 17:43:20 -04:00
xgmac_mdio.c net/fsl: Add format length modifier to avoid negative values 2014-07-30 19:58:09 -07:00