[PATCH net-next 0/4] net: lan969x: skew the core clock by 200 ppm
From: Daniel Machon
Date: Fri Nov 13 2026 - 08:06:18 EST
At its 328.125 MHz default, the lan969x core clock is too close to the
line clock frequencies for the high accuracy phase detectors to work as
intended, which degrades PTP accuracy. The core clock should therefore
be skewed about 200 ppm up. The PTP time of day (TOD) increment is
already set up for the skewed rate, but the driver leaves the core PLL
at its default, so the TOD and the clock that drives the scheduler run
200 ppm apart.
This series programs the core PLL to the skewed rate, and reworks the
PTP frequency adjustment to scale the nominal increment directly. It is
not a fix as such, but an improvement: nothing breaks at the default
rate, and this moves lan969x to the core clock configuration
recommended for PTP.
The difference can be seen with taprio: timestamping the frames released
by a schedule with a 1 ms cycle time shows the gates opening about every
1000.2 us instead of every 1000 us.
Patch 1 adds the CHIP_TOP registers and maps the target.
Patch 2 enables the switch core only after the core clock is
configured, so the PLL is not reprogrammed underneath a running queue
system.
Patch 3 programs the core PLL.
Patch 4 makes the PTP frequency adjustment scale the nominal increment
instead of using a separate one ppm table.
Tested on lan969x and sparx5.
---
Daniel Machon (4):
net: lan969x: add the core PLL registers
net: sparx5/lan969x: enable the switch core after clock setup
net: lan969x: configure the core PLL
net: sparx5/lan969x: scale the nominal TOD increment in adjfine
.../ethernet/microchip/sparx5/lan969x/lan969x.c | 1 +
.../net/ethernet/microchip/sparx5/sparx5_main.c | 123 ++++++++++++++++++++-
.../net/ethernet/microchip/sparx5/sparx5_main.h | 7 ++
.../ethernet/microchip/sparx5/sparx5_main_regs.h | 82 ++++++++++++++
drivers/net/ethernet/microchip/sparx5/sparx5_ptp.c | 54 +--------
5 files changed, 217 insertions(+), 50 deletions(-)
---
base-commit: 676f3aace662fbbc180b3898b190a372fa2a516b
change-id: 20261022-lan969x-core-skew-ff5155ead4be
Best regards,
--
Daniel Machon <daniel.machon@xxxxxxxxxxxxx>