]> git.baikalelectronics.ru Git - kernel.git/commitdiff
net: ethernet: ti: am65-cpsw: fix rmii 100Mbit link mode
authorGrygorii Strashko <grygorii.strashko@ti.com>
Sun, 30 Aug 2020 17:34:32 +0000 (20:34 +0300)
committerDavid S. Miller <davem@davemloft.net>
Mon, 31 Aug 2020 20:06:35 +0000 (13:06 -0700)
In RMII link mode it's required to set bit 15 IFCTL_A in MAC_SL MAC_CONTROL
register to enable support for 100Mbit link speed.

Fixes: e7364a21077b ("net: ethernet: ti: introduce am65x/j721e gigabit eth subsystem driver")
Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: David S. Miller <davem@davemloft.net>
drivers/net/ethernet/ti/am65-cpsw-nuss.c

index cb994f66c3be2328d134a5683e232923509ab636..9baf3f3da91e1ca137637b72328f0a8554782dde 100644 (file)
@@ -174,6 +174,8 @@ void am65_cpsw_nuss_adjust_link(struct net_device *ndev)
                if (phy->speed == 10 && phy_interface_is_rgmii(phy))
                        /* Can be used with in band mode only */
                        mac_control |= CPSW_SL_CTL_EXT_EN;
+               if (phy->speed == 100 && phy->interface == PHY_INTERFACE_MODE_RMII)
+                       mac_control |= CPSW_SL_CTL_IFCTL_A;
                if (phy->duplex)
                        mac_control |= CPSW_SL_CTL_FULLDUPLEX;