net: fec: fix MDIO bus assignement for dual fec SoC's
Stefan Agner authored
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: default avatarSascha Hauer <s.hauer@pengutronix.de>
Signed-off-by: default avatarStefan Agner <stefan@agner.ch>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
3d125f9c
Name Last commit Last update
..
3com net: typhoon: Remove redundant casts
8390 ne2k-pci: Add pci_disable_device in error handling
adaptec PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
adi net: ethernet: adi: drop owner assignment from platform_drivers
aeroflex net: ethernet: aeroflex: drop owner assignment from platform_drivers
agere et131x: Add PCIe gigabit ethernet driver et131x to drivers/net
allwinner net: sun4i-emac: fix error return code
alteon PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
altera Altera TSE: Add missing phydev
amd Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
apm Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
apple net: ethernet: apple: drop owner assignment from platform_drivers
arc Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/net
atheros alx: fix alx_poll()
broadcom net: Generalize ndo_gso_check to ndo_features_check
brocade net: incorrect use of init_completion fixup
cadence net/at91_ether: prepare and unprepare clock
calxeda net: ethernet: Remove superfluous ether_setup after alloc_etherdev
chelsio cxgb4vf: Initialize mdio_addr before using it
cirrus cirrus: cs89x0: fix time comparison
cisco enic: free all rq buffs when allocation fails
davicom Merge tag 'driver-core-3.19-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
dec uli526x: fix misspelling of current function in string
dlink PCI: Remove DEFINE_PCI_DEVICE_TABLE macro use
emulex net: Generalize ndo_gso_check to ndo_features_check
faraday
freescale
fujitsu
hisilicon
hp
i825xx
ibm
icplus
intel
marvell
mellanox
micrel
microchip
moxa
myricom
natsemi
neterion
nuvoton
nvidia
nxp
octeon
oki-semi
packetengines
pasemi
qlogic
qualcomm
rdc
realtek
renesas
rocker
samsung
seeq
sfc
sgi
silan
sis
smsc
stmicro
sun
tehuti
ti
tile
toshiba
tundra
via
wiznet
xilinx
xircom
xscale
Kconfig
Makefile
dnet.c
dnet.h
ec_bhf.c
ethoc.c
fealnx.c
jme.c
jme.h
korina.c
lantiq_etop.c
netx-eth.c