aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorGaspare Bruno <gaspare@anlix.io>2021-01-13 18:03:39 -0300
committerDavid Bauer <mail@david-bauer.net>2021-06-08 00:39:18 +0200
commit0056ffb468f40f34bea006eb889b70c9a4f562e0 (patch)
treeee5c80827fbc50aa74f21604ebcecb25ad55874c
parent6a15abbc753ca728d798cec9153fc532fce3791d (diff)
downloadupstream-0056ffb468f40f34bea006eb889b70c9a4f562e0.tar.gz
upstream-0056ffb468f40f34bea006eb889b70c9a4f562e0.tar.bz2
upstream-0056ffb468f40f34bea006eb889b70c9a4f562e0.zip
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@anlix.io> [replace magic values ; reword commit message] Signed-off-by: David Bauer <mail@david-bauer.net>
-rw-r--r--target/linux/ramips/files/drivers/net/ethernet/ralink/gsw_mt7620.c1
1 files changed, 1 insertions, 0 deletions
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);
}
}