I've noticed that fdt definitions for network phy's are moving to phy-mode="rgmii-id" instead of using tx/rx delays generated by the MAC.
A quick scan in /usr/src/sys/contrib/device-tree show almost 300 dts files that mention rgmii-id
But there is not much support for rgmii-id in the phy drivers.
Even worse, the aw_if_dwc driver breaks with non accurate error when confronted with rgmii-id defined phy-interface:
What actually happens - it falls back to mii mode and then fails the reset.
This patch will - at least - connect in rgmii mode.
But you are still left with a disfunctional dwc - hardly good enough to satisfy dhcpclient - extreme packet loss.
I think real rgmii-id support is needed in the dev/mii driver files.
As it is now it seems that at least the following boards (Allwinner A20) will have a a broken network interface when using their u-boot-master() from ports:
olinuxino-lime2
pcduino-3
cubieboard2
bananapi
orangepi
Others might also be affected.
For those interested, I managed to get a working setup on a pcduino3-nano with current u-boot (2022-04) using the attached patch.
A quick scan in /usr/src/sys/contrib/device-tree show almost 300 dts files that mention rgmii-id
But there is not much support for rgmii-id in the phy drivers.
Even worse, the aw_if_dwc driver breaks with non accurate error when confronted with rgmii-id defined phy-interface:
Code:
dwc0: Can't reset DWC.
This patch will - at least - connect in rgmii mode.
But you are still left with a disfunctional dwc - hardly good enough to satisfy dhcpclient - extreme packet loss.
Code:
--- sys/arm/allwinner/aw_if_dwc.c.org 2022-06-10 10:37:03.613795000 +0000
+++ sys/arm/allwinner/aw_if_dwc.c 2022-06-09 09:47:44.000000000 +0000
@@ -79,7 +79,7 @@
return (error);
}
- if (strcmp(phy_type, "rgmii") == 0)
+ if (strncmp(phy_type, "rgmii", 5) == 0)
tx_parent_name = "gmac_int_tx";
else
tx_parent_name = "mii_phy_tx";
I think real rgmii-id support is needed in the dev/mii driver files.
As it is now it seems that at least the following boards (Allwinner A20) will have a a broken network interface when using their u-boot-master() from ports:
olinuxino-lime2
pcduino-3
cubieboard2
bananapi
orangepi
Others might also be affected.
For those interested, I managed to get a working setup on a pcduino3-nano with current u-boot (2022-04) using the attached patch.