OSDN Git Service

net: ftgmac100: Add support for DT phy-handle property
authorAndrew Jeffery <andrew@aj.id.au>
Wed, 31 Jul 2019 05:39:58 +0000 (15:09 +0930)
committerDavid S. Miller <davem@davemloft.net>
Sat, 3 Aug 2019 00:56:28 +0000 (17:56 -0700)
commit39bfab8844a0fabea812f99dc6aa88734323a920
tree49a4f1cdc1646dbb171b26cb2f7e010948bdfe43
parentf160e99462c68ab5b9e2b9097a4867459730b49a
net: ftgmac100: Add support for DT phy-handle property

phy-handle is necessary for the AST2600 which separates the MDIO
controllers from the MAC.

I've tried to minimise the intrusion of supporting the AST2600 to the
FTGMAC100 by leaving in place the existing MDIO support for the embedded
MDIO interface. The AST2400 and AST2500 continue to be supported this
way, as it avoids breaking/reworking existing devicetrees.

The AST2600 support by contrast requires the presence of the phy-handle
property in the MAC devicetree node to specify the appropriate PHY to
associate with the MAC. In the event that someone wants to specify the
MDIO bus topology under the MAC node on an AST2400 or AST2500, the
current auto-probe approach is done conditional on the absence of an
"mdio" child node of the MAC.

Signed-off-by: Andrew Jeffery <andrew@aj.id.au>
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/faraday/ftgmac100.c