Skip to content

dt: rk3588s-nanopi-m6: add explicit rx_delay=0 for rgmii-rxid gmac1#10

Merged
MichaIng merged 3 commits intodietpifrom
copilot/diagnose-nanopi-m6-ethernet-issue
Mar 13, 2026
Merged

dt: rk3588s-nanopi-m6: add explicit rx_delay=0 for rgmii-rxid gmac1#10
MichaIng merged 3 commits intodietpifrom
copilot/diagnose-nanopi-m6-ethernet-issue

Conversation

Copy link
Copy Markdown

Copilot AI commented Mar 13, 2026

NanoPi M6 Ethernet breaks on Linux 7.0 because dwmac-rk.c changed RGMII_RXID handling to use bsp_priv->rx_delay (defaulting to 0x10) instead of hardcoding 0, incorrectly applying SoC-side RX delay when the RTL8211F PHY already handles it internally.

Change

  • Add rx_delay = <0x00> to &gmac1 in rk3588s-nanopi-m6.dts, matching all other active RK3588/RK3588S boards using rgmii-rxid (hinlink-h88k, mixtile-core3588e, youyeetoo-r1)
 &gmac1 {
     clock_in_out = "output";
     phy-handle = <&rgmii_phy1>;
     phy-mode = "rgmii-rxid";
     ...
+    rx_delay = <0x00>;
     tx_delay = <0x42>;
     status = "okay";
 };

Notes

The reporter also blacklisted dwmac_rk, which is the actual driver for fe1c0000.ethernet — removing it from the blacklist is required regardless of this DTS fix. The sync_state() pending kernel log messages are a downstream effect of unprobed blacklisted drivers (GPU, VPU, HDMI, Ethernet) and are not themselves the cause of failure.


📱 Kick off Copilot coding agent tasks wherever you are with GitHub Mobile, available on iOS and Android.

Copilot AI changed the title [WIP] Investigate Ethernet issue on NanoPi M6 after Linux upgrade dt: rk3588s-nanopi-m6: add explicit rx_delay=0 for rgmii-rxid gmac1 Mar 13, 2026
Copilot AI requested a review from MichaIng March 13, 2026 15:18
@MichaIng MichaIng added the bug Something isn't working label Mar 13, 2026
@MichaIng MichaIng marked this pull request as ready for review March 13, 2026 15:19
@MichaIng
Copy link
Copy Markdown
Owner

MichaIng commented Mar 13, 2026

Reason for failing Ethernet was handmade on my particular system, but the missing rx_delay indeed causes a kernel error, after which it falls back to 0x10:

[    5.113392] rk_gmac-dwmac fe1c0000.ethernet: Can not read property: rx_delay.
[    5.114018] rk_gmac-dwmac fe1c0000.ethernet: set rx_delay to 0x10

Copilot's analysis however is wrong: rx_delay is in fact not applied in the end with rgmii-rxid, neither before nor after Linux 7.0, and it does not cause any issues if missing. A recent commit touched that code, but did not practically change something: torvalds/linux@d323769

Reason for the error is that the value is checked unconditionally. But is it ignored in case og rgmii-rxid: https://github.com/torvalds/linux/blob/b10d56b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c#L1276-L1285

In Linux 7.0, the dwmac-rk.c driver changed to use the DTS-provided
rx_delay value (defaulting to 0x10) instead of hardcoding 0 for
RGMII_RXID mode. This broke Ethernet on NanoPi M6 which used rgmii-rxid
mode but had no explicit rx_delay in its DTS.

Add rx_delay = <0x00> to the gmac1 node to match the expected
configuration for rgmii-rxid mode (where RX delay is handled by the
RTL8211F PHY internally, not by the SoC), consistent with other working
RK3588/RK3588S boards (hinlink-h88k, mixtile-core3588e, youyeetoo-r1).

Co-Authored-By: MichaIng <28480705+MichaIng@users.noreply.github.com>
@MichaIng MichaIng force-pushed the copilot/diagnose-nanopi-m6-ethernet-issue branch from e88ceda to e9efa11 Compare March 13, 2026 16:00
It causes a kernel error if missing, despite being ignored with rgmii-rxid mode:
- https://github.com/torvalds/linux/blob/b10d56b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c#L1276-L1285
- https://github.com/torvalds/linux/blob/b10d56b/drivers/net/ethernet/stmicro/stmmac/dwmac-rk.c#L1433-L1438

Signed-off-by: MichaIng <micha@dietpi.com>
Co-Authored-By: MichaIng <28480705+MichaIng@users.noreply.github.com>
@MichaIng MichaIng merged commit 4d8d7bb into dietpi Mar 13, 2026
@MichaIng MichaIng deleted the copilot/diagnose-nanopi-m6-ethernet-issue branch March 13, 2026 16:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants