diff options
author | Pawel Dembicki <paweldembicki@gmail.com> | 2021-11-29 13:56:49 +0100 |
---|---|---|
committer | Christian Lamparter <chunkeey@gmail.com> | 2021-12-04 00:36:47 +0100 |
commit | a82fa5bcd4817339f5eb75cbeb49e1ab6d30d50e (patch) | |
tree | c86af5164772740bf476e5597c404d25fc8c333f /target/linux | |
parent | d641a604789ac604b01b9a7b408614e1cb74c700 (diff) | |
download | upstream-a82fa5bcd4817339f5eb75cbeb49e1ab6d30d50e.tar.gz upstream-a82fa5bcd4817339f5eb75cbeb49e1ab6d30d50e.tar.bz2 upstream-a82fa5bcd4817339f5eb75cbeb49e1ab6d30d50e.zip |
ramips: mt7620: Enable PHY aneg of Lava LR-25G001
In 20b09a2125f5 Lava LR-25G001 router have problem with two inactive
ethernet ports. JBOOT bootloader didn't configure ethernet devices by default.
The same situation was there. It is required to enable all phy ports.
This is fragment of stock bootlog:
switch reg write_athr offset=90, value=2b0
switch reg write_athr offset=8c, value=2b0
switch reg write_athr offset=88, value=2b0
switch reg write_athr offset=84, value=2b0
switch reg write_athr offset=80, value=2b0
This patch adds proper registers configuration ar8337 initvals.
0x2b0 value causes force flow control configuration, 0x1200 was used
instead (flow control config auto-neg with phy). [1]
When switch is now ok, let's fix port numeration too.
Fixes: 20b09a2125f5 ("ramips: add support for Lava LR-25G001")
[1] https://github.com/openwrt/openwrt/pull/4806#issuecomment-982019858
Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Diffstat (limited to 'target/linux')
-rw-r--r-- | target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts | 5 | ||||
-rw-r--r-- | target/linux/ramips/mt7620/base-files/etc/board.d/02_network | 8 |
2 files changed, 6 insertions, 7 deletions
diff --git a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts index b7fa78661e..2c2e485f43 100644 --- a/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts +++ b/target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts @@ -125,6 +125,11 @@ 0x04 0x87300000 /* PORT0 PAD MODE CTRL */ 0x0c 0x00000000 /* PORT6 PAD MODE CTRL */ 0x7c 0x0000007e /* PORT0_STATUS */ + 0x80 0x00001200 /* PORT1_STATUS */ + 0x84 0x00001200 /* PORT2_STATUS */ + 0x88 0x00001200 /* PORT3_STATUS */ + 0x8c 0x00001200 /* PORT4_STATUS */ + 0x90 0x00001200 /* PORT5_STATUS */ 0x94 0x00000000 /* PORT6_STATUS */ >; }; diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network index 7710fbfb3b..2d91911766 100644 --- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network +++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network @@ -138,6 +138,7 @@ ramips_setup_interfaces() "1:lan" "2:lan" "3:lan" "4:lan" "0:wan" "6@eth0" ;; engenius,esr600|\ + lava,lr-25g001|\ sitecom,wlr-4100-v1-002) ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0" @@ -173,13 +174,6 @@ ramips_setup_interfaces() ucidef_add_switch "switch0" \ "1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "0:wan" "6@eth0" ;; - lava,lr-25g001) - ucidef_add_switch "switch0" \ - "1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" - ucidef_add_switch "switch1" \ - "5:lan" "6@eth0" - ucidef_add_switch_attr "switch1" "enable" "false" - ;; lenovo,newifi-y1|\ xiaomi,miwifi-mini) ucidef_add_switch "switch0" \ |