net: dsa: mv88e6xxx: scratch registers and external MDIO pins
authorAndrew Lunn <andrew@lunn.ch>
Thu, 22 Feb 2018 00:51:49 +0000 (01:51 +0100)
committerDavid S. Miller <davem@davemloft.net>
Thu, 22 Feb 2018 19:46:32 +0000 (14:46 -0500)
commit2510babcfaf04d50d69946df31f0e9690c518144
tree86d64f044a21f905ea5c34ab7ea6a4d7d5a71139
parentaa9029479ef3fb88145cad3220e24a110c6ae723
net: dsa: mv88e6xxx: scratch registers and external MDIO pins

MV88E6352 and later switches support GPIO control through the "Scratch
& Misc" global2 register. Two of the pins controlled this way on the
mv88e6390 family are the external MDIO pins. They can either by used
as part of the MII interface for port 0, GPIOs, or MDIO. Add a
function to configure them for MDIO, if possible, and call it when
registering the external MDIO bus.

Suggested-by: Russell King <rmk@armlinux.org.uk>
Signed-off-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/dsa/mv88e6xxx/chip.c
drivers/net/dsa/mv88e6xxx/global2.h
drivers/net/dsa/mv88e6xxx/global2_scratch.c