Skip to content

dpll: add NCO pin type and zl3073x support

Ivan Vecera lkml netdev 6 versions – Applied

Status from this message: This series was applied to netdev/net-next.git (main)

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v6 Latest5 patches 4 repliesApplied 5/5
  2. v54 patches 32 repliesSuperseded
  3. v44 patches 1 replySuperseded
Earlier versions · 3
VersionPostedPatchesRepliesStatus
v32 patches2 repliesSuperseded
v22 patches4 repliesSuperseded
v12 patches1 replySuperseded

Changes in v6 from the cover letter

- New patch 1: STATE_CONNECTED_OVERRIDE pin capability with WARN_ON validation in dpll_pin_register() and documentation in dpll.rst Pin selection section.
- Use READ_ONCE/WRITE_ONCE for per-device freq_monitor and phase_avg_factor accessed from periodic worker without lock. Remove unnecessary zldpll->lock from phase_offset_avg_factor get/set callbacks (patch 4).
- Configure dpll_df_read register (ref_ofst=0, cmd=ACC_I) before NCO mode switch with 25ms delays for internal register update (reported by Chris du Quesnay, Microchip) (patch 5).
- Mark df_offset as unknown at probe when firmware left channel in NCO mode (patch 5).
- See individual patches for detailed changelogs.

Patches in v6 All 5 applied

#Subject and filesSizeRepliesApplied
1/5dpll: add STATE_CONNECTED_OVERRIDE pin capabilityDocumentation/driver-api/dpll.rst Documentation/netlink/specs/dpll.yaml drivers/dpll/dpll_core.c +1 more+22 -10 repliesApplied
2/5dpll: add DPLL_PIN_TYPE_INT_NCO pin typeDocumentation/netlink/specs/dpll.yaml drivers/dpll/dpll_nl.c include/uapi/linux/dpll.h+18 -12 repliesApplied
3/5dpll: zl3073x: use per-operation poll timeoutsdrivers/dpll/zl3073x/chan.c drivers/dpll/zl3073x/core.c drivers/dpll/zl3073x/core.h+30 -151 replyApplied
4/5dpll: zl3073x: add per-DPLL serialization lockdrivers/dpll/zl3073x/core.c drivers/dpll/zl3073x/core.h drivers/dpll/zl3073x/dpll.c +1 more+149 -631 replyApplied
5/5dpll: zl3073x: add NCO virtual input pindrivers/dpll/zl3073x/chan.c drivers/dpll/zl3073x/chan.h drivers/dpll/zl3073x/dpll.c +2 more+462 -290 repliesApplied

Reviews trailers per patch

4 of 5 patches have a Reviewed-by or Acked-by.

PatchJiri PirkoPetr OrosChris du Quesnay
1/5
2/5R-b
3/5R-b
4/5R-b
5/5R-b T-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes. Scroll the table sideways for all 3 reviewers.

Read the v6 thread

Cover letter [PATCH net-next v6 0/5] dpll: add NCO pin type and zl3073x support

Add a new DPLL_PIN_TYPE_INT_NCO pin type for virtual pins representing the NCO mode of a DPLL and implement support for it in the zl3073x driver.

Patch 1 adds a STATE_CONNECTED_OVERRIDE pin capability for pins that can override input selection in any DPLL mode, with a WARN_ON check in dpll_pin_register() that STATE_CAN_CHANGE is also set.

Patch 2 adds the new INT_NCO pin type to the DPLL netlink spec and UAPI header.

Patch 3 replaces the single 2s poll timeout with per-operation timeouts based on Microchip proprietary source code and own measurement.

Patch 4 adds a per-DPLL serialization mutex taken by all DPLL callbacks and the periodic worker, establishing a single lock that protects all per-channel state. The chan_state_update() call is moved under this lock.

Patch 5 adds a virtual NCO input pin to the zl3073x driver that allows userspace to switch a DPLL channel into NCO mode. The pin reports connected/active state when the channel is in NCO mode and handles the hardware-specific details of mode transitions including automatic df_offset capture and 1PPS phase preservation.

Changes:
v6:
- New patch 1: STATE_CONNECTED_OVERRIDE pin capability with WARN_ON validation in dpll_pin_register() and documentation in dpll.rst Pin selection section.
- Use READ_ONCE/WRITE_ONCE for per-device freq_monitor and phase_avg_factor accessed from periodic worker without lock. Remove unnecessary zldpll->lock from phase_offset_avg_factor get/set callbacks (patch 4).
- Configure dpll_df_read register (ref_ofst=0, cmd=ACC_I) before NCO mode switch with 25ms delays for internal register update (reported by Chris du Quesnay, Microchip) (patch 5).
- Mark df_offset as unknown at probe when firmware left channel in NCO mode (patch 5).
- See individual patches for detailed changelogs.
v5:
- Rebased on net-next after the freq_monitor per-device fix landed via net.
- Move phase_offset_avg_factor_set notification loop outside lock to avoid lockdep false positive on multi-channel devices (patch 4).
- See individual patches for detailed changelogs.
v4:
- New patch 3: per-operation poll timeouts
- New patch 4: per-DPLL serialization lock
- See individual patches for detailed changelogs.
v3:
- fixed SoB position
v2:
- See individual patches for detailed changelogs.

Ivan Vecera (5):
dpll: add STATE_CONNECTED_OVERRIDE pin capability
dpll: add DPLL_PIN_TYPE_INT_NCO pin type
dpll: zl3073x: use per-operation poll timeouts
dpll: zl3073x: add per-DPLL serialization lock
dpll: zl3073x: add NCO virtual input pin

 Documentation/driver-api/dpll.rst     |   7 +
 Documentation/netlink/specs/dpll.yaml |  19 +
 drivers/dpll/dpll_core.c              |   6 +-
 drivers/dpll/dpll_nl.c                |   2 +-
 drivers/dpll/zl3073x/chan.c           | 128 ++++++-
 drivers/dpll/zl3073x/chan.h           |  48 +++
 drivers/dpll/zl3073x/core.c           |  48 +--
 drivers/dpll/zl3073x/core.h           |  12 +-
 drivers/dpll/zl3073x/dpll.c           | 489 ++++++++++++++++++++++----
 drivers/dpll/zl3073x/dpll.h           |   4 +
 drivers/dpll/zl3073x/regs.h           |  11 +
 include/uapi/linux/dpll.h             |   8 +
 12 files changed, 677 insertions(+), 105 deletions(-)

base-commit: cef9d6804030793cf8b8796fd6936197d065dd3e

Signature · 1 line
2.53.0