Re: [PATCH net-next 5/5] net: mdio: bcm-unimac: implement timestamped MDIO writes
From: James Clark
Date: Fri Oct 09 2026 - 21:25:35 EST
On Fri, Oct 9, 2026 at 11:04 PM Florian Fainelli
<florian.fainelli@xxxxxxxxxxxx> wrote:
> The clock frequency is fixed, so you could also provide a fixed clock to
> ensure that the clock frequency is derived correctly. I will check the
> actual clocking because 200MHz sounds odd to me, since the RGMII
> interface does require 125MHz and therefore a 250MHz source makes that easy.
Thanks very much for looking at this.
Here is how I arrived at 200MHz. On BCM2711 (CM4) I polled START_BUSY
in MDIO_CMD with the MDC divider in MDIO_CFG set to 9, 14, 19, 29 and
39. The mean busy time of a write was 6.42, 9.66, 12.89, 19.30 and
25.63us. A clause 22 write clocks out 64 bits, so assuming it takes 64
MDC periods, the MDC period is 100, 151, 201, 302 and 400ns. The
comment in unimac_mdio_clk_set() gives the divider formula as MDC =
ref / (2 * (div + 1)), which implies in each case a reference rate of
about 200MHz.
Could it be that there is a separate 200MHz clock driving the MDIO?
James