ramips: mt7620: Enable PHY aneg of Lava LR-25G001
authorPawel Dembicki <paweldembicki@gmail.com>
Mon, 29 Nov 2021 12:56:49 +0000 (13:56 +0100)
committerChristian Lamparter <chunkeey@gmail.com>
Fri, 3 Dec 2021 23:36:47 +0000 (00:36 +0100)
commita82fa5bcd4817339f5eb75cbeb49e1ab6d30d50e
treec86af5164772740bf476e5597c404d25fc8c333f
parentd641a604789ac604b01b9a7b408614e1cb74c700
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>
target/linux/ramips/dts/mt7620a_lava_lr-25g001.dts
target/linux/ramips/mt7620/base-files/etc/board.d/02_network