[PATCH v1 0/2] Add PTP support for TJA1103

From: Radu Pirea (NXP OSS)
Date: Wed Apr 28 2021 - 08:30:37 EST


Hi,

This is the PTP support for TJA1103.
The RX timestamp is found in the reserved2 field of the PTP package.
The TX timestamp has to be read from the phy registers. Reading of the
timestamp works with interrupts or with polling(that starts when
.nxp_c45_txtstamp is called).
The implementation of .adjtime is done by read modify write because there
is no way to atomically add/subtract a constant from the clock value.

I've moved scaled_ppm_to_ppb function from ptp_clock.c to
ptp_clock_kernel.h in order to be able to build the driver without
PTP_1588_CLOCK=y.

Radu P.

Radu Pirea (NXP OSS) (2):
ptp: ptp_clock: make scaled_ppm_to_ppb static inline
phy: nxp-c45-tja11xx: add timestamping support

drivers/net/phy/nxp-c45-tja11xx.c | 505 +++++++++++++++++++++++++++++-
drivers/ptp/ptp_clock.c | 21 --
include/linux/ptp_clock_kernel.h | 34 +-
3 files changed, 530 insertions(+), 30 deletions(-)

--
2.31.1