From: Ivan Vecera <ivecera@redhat.com>
To: netdev@vger.kernel.org
Cc: Arkadiusz Kubalewski <arkadiusz.kubalewski@intel.com>,
"David S. Miller" <davem@davemloft.net>,
Donald Hunter <donald.hunter@gmail.com>,
Eric Dumazet <edumazet@google.com>,
Jakub Kicinski <kuba@kernel.org>, Jiri Pirko <jiri@resnulli.us>,
Michal Schmidt <mschmidt@redhat.com>,
Paolo Abeni <pabeni@redhat.com>,
Pasi Vaananen <pvaanane@redhat.com>, Petr Oros <poros@redhat.com>,
Prathosh Satish <Prathosh.Satish@microchip.com>,
Simon Horman <horms@kernel.org>,
Vadim Fedorenko <vadim.fedorenko@linux.dev>,
linux-kernel@vger.kernel.org
Subject: [PATCH net-next v6 0/5] dpll: add NCO pin type and zl3073x support
Date: Tue, 30 Jun 2026 14:55:31 +0200 [thread overview]
Message-ID: <20260630125536.720717-1-ivecera@redhat.com> (raw)
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.
Link: https://lore.kernel.org/netdev/20260531194423.383366-1-ivecera@redhat.com/
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
--
2.53.0
next reply other threads:[~2026-06-30 12:55 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2026-06-30 12:55 Ivan Vecera [this message]
2026-06-30 12:55 ` [PATCH net-next v6 1/5] dpll: add STATE_CONNECTED_OVERRIDE pin capability Ivan Vecera
2026-06-30 12:55 ` [PATCH net-next v6 2/5] dpll: add DPLL_PIN_TYPE_INT_NCO pin type Ivan Vecera
2026-07-06 9:31 ` Paolo Abeni
2026-07-06 11:47 ` Vadim Fedorenko
2026-06-30 12:55 ` [PATCH net-next v6 3/5] dpll: zl3073x: use per-operation poll timeouts Ivan Vecera
2026-07-03 9:20 ` Petr Oros
2026-06-30 12:55 ` [PATCH net-next v6 4/5] dpll: zl3073x: add per-DPLL serialization lock Ivan Vecera
2026-07-03 9:21 ` Petr Oros
2026-06-30 12:55 ` [PATCH net-next v6 5/5] dpll: zl3073x: add NCO virtual input pin Ivan Vecera
2026-07-06 12:50 ` [PATCH net-next v6 0/5] dpll: add NCO pin type and zl3073x support patchwork-bot+netdevbpf
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20260630125536.720717-1-ivecera@redhat.com \
--to=ivecera@redhat.com \
--cc=Prathosh.Satish@microchip.com \
--cc=arkadiusz.kubalewski@intel.com \
--cc=davem@davemloft.net \
--cc=donald.hunter@gmail.com \
--cc=edumazet@google.com \
--cc=horms@kernel.org \
--cc=jiri@resnulli.us \
--cc=kuba@kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=mschmidt@redhat.com \
--cc=netdev@vger.kernel.org \
--cc=pabeni@redhat.com \
--cc=poros@redhat.com \
--cc=pvaanane@redhat.com \
--cc=vadim.fedorenko@linux.dev \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.