aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGrygorii Strashko <grygorii.strashko@ti.com>2019-09-19 11:16:37 +0300
committerTom Rini <trini@konsulko.com>2019-11-03 09:36:06 -0500
commit60e81d0d2855690347bc479c9c20b4ad5de0b703 (patch)
treeb54f9abd560dfe9001406b3ab61e7140ec0af4ca
parent3b3e8a37d36e7a413bacf560ed138c6680bcb89b (diff)
downloadu-boot-60e81d0d2855690347bc479c9c20b4ad5de0b703.zip
u-boot-60e81d0d2855690347bc479c9c20b4ad5de0b703.tar.gz
u-boot-60e81d0d2855690347bc479c9c20b4ad5de0b703.tar.bz2
net: ti: cpsw: enable 10Mbps link speed support in rgmii mode
According to TRMs the 10Mbps link speed is supported in RGMII only when CPSW2G MAC SL is configured for External Control ("in band") mode CPSW_SL_MACCTRL.EXT_EN(18) = 1. Hence update cpsw_slave_update_link() to follow documentation. [1] https://patchwork.kernel.org/patch/10285239/ Signed-off-by: Grygorii Strashko <grygorii.strashko@ti.com>
-rw-r--r--drivers/net/ti/cpsw.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/drivers/net/ti/cpsw.c b/drivers/net/ti/cpsw.c
index 20ddb44..f0d008f 100644
--- a/drivers/net/ti/cpsw.c
+++ b/drivers/net/ti/cpsw.c
@@ -33,6 +33,7 @@ DECLARE_GLOBAL_DATA_PTR;
#define GIGABITEN BIT(7)
#define FULLDUPLEXEN BIT(0)
#define MIIEN BIT(15)
+#define CTL_EXT_EN BIT(18)
/* DMA Registers */
#define CPDMA_TXCONTROL 0x004
#define CPDMA_RXCONTROL 0x014
@@ -489,6 +490,8 @@ static int cpsw_slave_update_link(struct cpsw_slave *slave,
mac_control |= FULLDUPLEXEN;
if (phy->speed == 100)
mac_control |= MIIEN;
+ if (phy->speed == 10 && phy_interface_is_rgmii(phy))
+ mac_control |= CTL_EXT_EN;
}
if (mac_control == slave->mac_control)