[openwrt/openwrt] ramips: mt7620: enable autonegotiation for all ports
LEDE Commits
lede-commits at lists.infradead.org
Mon Jun 7 15:41:16 PDT 2021
blocktrron pushed a commit to openwrt/openwrt.git, branch master:
https://git.openwrt.org/0056ffb468f40f34bea006eb889b70c9a4f562e0
commit 0056ffb468f40f34bea006eb889b70c9a4f562e0
Author: Gaspare Bruno <gaspare at anlix.io>
AuthorDate: Wed Jan 13 18:03:39 2021 -0300
ramips: mt7620: enable autonegotiation for all ports
This enables autonegotiation for all ephy ports on probe.
Some devices do not configure the ports, particularly port 4.
Signed-off-by: Gaspare Bruno <gaspare at anlix.io>
[replace magic values ; reword commit message]
Signed-off-by: David Bauer <mail at david-bauer.net>
---
target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c | 1 +
1 file changed, 1 insertion(+)
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
index 451881fc73..0b09814cc8 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c
@@ -171,6 +171,7 @@ static void mt7620_hw_init(struct mt7620_gsw *gsw, int mdio_mode)
for (i = 0; i <= 4; i++) {
val = _mt7620_mii_read(gsw, gsw->ephy_base + i, MII_BMCR);
val &= ~BMCR_PDOWN;
+ val |= BMCR_ANRESTART | BMCR_ANENABLE | BMCR_SPEED100;
_mt7620_mii_write(gsw, gsw->ephy_base + i, MII_BMCR, val);
}
}
More information about the lede-commits
mailing list