Skip to contentSkip to conversation

arm64: dts: allwinner: a64: olinuxino: Fix phy-mode

PATCH Applied Roman Riabenko 3 participants 4 messages Aug 22 – Nov 15

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v2 1/1 arm64: dts: allwinner: a64: olinuxino: Fix phy-mode

The 'rgmii' mode does not appear to describe the RGMII timing in Olimex A64-OlinuXino boards. The PCB layout shows that the clock and data traces have roughly the same lengths for both RX and TX and, thus, do not appear to implement the 2 ns RGMII delay or introduce any significant delay.

According to the KSZ9031RNX datasheet, the PHY adds a typical 1.2 ns RX delay and no TX delay by default. The 'rgmii-id' mode causes the PHY driver to enable appropriate internal RGMII delays.

Packet loss in the downlink direction is observed with the 'rgmii' mode and is severe enough to interfere with downloads and disrupt software installation. No packet loss is observed with 'rgmii-id'.

Adjusting the TX delay in the DT was found to be unnecessary with 'rgmii-id'.

---
 arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts +1 -2
index fd3794678c33..8cb2381e21da 100644
@@ -102,10 +102,9 @@ &ehci1 {
 &emac {
 	pinctrl-names = "default";
 	pinctrl-0 = <&rgmii_pins>;
-	phy-mode = "rgmii";
+	phy-mode = "rgmii-id";
 	phy-handle = <&ext_rgmii_phy>;
 	phy-supply = <&reg_dcdc1>;
-	allwinner,tx-delay-ps = <600>;
 	status = "okay";
 };
 
Signature · 1 line
2.54.0
Reviewed-by on v2 1/1
#1 lore raw
Quoted 10 lines · Roman Riabenko

The 'rgmii' mode does not appear to describe the RGMII timing in Olimex A64-OlinuXino boards. The PCB layout shows that the clock and data traces have roughly the same lengths for both RX and TX and, thus, do not appear to implement the 2 ns RGMII delay or introduce any significant delay.

According to the KSZ9031RNX datasheet, the PHY adds a typical 1.2 ns RX delay and no TX delay by default. The 'rgmii-id' mode causes the PHY driver to enable appropriate internal RGMII delays.

Quoted 6 lines

Packet loss in the downlink direction is observed with the 'rgmii' mode and is severe enough to interfere with downloads and disrupt software installation. No packet loss is observed with 'rgmii-id'.

Adjusting the TX delay in the DT was found to be unnecessary with 'rgmii-id'.

Nice, thanks for doing a proper analysis.

Quoted 1 line

Andrew

#2 lore raw

Hello.

I would like to follow up on this patch.

It received a Reviewed-by by Andrew Lunn on 22 August.

У сб, 2026-08-22 у 16:53 +0200, Andrew Lunn пише:

Quoted 7 lines

Nice, thanks for doing a proper analysis.

Quoted 1 line

I do not see the patch in the sunxi/dt-for-7.5 branch or other branches. The state of the patch in the patchwork is archived.

I would like to clarify whether there is anything that needs to be addressed to get the patch through.

Thank you.

Roman

maintainer Applied
#3 lore raw
In reply to Roman Riabenko
Quoted 11 lines · Roman Riabenko

The 'rgmii' mode does not appear to describe the RGMII timing in Olimex A64-OlinuXino boards. The PCB layout shows that the clock and data traces have roughly the same lengths for both RX and TX and, thus, do not appear to implement the 2 ns RGMII delay or introduce any significant delay.

According to the KSZ9031RNX datasheet, the PHY adds a typical 1.2 ns RX delay and no TX delay by default. The 'rgmii-id' mode causes the PHY driver to enable appropriate internal RGMII delays.

[...]

Applied to sunxi/dt-for-7.5 in sunxi, thanks!

[1/1] arm64: dts: allwinner: a64: olinuxino: Fix phy-mode

      https://git.kernel.org/sunxi/linux/c/5f30c467fb36

Best regards,

Signature · 1 line
Chen-Yu Tsai <[email protected]>