* [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay
@ 2026-08-15 0:53 Roman Riabenko
2026-08-16 18:59 ` Jernej Škrabec
2026-08-19 13:48 ` Andrew Lunn
0 siblings, 2 replies; 4+ messages in thread
From: Roman Riabenko @ 2026-08-15 0:53 UTC (permalink / raw)
To: wens, jernej.skrabec, samuel
Cc: andre.przywara, robh, krzk+dt, conor+dt, devicetree,
linux-arm-kernel, linux-sunxi, Roman Riabenko
The Ethernet on Olimex A64-OlinuXino computers requires an RX delay
greater than 0. If the value is not set or is 0, packet loss in the
downlink direction is severe enough to interfere with downloads and
disrupt software installation.
The range of acceptable values is wide. The vendor has been applying
200 ps in its downstream DTs since 2021. This patch matches that
common practice.
Signed-off-by: Roman Riabenko <roman@riabenko.com>
---
arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 1 +
1 file changed, 1 insertion(+)
diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
index fd3794678c33..6c8b79c257b9 100644
--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
@@ -106,6 +106,7 @@ &emac {
phy-handle = <&ext_rgmii_phy>;
phy-supply = <®_dcdc1>;
allwinner,tx-delay-ps = <600>;
+ allwinner,rx-delay-ps = <200>;
status = "okay";
};
--
2.54.0
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay
2026-08-15 0:53 [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay Roman Riabenko
@ 2026-08-16 18:59 ` Jernej Škrabec
2026-08-19 13:48 ` Andrew Lunn
1 sibling, 0 replies; 4+ messages in thread
From: Jernej Škrabec @ 2026-08-16 18:59 UTC (permalink / raw)
To: wens, samuel, Roman Riabenko
Cc: andre.przywara, robh, krzk+dt, conor+dt, devicetree,
linux-arm-kernel, linux-sunxi, Roman Riabenko
Dne sobota, 15. avgust 2026 ob 02:53:16 Srednjeevropski poletni čas je Roman Riabenko napisal(a):
> The Ethernet on Olimex A64-OlinuXino computers requires an RX delay
> greater than 0. If the value is not set or is 0, packet loss in the
> downlink direction is severe enough to interfere with downloads and
> disrupt software installation.
>
> The range of acceptable values is wide. The vendor has been applying
> 200 ps in its downstream DTs since 2021. This patch matches that
> common practice.
>
> Signed-off-by: Roman Riabenko <roman@riabenko.com>
Acked-by: Jernej Skrabec <jernej.skrabec@gmail.com>
Best regards,
Jernej
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay
2026-08-15 0:53 [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay Roman Riabenko
2026-08-16 18:59 ` Jernej Škrabec
@ 2026-08-19 13:48 ` Andrew Lunn
2026-08-20 9:57 ` Roman Riabenko
1 sibling, 1 reply; 4+ messages in thread
From: Andrew Lunn @ 2026-08-19 13:48 UTC (permalink / raw)
To: Roman Riabenko
Cc: wens, jernej.skrabec, samuel, andre.przywara, robh, krzk+dt,
conor+dt, devicetree, linux-arm-kernel, linux-sunxi
On Sat, Aug 15, 2026 at 03:53:16AM +0300, Roman Riabenko wrote:
> The Ethernet on Olimex A64-OlinuXino computers requires an RX delay
> greater than 0. If the value is not set or is 0, packet loss in the
> downlink direction is severe enough to interfere with downloads and
> disrupt software installation.
>
> The range of acceptable values is wide. The vendor has been applying
> 200 ps in its downstream DTs since 2021. This patch matches that
> common practice.
>
> Signed-off-by: Roman Riabenko <roman@riabenko.com>
> ---
> arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 1 +
> 1 file changed, 1 insertion(+)
>
> diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> index fd3794678c33..6c8b79c257b9 100644
> --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> @@ -106,6 +106,7 @@ &emac {
> phy-handle = <&ext_rgmii_phy>;
> phy-supply = <®_dcdc1>;
> allwinner,tx-delay-ps = <600>;
> + allwinner,rx-delay-ps = <200>;
> status = "okay";
> };
The full node is:
&emac {
pinctrl-names = "default";
pinctrl-0 = <&rgmii_pins>;
phy-mode = "rgmii";
phy-handle = <&ext_rgmii_phy>;
phy-supply = <®_dcdc1>;
allwinner,tx-delay-ps = <600>;
status = "okay";
};
Please take a read of:
https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
phy-mode of "rgmii" is questionable. Does the PCB have extra long
clock lines?
600/200ps is actually very small. It should be around 2000.
Andrew
^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay
2026-08-19 13:48 ` Andrew Lunn
@ 2026-08-20 9:57 ` Roman Riabenko
0 siblings, 0 replies; 4+ messages in thread
From: Roman Riabenko @ 2026-08-20 9:57 UTC (permalink / raw)
To: Andrew Lunn
Cc: wens, jernej.skrabec, samuel, andre.przywara, robh, krzk+dt,
conor+dt, devicetree, linux-arm-kernel, linux-sunxi
У ср, 2026-08-19 у 15:48 +0200, Andrew Lunn пише:
> On Sat, Aug 15, 2026 at 03:53:16AM +0300, Roman Riabenko wrote:
> > The Ethernet on Olimex A64-OlinuXino computers requires an RX delay
> > greater than 0. If the value is not set or is 0, packet loss in the
> > downlink direction is severe enough to interfere with downloads and
> > disrupt software installation.
> >
> > The range of acceptable values is wide. The vendor has been
> > applying
> > 200 ps in its downstream DTs since 2021. This patch matches that
> > common practice.
> >
> > Signed-off-by: Roman Riabenko <roman@riabenko.com>
> > ---
> > arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts | 1 +
> > 1 file changed, 1 insertion(+)
> >
> > diff --git a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> > b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> > index fd3794678c33..6c8b79c257b9 100644
> > --- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> > +++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
> > @@ -106,6 +106,7 @@ &emac {
> > phy-handle = <&ext_rgmii_phy>;
> > phy-supply = <®_dcdc1>;
> > allwinner,tx-delay-ps = <600>;
> > + allwinner,rx-delay-ps = <200>;
> > status = "okay";
> > };
>
> The full node is:
>
> &emac {
> pinctrl-names = "default";
> pinctrl-0 = <&rgmii_pins>;
> phy-mode = "rgmii";
> phy-handle = <&ext_rgmii_phy>;
> phy-supply = <®_dcdc1>;
> allwinner,tx-delay-ps = <600>;
> status = "okay";
> };
>
> Please take a read of:
>
> https://elixir.bootlin.com/linux/v6.15/source/Documentation/devicetree/bindings/net/ethernet-controller.yaml#L287
>
> phy-mode of "rgmii" is questionable. Does the PCB have extra long
> clock lines?
The PCB tracks for RX clock in comparison to RX data are approximately
the same in length in the PCB layout file (12 mm or so). The tracks for
TX clock in comparison to TX data are approximately the same as well
(roughly 14-16 mm). Thus, the tracks themselves do not appear to
implement the 2ns RGMII delay. Any delay from the tracks' lengths is
likely insignificant.
When I change the phy-mode to rgmii-id and remove allwinner,tx-delay-
ps, the connection is stable in both upstream and downstream direction.
There are no retries in my iperf3 tests. According to KSZ9031RNX
datasheet, it adds a typical 1.2 ns delay to RX_CLK with respect to
RX_DV and RXD by default, but no TX delay is provided by default. The
rgmii-id configuration causes the PHY driver to enable appropriate
internal RGMII delays.
I will submit a second version of the patch changing phy-mode to rgmii-
id and removing allwinner,tx-delay-ps.
Thank you for referring me to the linked document.
Roman
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2026-08-20 9:57 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-15 0:53 [PATCH] arm64: dts: allwinner: sun50i-a64-olinuxino: Add RX delay Roman Riabenko
2026-08-16 18:59 ` Jernej Škrabec
2026-08-19 13:48 ` Andrew Lunn
2026-08-20 9:57 ` Roman Riabenko
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox