[Bug 264673] aw_if_dwc does not support current versions of u-boot
Date: Tue, 14 Jun 2022 21:26:26 UTC
https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=264673 Bug ID: 264673 Summary: aw_if_dwc does not support current versions of u-boot Product: Base System Version: 13.1-RELEASE Hardware: arm OS: Any Status: New Severity: Affects Some People Priority: --- Component: arm Assignee: freebsd-arm@FreeBSD.org Reporter: src-2016@bikker.homeunix.net Created attachment 234692 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=234692&action=edit aw_if_dwc and rgephy patch for rgmii-id mode Current u-boot uses phy connection mode "rgmii-id" for some boards. Driver aw_if_dwc.c does not support that and erroneously falls back to mii mode. This breaks network access for several boards including allwinner a20. Failure verified on pcduino3-nano with dwc boot message: dwc0: Can't reset DWC. 2 problems: First: src/sys/arm/allwinner/aw_if_dwc.c incorrectly assumes that fdt supplied phy-mode is always "mii", unless it literally is "rgmii". For supplied phy-mode "rgmii-id" it falls back to default "mii" and selects wrong clock. Remedy is simple - instead of 'strcmp(phy_type, "rgmii")' check for any rgmii interface version via 'strncmp(phy_id, "rgmii" ,5)'. which matches also "rgmii-id". Second: None of the phy drivers support rgmii-id. The supplied patch adds rgmii-id support for rgephy (realtek 8211E). This was tested to work on pcduino3-nano -- You are receiving this mail because: You are the assignee for the bug.