[PATCH v2 7/7] arm64: dts: allwinner: sun60i-a733-orangepi-4-pro: Enable GMAC0 Ethernet
Alastair D'Silva
alastair at d-silva.org
Mon Nov 30 13:36:41 PST 2026
On Mon, 2026-11-30 at 11:28 -0500, Jacob George wrote:
Hi Alastair,
On Mon, 30 Nov 2026 12:30:02 +1100, Alastair D'Silva wrote:
+&mdio0 {
+ ext_rgmii_phy: ethernet-phy at 1 {
+ compatible = "ethernet-phy-ieee802.3-c22";
+ reg = <1>;
+ clocks = <&ccu CLK_GMAC0_PHY>;
+ motorcomm,clk-out-frequency-hz = <125000000>;
+ reset-gpios = <&pio 7 16 GPIO_ACTIVE_LOW>; /* PH16 */
Two observations from bringing up this board on a 6.18 BSP-based kernel,
in case they are useful.
1. PH16 as the PHY reset: Orange Pi's own device tree for this board (the
one their 5.15 image ships) has an empty "reset-gpios;" in the PHY node,
i.e. no PHY reset line. PH16 is the PHY reset on the Radxa Cubie A7A.
Do you have a schematic reference for PH16 on the Orange Pi 4 Pro? If
not, it may be safer to leave reset-gpios out.
Yes. The Xunlong Orange Pi 4 Pro Rev 1.0 schematic (Sheet 08, "A733 GPIO")
connects PH16 (pin AW2) to RGMII1_PHYRSTB via a 0-ohm resistor.
2. RGMII delays: with "rgmii-id" and no rx/tx-internal-delay-ps, the YT8531
driver programs its defaults (1950 ps each). For comparison, under the
vendor 5.15 kernel the PHY runs with (read over MDIO):
ext 0xA001 = 0x8120 (RXC_DLY_EN = 1, i.e. ~1.9 ns RX delay)
ext 0xA003 = 0x00f1 (GE TX delay field = 1, i.e. 150 ps)
while the vendor MAC glue adds its own rx-delay = <0x0a> and
tx-delay = <0x0c>. On our kernel the MAC side adds no delay, and
transmit only worked once we matched the PHY to rx 1900 ps / tx 150 ps.
If your MAC glue also adds no delay, TX may be marginal with the 1950 ps
default; if it does, ignore this.
In this series, patch 4 enables SYSCON_ERXIE (BIT(4)) in dwmac-sun55i.c
to invert the RX clock on the A733 GMAC210 glue, and downgrades
PHY_INTERFACE_MODE_RGMII_ID to PHY_INTERFACE_MODE_RGMII_TXID. As a
result, the YT8531 PHY disables its internal RX delay and applies only
its default 1950 ps TX delay while the MAC TX delay stays at 0.
Cheers,
--
Alastair D'Silva
More information about the linux-arm-kernel
mailing list