Skip to content

Commit

Permalink
net-next: mediatek: add fixed-phy support
Browse files Browse the repository at this point in the history
The MT7623 SoC has a builtin gigabit switch. If we want to use it, GMAC1
needs to be configured using a fixed link speed and flow control settings.
The easiest way to do this is to used the fixed-phy driver, allowing us to
reuse the existing mdio polling code to setup the MAC.

Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: John Crispin <john@phrozen.org>
Signed-off-by: David S. Miller <davem@davemloft.net>
  • Loading branch information
John Crispin authored and David S. Miller committed Jun 3, 2016
1 parent 08ef55c commit 0c72c50
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions drivers/net/ethernet/mediatek/mtk_eth_soc.c
Original file line number Diff line number Diff line change
Expand Up @@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac)
u32 val, ge_mode;

np = of_parse_phandle(mac->of_node, "phy-handle", 0);
if (!np && of_phy_is_fixed_link(mac->of_node))
if (!of_phy_register_fixed_link(mac->of_node))
np = of_node_get(mac->of_node);
if (!np)
return -ENODEV;

Expand Down

0 comments on commit 0c72c50

Please sign in to comment.