Skip to content

ETH-2 RGMII delay missing or doubled

Severity Status Implementation
warning planned hard, depends on NET-7, CFG-2

Looks at. PHY delay straps (library), MAC delay setting (project), clock trace delay.

What it catches. An RGMII link where nobody adds the ~2 ns clock-to-data skew (no PHY internal delay, no MAC delay, no long clock trace), or where two of them do.

Why it matters. RGMII transmits clock and data edge-aligned at the source; the receiver needs the clock shifted by about 1.5-2 ns to sample in the middle of the data eye (RGMII 2.0 §3.3, Table 2: TskewR 1-2.6 ns at the receiver). Version 2.0 allows the delay inside the transmitter ("RGMII-ID"). With no delay the receiver samples on the edge; with two delays (PHY strap and MAC both on) it samples 4 ns late, which at 125 MHz is the next bit's edge. Either way the link comes up and drops packets or only works at 100 Mbit/s, where the timing is ten times looser.

Example. A DP83867 strapped for RX and TX clock shift (Table 7-9) on an SoC whose devicetree says phy-mode = "rgmii-id": Linux asks the PHY driver for internal delay too, or the MAC adds its own, and the delays add. The Linux binding says outright that these modes "are frequently used wrongly".

How to check. Decode the PHY's delay straps (pins, levels, NET-7); take the MAC side and any PCB clock delay from the project (CFG-2); exactly one of them must provide the skew in each direction.

Fix. Decide once per direction who adds the delay, write it on the schematic next to the PHY, and make the straps, the MAC setting and the devicetree phy-mode agree.

References. RGMII 2.0 §3.3 and Table 2 (TskewR, note 1: clock trace delay 1.5-2.0 ns; note 4: RGMII-ID); DP83867 §6.9 note 2, §7.4.1.1, Table 7-9 (RGMII clock skew straps); KSZ9031 features (on-chip delay per RGMII v2.0); Linux ethernet-controller binding (rgmii, rgmii-id, rgmii-rxid, rgmii-txid).