Skip to content

Commit 0c72c50

Browse files
blogicdavem330
authored andcommitted
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: Andrew Lunn <andrew@lunn.ch> Signed-off-by: John Crispin <john@phrozen.org> Signed-off-by: David S. Miller <davem@davemloft.net>
1 parent 08ef55c commit 0c72c50

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

drivers/net/ethernet/mediatek/mtk_eth_soc.c

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -229,6 +229,9 @@ static int mtk_phy_connect(struct mtk_mac *mac)
229229
u32 val, ge_mode;
230230

231231
np = of_parse_phandle(mac->of_node, "phy-handle", 0);
232+
if (!np && of_phy_is_fixed_link(mac->of_node))
233+
if (!of_phy_register_fixed_link(mac->of_node))
234+
np = of_node_get(mac->of_node);
232235
if (!np)
233236
return -ENODEV;
234237

0 commit comments

Comments
 (0)