ramips: net/mediatek disable eee

This disable eee for mt7530 ports, it causes the link down/up
issue, which happens when connecting to 100Mbit switch

Fixes: FS#1449

Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
This commit is contained in:
Chen Minqiang 2020-03-19 16:00:23 +08:00 committed by CN_SZTL
parent 8f1f2afc00
commit 82cc584e7a
No known key found for this signature in database
GPG Key ID: 6850B6345C862176

View File

@ -186,6 +186,22 @@ static void mt7621_hw_init(struct mt7620_gsw *gsw, struct device_node *np)
mt7530_mdio_w32(gsw, 0x7a74, 0x44);
mt7530_mdio_w32(gsw, 0x7a7c, 0x44);
/* Disable EEE */
for (i = 0; i <= 4; i++) {
_mt7620_mii_write(gsw, i, 13, 0x7);
_mt7620_mii_write(gsw, i, 14, 0x3C);
_mt7620_mii_write(gsw, i, 13, 0x4007);
_mt7620_mii_write(gsw, i, 14, 0x0);
}
/* Disable EEE 10Base-Te */
for (i = 0; i <= 4; i++) {
_mt7620_mii_write(gsw, i, 13, 0x1f);
_mt7620_mii_write(gsw, i, 14, 0x027b);
_mt7620_mii_write(gsw, i, 13, 0x401f);
_mt7620_mii_write(gsw, i, 14, 0x1177);
}
/* turn on all PHYs */
for (i = 0; i <= 4; i++) {
val = _mt7620_mii_read(gsw, i, 0);