-
-
Notifications
You must be signed in to change notification settings - Fork 10.1k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ramips: mt7620: Enable all ports of Lava LR-25G001 #4806
Conversation
@nbriggs |
From what I understood, the PORT STATUS for ports 1 through 5 are automatically set by the switch when it detects link looking at the datasheet for AR8327: setting port status to 0x2b0 sets the bits: there is another bit, 12 which is flow control auto-negotiation which may be more appropriate than having it on by default so you can try bits 9 and 12 only which is 0x1200 Also, I might as well share this small section I added to the wiki, which is a way to print all the registers in kernel log at boot time. For example, I have noticed a difference between which registers are set by Uboot when the boot is interrupted and you upload an initramfs kernel compared to when you let it boot normally from flash. |
564d29e
to
4e831ce
Compare
@mpratt14 |
nice now adjust the title because "ports" can also refer to the SOC RGMII interfaces and internal PHYs maybe like "enable switch PHYs auto-negotiation for Lava ..." |
@@ -175,7 +175,7 @@ ramips_setup_interfaces() | |||
;; | |||
lava,lr-25g001) | |||
ucidef_add_switch "switch0" \ | |||
"1:lan" "2:lan" "3:lan" "4:lan" "5:wan" "0@eth0" | |||
"1:lan:4" "2:lan:3" "3:lan:2" "4:lan:1" "5:wan" "0@eth0" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this change makes it the same as engenius,esr600
at line 140
should remove this block and add the lava board to that instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Done.
In 20b09a2 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: 20b09a2 ("ramips: add support for Lava LR-25G001") [1] openwrt#4806 (comment) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
4e831ce
to
4d82ec0
Compare
Done, thank You. |
In 20b09a2 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: 20b09a2 ("ramips: add support for Lava LR-25G001") [1] #4806 (comment) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Merged. Thanks! |
In 20b09a2 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: 20b09a2 ("ramips: add support for Lava LR-25G001") [1] openwrt/openwrt#4806 (comment) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
In 20b09a2 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: 20b09a2 ("ramips: add support for Lava LR-25G001") [1] openwrt#4806 (comment) Signed-off-by: Pawel Dembicki <paweldembicki@gmail.com>
Without the: I injected the Sitecom WLR-4100 V1 002 in the 21.02 branch and it did not work because the: @nbriggs can you test the 21.02? |
@polex -- it will take me a while to test the 21.02 release -- I have to collect all the necessary bits of hardware/software together again, but I'll report back here when I have done so. |
In 20b09a2 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.
When switch is now ok, let's fix port numeration too.
Fixes: 20b09a2 ("ramips: add support for Lava LR-25G001")
Signed-off-by: Pawel Dembicki paweldembicki@gmail.com