I finally identified the cause of the link regression. Unbelievably, (to me, at least) adding a label for the led makes the link work... I did end up fixing the clock issue on the dev branch and bisected (and carefully rebuilt cleanly and without ccache) all commits and then proceeded to further take apart the various changes until only this one line remained. When I apply it to the wip branch the PHYs get link, and without that line they don't. I don't have a good explanation (yet?) as to why that would make a difference but it's hard to argue with the facts.
--- a/target/linux/realtek/dts-5.15/rtl930x.dtsi
+++ b/target/linux/realtek/dts-5.15/rtl930x.dtsi
@@ -102,6 +102,7 @@
pinctrl-0 = <&pinmux_a0_gpio0>;
sys_led: sys-led {
+ label = "green:power";
color = <LED_COLOR_ID_GREEN>;
function = LED_FUNCTION_STATUS;
gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>;
I have since then also modified the bcm84881 driver slightly to accept USXGMII links and to match onto the vendor and product id for my chips (setting compatibles didn't work, but maybe I did it wrong?) and now have working link speed negotiation (up to 1gbit only for now) and link detection in the kernel.
I still can't seem to get any data sent, meaning I'm still stuck with slow ymodem transfers. This is what things look like now:
root@OpenWrt:/# ip l
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:02 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
3: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:03 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
4: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:04 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
5: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:05 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
6: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:06 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
7: lan5@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master switch0 state UP mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:07 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
8: switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:02 brd ff:ff:ff:ff:ff:ff
9: switch0.1@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
link/ether 7e:c2:be:f0:b4:03 brd ff:ff:ff:ff:ff:ff
and
root@OpenWrt:/# ip a
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
link/ether 7e:c2:be:f0:b4:02 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
inet6 fe80::7cc2:beff:fef0:b402/64 scope link
valid_lft forever preferred_lft forever
3: lan1@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN group default qlen 1000
link/ether 7e:c2:be:f0:b4:03 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
4: lan2@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN group default qlen 1000
link/ether 7e:c2:be:f0:b4:04 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
5: lan3@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN group default qlen 1000
link/ether 7e:c2:be:f0:b4:05 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
6: lan4@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue master switch0 state LOWERLAYERDOWN group default qlen 1000
link/ether 7e:c2:be:f0:b4:06 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
7: lan5@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue master switch0 state UP group default qlen 1000
link/ether 7e:c2:be:f0:b4:07 brd ff:ff:ff:ff:ff:ff permaddr 00:00:00:04:82:60
8: switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 7e:c2:be:f0:b4:02 brd ff:ff:ff:ff:ff:ff
inet6 fe80::7cc2:beff:fef0:b402/64 scope link
valid_lft forever preferred_lft forever
9: switch0.1@switch0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 7e:c2:be:f0:b4:03 brd ff:ff:ff:ff:ff:ff
inet 192.168.1.1/24 brd 192.168.1.255 scope global switch0.1
valid_lft forever preferred_lft forever
inet6 fd1e:8084:684c::1/60 scope global noprefixroute
valid_lft forever preferred_lft forever
inet6 fe80::7cc2:beff:fef0:b403/64 scope link
valid_lft forever preferred_lft forever
An external host has 192.168.1.111 and pings don't go through in either direction. I did also /etc/init.d/firewall stop
and fw4 flush
. Any pointers would be much appreciated. Boot log in case there's something I'm missing.
Edit: Is it that the RTL93xx initialization isn't quite complete yet, maybe because U-Boot on Zyxel devices sets things up sufficiently to get switch to host networking going? It doesn't look like that's the case for me... Should I be looking more at the RTL93xx dal to get that up and running?