netdev.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/2] dpll: zl3073x: add PTP clock support
@ 2026-08-03 14:06 Ivan Vecera
  2026-08-03 14:06 ` [PATCH net-next v4 1/2] dpll: zl3073x: add channel ToD, phase step and TIE operations Ivan Vecera
  2026-08-03 14:06 ` [PATCH net-next v4 2/2] dpll: zl3073x: add PTP clock support Ivan Vecera
  0 siblings, 2 replies; 7+ messages in thread
From: Ivan Vecera @ 2026-08-03 14:06 UTC (permalink / raw)
  To: netdev
  Cc: Arkadiusz Kubalewski, Jakub Kicinski, Jiri Pirko, Paolo Abeni,
	Petr Oros, Prathosh Satish, Richard Cochran, Vadim Fedorenko,
	linux-kernel

Add PTP hardware clock support to the zl3073x DPLL driver.

Patch 1 adds low-level channel operations for ToD read/write/adjust,
output phase step, delta frequency offset write and TIE write as
building blocks for PTP callbacks.

Patch 2 registers a PTP clock device for each DPLL channel with
gettimex64, settime64, adjtime, adjfine, adjphase and getmaxphase
callbacks. Callback availability adapts to the current channel
state - adjfine requires NCO pin connected, adjphase uses TIE write
when tracking a reference, and adjtime selects the appropriate
mechanism automatically. Periodic output support will be added in a
follow-up series.

Link: https://lore.kernel.org/netdev/20260730132150.371376-1-ivecera@redhat.com/
Link: https://lore.kernel.org/netdev/20260713103739.1553284-1-ivecera@redhat.com/
Link: https://lore.kernel.org/netdev/20260708170527.916035-1-ivecera@redhat.com/

Changes:
v4:
  - Move out_step_time_mask to struct zl3073x_dev (device-global)
  - Fix tod_adjust rollover guard for tick-crossing case
  - Drop trailing tod_ready_wait from tod_adjust
  - Fix TOD_CTRL register item count
  - Move phase step registers into existing page 9 section in regs.h
  - Align ToD command define values
  - Update kernel-doc for chan_state_fetch
  - Drop perout support (will rework as follow-up)
  - Replace abs(delta) with explicit range check to avoid S64_MIN UB
  - Add locking context doc to zl3073x_chan_df_offset_set
  - Export zl3073x_chan_tod_ready_wait and wait for ToD completion in
    adjtime before phase step/TIE write to prevent WR_NEXT_1HZ from
    overwriting the sub-second adjustment
v3:
  - Use PTP_1588_CLOCK instead of PTP_1588_CLOCK_OPTIONAL (Jakub)
  - Factor out output pin frequency helper to a separate commit (Jakub)
  - Remove spurious #include <linux/mutex.h> from dpll.h (Jakub)
v2:
  - Squash low-level ops patches (1+3) into patch 1.
  - Squash PTP callback patches (2+4) into patch 2, register PTP
    clock regardless of initial channel state.

Ivan Vecera (2):
  dpll: zl3073x: add channel ToD, phase step and TIE operations
  dpll: zl3073x: add PTP clock support

 drivers/dpll/zl3073x/Kconfig |   6 +-
 drivers/dpll/zl3073x/chan.c  | 310 ++++++++++++++++++++++++-
 drivers/dpll/zl3073x/chan.h  |  32 +++
 drivers/dpll/zl3073x/core.c  |  13 ++
 drivers/dpll/zl3073x/core.h  |  23 ++
 drivers/dpll/zl3073x/dpll.c  | 425 ++++++++++++++++++++++++++++++++---
 drivers/dpll/zl3073x/dpll.h  |   5 +
 drivers/dpll/zl3073x/regs.h  |  52 +++++
 8 files changed, 836 insertions(+), 30 deletions(-)


base-commit: a5c6ae8de11ef0c3aedbe5e123354aad87d0d925
-- 
2.54.0


^ permalink raw reply	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2026-08-05 10:46 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-08-03 14:06 [PATCH net-next v4 0/2] dpll: zl3073x: add PTP clock support Ivan Vecera
2026-08-03 14:06 ` [PATCH net-next v4 1/2] dpll: zl3073x: add channel ToD, phase step and TIE operations Ivan Vecera
2026-08-04 23:07   ` Vadim Fedorenko
2026-08-05  9:48     ` Ivan Vecera
2026-08-05 10:03       ` Vadim Fedorenko
2026-08-05 10:46         ` Ivan Vecera
2026-08-03 14:06 ` [PATCH net-next v4 2/2] dpll: zl3073x: add PTP clock support Ivan Vecera

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).