Re: [PATCH net-next 0/5] net: mdio: add timestamped MDIO writes for PHY gettimex64

From: James Clark

Date: Sun Oct 11 2026 - 12:29:49 EST


On Sun, Oct 11, 2026 at 8:51 PM Andrew Lunn <andrew@xxxxxxx> wrote:

> > For example, using PTP_SYS_OFFSET_EXTENDED on the Raspberry Pi CM5 to
> > synchronize the system clock from the BCM54210PE PHY PHC leads to the
> > system clock being 32 盜 ahead of the PHC. On the CM4, it is about 7 盜.
> > (The difference is because the MDIO clock frequency is higher on the
> > CM4: 10 MHz as opposed to 2.08 MHz on the CM5.)
>
> IEEE 802.3 says the clock should be 2.5Mhz. Does the CM4 use a
> clock-frequency DT property to enable this faster clock?

No. The CM4 DT doesn't set clock-frequency on the mdio node, so
unimac_mdio_clk_set() leaves MDIO_CFG as it finds it. On the CM4 that
is 0x91, which has 9 in the divider field. The driver's formula is MDC
= ref / (2 * (div + 1)), so with the 200 MHz GISB clock that gives 10
MHz.

James