Forráskód Böngészése

net: ethernet: ti: am65-cpsw-nuss: enable 10Mbps link speed in rgmii mode

In RGMII mode the 10Mbps link speed is supported only when CPSW2G MAC SL is
configured for External Control ("in band") mode
CPSW_PN_MAC_CONTROL_REG.CTL_EN(18) = 1.

Hence update am65_cpsw_nuss_adjust_link() to follow documentation.

Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Grygorii Strashko 6 éve
szülő
commit
505ce35b17
1 módosított fájl, 3 hozzáadás és 0 törlés
  1. 3 0
      drivers/net/ethernet/ti/am65-cpsw-nuss.c

+ 3 - 0
drivers/net/ethernet/ti/am65-cpsw-nuss.c

@@ -165,6 +165,9 @@ void am65_cpsw_nuss_adjust_link(struct net_device *ndev)
 
 		if (phy->speed == 1000)
 			mac_control |= CPSW_SL_CTL_GIG;
+		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->duplex)
 			mac_control |= CPSW_SL_CTL_FULLDUPLEX;