Commit 998b973 broke 2.5G on WAX206

Nope, that's a separate issue.

I've been compiling weekly and testing, and the last working build was from April 19th. The only changes/commits that could have impacted the 2.5G interface are from April 22nd with the last failed build compiled yesterday.

Edit: failed as in resulting in a non-working 2.5G interface.

Ping @daniel (he authored the commit).

1 Like

I believe dangowrt may have authored it, I could be wrong.

Working build:

In addition to the above, the specific change was to 722-net-phy-realtek-support-switching-between-SGMII-and-.patch (original patch that got multi-gig working on the WAX206):

Please try if this change fixes the problem:

diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
index 3846fabbed..9e877b85f1 100644
--- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
+++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
@@ -204,7 +204,7 @@
 		};
 
 		rtl8221b_phy: ethernet-phy@7 {
-			compatible = "ethernet-phy-id001c.c849";
+			compatible = "ethernet-phy-ieee802.3-c45";
 			reg = <7>;
 			reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>;
 			interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;

It should also then result in working switching from 2500base-x to SGMII and back every time the link speed changes during runtime.

2 Likes

Oh, @daniel is dangowrt :man_facepalming: ... Now I know :smiley:

Compiling and will report back in a bit.. Thanks for the patch,

Cheers

4 Likes

Just flashed and tested, interface is only negotiating a 100/1000Mbps link on 2.5G switch port and is pingable but with no traffic flowing through. It's able to negotiate 1Gbit on 1Gbit switch ports normally with no traffic flow issues.

May I pm you the logs?

Thanks

pingable but no traffic flows through switch sounds very weird, please send logs.

Maybe changing the initial PHY interface mode to 2500Base-X could help. In this way I can confirm it works well on TL-XDR6086 which also uses RTL8221B connected to MT7531 port 5.

diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
index 3846fabbed..9e877b85f1 100644
--- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
+++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
@@ -185,7 +185,7 @@
 					nvmem-cells = <&macaddr_factory_7fffa>;
 					nvmem-cell-names = "mac-address";
 					phy-handle = <&rtl8221b_phy>;
-					phy-mode = "sgmii";
+					phy-mode = "2500base-x";
 					reg = <5>;
 				};
 
@@ -204,7 +204,7 @@
 		};
 
 		rtl8221b_phy: ethernet-phy@7 {
-			compatible = "ethernet-phy-id001c.c849";
+			compatible = "ethernet-phy-ieee802.3-c45";
 			reg = <7>;
 			reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>;
 			interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;

Just shared the logs ... I'll wait for your update on whether to move forward with testing the latest patch.

Thanks!

Yes, please test latest patch assigning 2500base-x initial phy-mode.

No go / same result as before!

A quick correction to the working link when connected to 1Gbit switch ports report I provided earlier - Although the interface negotiates a 1Gbit link, no traffic actually flows at all ... for both cases. Only way to access the router is through ports 1 to 4.

Ah, now the PHY isn't properly detected any more. Probably an older revision of RTL8226B or RTL8221B which doesn't yet fully support Clause-45 MDIO... Please try this patch:

diff --git a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
index 3846fabbed..c686ad8a78 100644
--- a/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
+++ b/target/linux/mediatek/dts/mt7622-netgear-wax206.dts
@@ -185,7 +185,7 @@
 					nvmem-cells = <&macaddr_factory_7fffa>;
 					nvmem-cell-names = "mac-address";
 					phy-handle = <&rtl8221b_phy>;
-					phy-mode = "sgmii";
+					phy-mode = "2500base-x";
 					reg = <5>;
 				};
 
@@ -204,12 +204,13 @@
 		};
 
 		rtl8221b_phy: ethernet-phy@7 {
-			compatible = "ethernet-phy-id001c.c849";
+			compatible = "ethernet-phy-id001c.c849", "ethernet-phy-ieee802.3-c45";
 			reg = <7>;
 			reset-gpios = <&pio 101 GPIO_ACTIVE_LOW>;
 			interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
 			reset-assert-us = <100000>;
 			reset-deassert-us = <100000>;
+			realtek,aldps-enable;
 		};
 	};
 };

If that still doesn't help, please share the output of the following commands, for both speeds, 2.5G and 1G announced by the other end:

  • ethtool wan
  • cat /sys/bus/mdio_bus/devices/mdio-bus:07/phy_interface
  • head /sys/kernel/debug/regmap/mdio-bus:00-port5/registers

It would also be great if you can install mdio-tools and show me the output of

mdio mdio-bus

No go! recompiling again with distclean as mdio-tools was complaining about some mismatch with the installed base.

I also realized I was pinging the router through the wireless network / interface and not through the port which explains why I was not able to access it via the wan port ... so no traffic was passing at all in any of the tests.

I'll update you once I have the outputs you requested.

If you can, I'd also very much appreciate remote access via tmate or such, so I can poke around this PHY a bit more...

1 Like

tmate details shared via pm.

ethtool wan
Settings for wan:
	Supported ports: [ ]
	Supported link modes:   10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	                        2500baseT/Full
	Supported pause frame use: Symmetric Receive-only
	Supports auto-negotiation: No
	Supported FEC modes: Not reported
	Advertised link modes:  10baseT/Half 10baseT/Full
	                        100baseT/Half 100baseT/Full
	                        1000baseT/Full
	Advertised pause frame use: Symmetric Receive-only
	Advertised auto-negotiation: No
	Advertised FEC modes: Not reported
	Link partner advertised link modes:  100baseT/Full
	                                     10000baseT/Full
	                                     2500baseT/Full
	                                     5000baseT/Full
	Link partner advertised pause frame use: No
	Link partner advertised auto-negotiation: Yes
	Link partner advertised FEC modes: Not reported
	Speed: 100Mb/s
	Duplex: Full
	Port: MII
	PHYAD: 7
	Transceiver: external
	Auto-negotiation: on
	Supports Wake-on: d
	Wake-on: d
	Link detected: yes
cat /sys/bus/mdio_bus/devices/mdio-bus:07/phy_interface
2500base-x
head /sys/kernel/debug/regmap/mdio-bus:00-port5/registers
000: 00040140
004: 4d544950
008: 00000020
00c: 00000005
010: 00000c00
014: 00010000
018: 00098968
01c: 00000000
020: 31120004
024: 00000000
mdio mdio-bus
 DEV      PHY-ID  LINK
0x00  0x001cc849  down
0x01  0x00000000  down
0x02  0x00000000  down
0x03  0x00000000  down
0x04  0x00000000  down
0x05  0x00000000  down
0x06  0x00000000  down
0x07  0x001cc849  up
0x08  0x00000000  down
0x09  0x00000000  down
0x0a  0x00000000  down
0x0b  0x00000000  down
0x0c  0x00000000  down
0x0d  0x00000000  down
0x0e  0x00000000  down
0x0f  0x00000000  down
0x10  0x00000000  down
0x11  0x00000000  down
0x12  0x00000000  down
0x13  0x00000000  down
0x14  0x00000000  down
0x15  0x00000000  down
0x16  0x00000000  down
0x17  0x00000000  down
0x18  0x00000000  down
0x19  0x00000000  down
0x1a  0x00000000  down
0x1b  0x00000000  down
0x1c  0x00000000  down
0x1d  0x00000000  down
0x1e  0x00000000  down
0x1f  0x8000ff00  down

sorry, had to update the outputs as the router was connected via lan 4. Corrected output is for WAN.

Thank you!

3 Likes

Awesome, thank you!

SNAPSHOT (r22734) build seems to be working well for my WAX206.

Thanks!

3 Likes

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.