Skip to content

dpll: zl3073x: add PTP periodic output support

Ivan Vecera lkml netdev 1 version In review

Get series with b4
b4 am [email protected]

Versions newest first

  1. v1 Latest6 patches 7 repliesIn review

Patches in v1 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/6dpll: zl3073x: notify sibling pin when shared output config changesdrivers/dpll/zl3073x/dpll.c+115 -292 replies
2/6dpll: zl3073x: add GPO support for output pinsdrivers/dpll/zl3073x/core.c drivers/dpll/zl3073x/core.h drivers/dpll/zl3073x/out.c +2 more+236 -121 reply
3/6dpll: zl3073x: allow enabling/disabling output pinsdrivers/dpll/zl3073x/core.c drivers/dpll/zl3073x/core.h drivers/dpll/zl3073x/dpll.c +1 more+175 -21 reply
4/6dpll: zl3073x: consolidate pin capabilities into bitmapdrivers/dpll/zl3073x/dpll.c+21 -60 replies
5/6dpll: zl3073x: factor out output pin frequency helperdrivers/dpll/zl3073x/dpll.c+74 -611 reply
6/6dpll: zl3073x: add PTP periodic output supportdrivers/dpll/zl3073x/dpll.c drivers/dpll/zl3073x/dpll.h drivers/dpll/zl3073x/prop.h+236 -00 replies

Reviews trailers per patch

None of the 6 patches has a Reviewed-by or Acked-by.

PatchChris du Quesnay
1/6T-b
2/6T-b
3/6T-b
4/6T-b
5/6T-b
6/6T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v1 thread

Cover letter [PATCH net-next 0/6] dpll: zl3073x: add PTP periodic output support

This series extends the zl3073x output pin support and finally adds PTP periodic output (perout) support on top of it.

Each zl3073x output exposes a P-pin and an N-pin that share a single HW output and most of its configuration registers. Patch 1 makes a change requested on one pin notify the sibling pin as well, so userspace on the sibling is told when its effective frequency, esync or phase adjustment changed.

Patches 2 and 3 add the plumbing to control an individual output pin:
GPO override registers and a clean stop/restart of an output (patch 2), and then per-pin enable/disable through the state_on_dpll_get/set callbacks - differential pins via the output stop condition, CMOS pins via the GPO override bracketed by a glitch-free stop/restart (patch 3).

Patches 4 and 5 are preparatory: the per-pin 'esync_control' boolean is replaced by an extensible 'caps' bitmap, and the divisor/N-division computation is factored out of frequency_set() into a helper that updates a struct zl3073x_out without committing it.

Patch 6 registers a PTP periodic output pin for each output pin that supports step-time and declares 1 PPS support in firmware. Any perout channel can be assigned to any such pin; only 1 PPS is supported. Enabling a channel programs its pin for 1 Hz and connects it, disabling disconnects it, reusing the helper and connect/disconnect primitive introduced earlier in the series.

Ivan Vecera (6):
dpll: zl3073x: notify sibling pin when shared output config changes
dpll: zl3073x: add GPO support for output pins
dpll: zl3073x: allow enabling/disabling output pins
dpll: zl3073x: consolidate pin capabilities into bitmap
dpll: zl3073x: factor out output pin frequency helper
dpll: zl3073x: add PTP periodic output support

 drivers/dpll/zl3073x/core.c | 117 ++++++++
 drivers/dpll/zl3073x/core.h |  30 ++
 drivers/dpll/zl3073x/dpll.c | 539 +++++++++++++++++++++++++++++++-----
 drivers/dpll/zl3073x/dpll.h |   4 +
 drivers/dpll/zl3073x/out.c  |  50 +++-
 drivers/dpll/zl3073x/out.h  | 138 ++++++++-
 drivers/dpll/zl3073x/prop.c |   2 +
 drivers/dpll/zl3073x/prop.h |  21 ++
 drivers/dpll/zl3073x/regs.h |  20 ++
 9 files changed, 834 insertions(+), 87 deletions(-)

base-commit: 014d795c73837ea2339a4ea8e8f82c6e959b845d

Signature · 1 line
2.55.0