linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH net-next v4 0/3]  dpll: add all inputs phase offset monitor
@ 2025-05-23 15:42 Arkadiusz Kubalewski
  2025-05-23 15:42 ` [PATCH net-next v4 1/3] dpll: add phase-offset-monitor feature to netlink spec Arkadiusz Kubalewski
                   ` (3 more replies)
  0 siblings, 4 replies; 9+ messages in thread
From: Arkadiusz Kubalewski @ 2025-05-23 15:42 UTC (permalink / raw)
  To: donald.hunter, kuba, davem, edumazet, pabeni, horms,
	vadim.fedorenko, jiri, anthony.l.nguyen, przemyslaw.kitszel,
	andrew+netdev, aleksandr.loktionov, milena.olech, corbet
  Cc: netdev, linux-kernel, intel-wired-lan, linux-doc,
	Arkadiusz Kubalewski

Add dpll device level feature: phase offset monitor.

Phase offset measurement is typically performed against the current active
source. However, some DPLL (Digital Phase-Locked Loop) devices may offer
the capability to monitor phase offsets across all available inputs.
The attribute and current feature state shall be included in the response
message of the ``DPLL_CMD_DEVICE_GET`` command for supported DPLL devices.
In such cases, users can also control the feature using the
``DPLL_CMD_DEVICE_SET`` command by setting the ``enum dpll_feature_state``
values for the attribute.

Implement feature support in ice driver for dpll-enabled devices.

Verify capability:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --dump device-get
[{'clock-id': 4658613174691613800,
  'id': 0,
  'lock-status': 'locked-ho-acq',
  'mode': 'automatic',
  'mode-supported': ['automatic'],
  'module-name': 'ice',
  'type': 'eec'},
 {'clock-id': 4658613174691613800,
  'id': 1,
  'lock-status': 'locked-ho-acq',
  'mode': 'automatic',
  'mode-supported': ['automatic'],
  'module-name': 'ice',
  'phase-offset-monitor': 'disable',
  'type': 'pps'}]

Enable the feature:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --do device-set --json '{"id":1, "phase-offset-monitor":"enable"}'

Verify feature is enabled:
$ ./tools/net/ynl/pyynl/cli.py \
 --spec Documentation/netlink/specs/dpll.yaml \
 --dump device-get
[
 [...]
 {'capabilities': {'all-inputs-phase-offset-monitor'},
  'clock-id': 4658613174691613800,
  'id': 1,
 [...]
  'phase-offset-monitor': 'enable',
 [...]]


Arkadiusz Kubalewski (3):
  dpll: add phase-offset-monitor feature to netlink spec
  dpll: add phase_offset_monitor_get/set callback ops
  ice: add phase offset monitor for all PPS dpll inputs

 Documentation/driver-api/dpll.rst             |  16 ++
 Documentation/netlink/specs/dpll.yaml         |  24 +++
 drivers/dpll/dpll_netlink.c                   |  69 ++++++-
 drivers/dpll/dpll_nl.c                        |   5 +-
 .../net/ethernet/intel/ice/ice_adminq_cmd.h   |  20 ++
 drivers/net/ethernet/intel/ice/ice_common.c   |  26 +++
 drivers/net/ethernet/intel/ice/ice_common.h   |   3 +
 drivers/net/ethernet/intel/ice/ice_dpll.c     | 191 +++++++++++++++++-
 drivers/net/ethernet/intel/ice/ice_dpll.h     |   6 +
 drivers/net/ethernet/intel/ice/ice_main.c     |   4 +
 include/linux/dpll.h                          |   8 +
 include/uapi/linux/dpll.h                     |  12 ++
 12 files changed, 379 insertions(+), 5 deletions(-)


base-commit: ea15e046263b19e91ffd827645ae5dfa44ebd044
-- 
2.38.1


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

end of thread, other threads:[~2025-06-10  5:58 UTC | newest]

Thread overview: 9+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-05-23 15:42 [PATCH net-next v4 0/3] dpll: add all inputs phase offset monitor Arkadiusz Kubalewski
2025-05-23 15:42 ` [PATCH net-next v4 1/3] dpll: add phase-offset-monitor feature to netlink spec Arkadiusz Kubalewski
2025-05-26  9:36   ` Jiri Pirko
2025-05-30  0:33   ` Jakub Kicinski
2025-06-10  5:58     ` Kubalewski, Arkadiusz
2025-05-23 15:42 ` [PATCH net-next v4 2/3] dpll: add phase_offset_monitor_get/set callback ops Arkadiusz Kubalewski
2025-05-26  9:36   ` Jiri Pirko
2025-05-23 15:42 ` [PATCH net-next v4 3/3] ice: add phase offset monitor for all PPS dpll inputs Arkadiusz Kubalewski
2025-05-28  7:21 ` [PATCH net-next v4 0/3] dpll: add all inputs phase offset monitor Paolo Abeni

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).