Commit 0c72c50f authored by John Crispin's avatar John Crispin Committed by David S. Miller

net-next: mediatek: add fixed-phy support

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: default avatarAndrew Lunn <andrew@lunn.ch>
Signed-off-by: default avatarJohn Crispin <john@phrozen.org>
Signed-off-by: default avatarDavid S. Miller <davem@davemloft.net>
parent 08ef55c6
...@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac) ...@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac)
u32 val, ge_mode; u32 val, ge_mode;
np = of_parse_phandle(mac->of_node, "phy-handle", 0); 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) if (!np)
return -ENODEV; return -ENODEV;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment