Between every Ethernet MAC and its PHY runs one of a small family of interfaces, all descended from the original MII. They carry the same thing (frame bytes plus "frame valid" and "error" flags in each direction) and differ in how many pins they spend, who supplies the clock, and whether the clock is a wire or is recovered from a serial stream. Choosing between them is a pin-count, speed and layout decision; getting them wrong usually shows up as a link that comes up but drops frames. This page draws each one, MAC on the left and PHY on the right, with its timing.
Standards: IEEE 802.3-2022 Clause 22 (MII), Clause 35 (GMII), Clauses 36–37 (1000BASE-X PCS, 8b/10b); RMII Consortium specification 1.2; RGMII v2.0; Cisco SGMII specification 1.8 [1–4].
Inside the MAC, a reconciliation sublayer (RS) maps the MAC's serial-bit view onto the parallel interface signals. The PHY's PCS sits on the other side. Every member of the family carries, per direction, data plus an enable/valid and an error flag; they trade width against clock rate, and later members trade parallel wires for a serial lane. Management (MDC/MDIO) is a separate two-wire bus that every variant keeps.
| Interface | Data per direction | Clock | Clock source | Edges | Speeds | Signal pins (excl. MDIO) |
|---|---|---|---|---|---|---|
| MII | 4 bits | 25 / 2.5 MHz | PHY drives TX_CLK and RX_CLK | Rising | 10/100 | 16 |
| RMII | 2 bits | 50 MHz | One shared REF_CLK (osc, PHY or MAC) | Rising | 10/100 | 7 (+RX_ER) |
| GMII | 8 bits | 125 MHz | MAC drives GTX_CLK; PHY drives RX_CLK | Rising | 10/100/1000 | 24–25 |
| RGMII | 4 bits | 125 / 25 / 2.5 MHz | MAC drives TXC; PHY drives RXC | Both (DDR at 1000) | 10/100/1000 | 12 |
| SGMII | 1 serial lane | 1.25 Gbaud | Embedded; each receiver recovers it | — | 10/100/1000 | 4 (2 diff pairs) |
The Media Independent Interface carries a nibble per clock in each direction: 25 MHz × 4 = 100 Mbit/s, or 2.5 MHz × 4 = 10 Mbit/s. Both clocks come from the PHY, including the transmit clock, so the MAC launches TXD on a clock it receives. Timing is relaxed: the MAC must drive TXD, TX_EN and TX_ER 0–25 ns after the rising edge of TX_CLK, and the PHY samples on the next rising edge (40 ns period). On receive the PHY provides at least 10 ns setup and hold around the RX_CLK rising edge. CRS and COL are asynchronous status lines used in half duplex.
Reduced MII halves the data width to 2 bits and doubles the clock to 50 MHz, so 100 Mbit/s still fits; for 10 Mbit/s each dibit is simply held for 10 clocks. There is only one clock, REF_CLK, shared by MAC and PHY for both directions; CRS and RX_DV are merged into CRS_DV; COL is dropped (derived from CRS_DV and TX_EN in half duplex). That gets the interface down to 7 pins, which is why small MCUs and multi-port switches use it.
Gigabit MII widens the data path to 8 bits at 125 MHz. Unlike MII, the transmit clock now comes from the MAC (GTX_CLK), so TX is source-synchronous: clock and data travel together. The PHY still drives RX_CLK. For 10/100 it falls back to MII signalling on the low nibble, with the PHY again supplying TX_CLK, so a GMII port has both clocks. At 24–25 pins it is rarely routed across a board today; it lives inside SoCs and switches, and RGMII or SGMII carries it off-chip.
Reduced GMII squeezes GMII's 8 data bits onto 4 wires by using both clock edges at 125 MHz: the low nibble on the rising edge, the high nibble on the falling edge. TX_EN and TX_ER share one wire, TX_CTL, the same way (TX_EN on the rising edge, TX_EN ⊕ TX_ER on the falling edge), and likewise RX_CTL. CRS and COL are dropped. Both directions are source-synchronous: the MAC drives TXC with TXD, the PHY drives RXC with RXD. At 100 and 10 Mbit/s the clocks drop to 25 and 2.5 MHz and one nibble per clock is used.
Serial GMII replaces the parallel bus with a SerDes. Each GMII byte is 8b/10b encoded, exactly as in 1000BASE-X, and sent as a 1.25 Gbaud differential stream: one pair MAC → PHY, one pair PHY → MAC. There is no clock wire; each receiver recovers the clock from the data (8b/10b guarantees enough transitions and DC balance). Four pins, no skew budget between data bits, and the link tolerates tens of centimetres of trace or a connector, which is why SoCs, switches and automotive PHYs with gigabit links favour it.
| Symptom | Likely cause | Check / fix |
|---|---|---|
| RGMII: link up, CRC errors or no traffic in one direction | Clock delay missing or applied twice in that direction | Review MAC delay registers, PHY RGMII-ID straps/registers and the device-tree phy-mode, per direction. |
| Works at 100, fails at 1000 (RGMII) | Marginal delay or length matching; 4 ns window vs 40 ns | Scope TXC vs TXD at the PHY pin with a high-bandwidth probe; tune delay registers if the PHY has fine steps. |
| Link up at 1000, nothing at 10/100 | MAC not reprogrammed to the new speed (RGMII clock rate) or SGMII AN disabled | Make sure the PHY driver's link-change handler sets MAC speed; enable SGMII AN or force both ends. |
| SGMII: PHY link up, MAC sees no link | One side in 1000BASE-X mode, the other in SGMII; AN mismatch | Set both to SGMII (or both to 1000BASE-X); check the PCS AN status register on each side. |
| SGMII: no lock at all | Missing AC caps, P/N swapped, TX wired to TX | Check the schematic; enable polarity inversion; read SerDes signal-detect / CDR lock status. |
| RMII: occasional dropped or truncated frames | REF_CLK skew or jitter; CRS_DV toggle at frame end not handled | Measure REF_CLK at both pins; check MAC's RMII mode handles CRS_DV toggling. |
| MII: nothing transmitted | Both sides expect the other to drive TX_CLK (MAC-to-MAC) | Put one side in RevMII / PHY mode. |
MII: the PHY drives both TX_CLK and RX_CLK. RGMII (and GMII's GTX_CLK): the MAC drives the transmit clock, so TX is source-synchronous from the MAC.
50 MHz × 2 bits = 100 Mbit/s. At 10 Mbit/s each dibit is held for 10 REF_CLK cycles.
TX gets 4 ns of delay (MAC + PHY), a full nibble, so the PHY samples on data transitions: transmit frames are corrupted while receive works.
The PCS repeats each byte 100 times; the lane rate never changes, only how often new data appears on it.
SGMII is one serial lane per direction with an embedded clock: the receiver recovers timing from the data itself. RGMII sends 4 data bits and a clock on separate wires, so their relative delay is the timing budget.