ramips: net/mediatek disable eee
This fix link down/up issue, which happens when connecting to 100Mbit switch Refer: https://git.openwrt.org/?p=openwrt/svn-archive/archive.git;a=blob;f=target/linux/mediatek/patches/0063-arm-mediatek-add-SDK-ethernet.patch;h=7263bb21816b36733b561b749de589d4b010d718;hb=d8804dd309b0a1701c8ebe0a26d700745df24f11#l14003 Signed-off-by: Chen Minqiang <ptpt52@gmail.com>
This commit is contained in:
parent
1e46eec35e
commit
6b28e5eba2
@ -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);
|
||||
|
||||
Loading…
Reference in New Issue
Block a user