NOTE: This series is intentionally submitted on net-next (not intel-wired-lan) as early feedback od DPLL subsystem changes is welcomed. In the past possible approaches were discussed in [1].
This series extends the DPLL subsystem and the ICE driver to fully support transmit‑clock (TXC) reference selection on Intel E825‑class hardware. These devices expose a dedicated TX reference clock domain separate from PPS and SyncE/EEC, and they allow switching between multiple PHY‑sourced references (TXC0, EREF0, SyncE). Until now the kernel lacked a DPLL type to represent TXC‑class devices, and the ICE driver had no way to control or report the active TX reference. The series introduces: Subsystem‑wide improvements: - A new DPLL type (DPLL_TYPE_TXC) to represent devices that generate a TX SERDES reference clock. - Improvements to pin registration for fwnode‑identified pins. - Addition of a notification source identifier (src_id) for more accurate pin event routing in both netlink and internal notifiers. Hardware/driver support: - ZL3073x: allow control of the SyncE_Ref pin state. - ICE/E825: full TXC DPLL instance with dedicated pins (EXT_EREF0 and SyncE) and proper integration into the notifier/mux logic. -A new CPI (Converged PHY Interface) subsystem implementing the low‑level command protocol required by E825 PHY clocking control. - Extension of the Restart AN AQ command with a TX reference clock selector. - Complete support for selecting, enabling, disabling, and tracking the active TX reference clock for E825 devices, including peer‑PHY routing and safe clean‑up of unused clock sources. This enables proper userspace‑driven clock control via the DPLL API and is a prerequisite for advanced SyncE deployments, link recovery modes, and multi‑clock orchestration on E825 NICs. Patch summary: dpll: add new DPLL type for transmit clock (TXC) usage Introduces DPLL_TYPE_TXC and publishes it through netlink. dpll: allow registering FW‑identified pin with a different DPLL Relax the (module, clock_id) matching rules when fwnode pins are involved. dpll: extend pin notifier and netlink events with notification source ID Adds src_id to pin notification paths and updates all callers. dpll: zl3073x: allow SyncE_Ref pin state change Advertise hardware support for state toggling. ice: add TX clock (TXC) DPLL interface for E825 devices Introduces the ICE TXC DPLL, its pins, and relations to existing PHY fwnode pins. ice: implement CPI support for E825C Adds the CPI command engine used for PHY‑side clock control. ice: add Tx reference clock index handling to AN restart command Wires the refclk field into the AQ Restart AN command. ice: add TX reference clock (tx_clk) control for E825 devices Implements full clock‑selection logic, state tracking, cleanup, and DPLL pin ops integration. Testing was performed on E825C hardware in multi‑port configurations, verifying TXC pin exposure, SyncE/EREF0 switching via DPLL netlink, and link recovery across all combinations. [1] https://lore.kernel.org/netdev/[email protected]/ Grzegorz Nitka (8): dpll: add new DPLL type for transmit clock (TXC) usage dpll: allow registering FW-identified pin with a different DPLL dpll: extend pin notifier and netlink events with notification source ID dpll: zl3073x: allow SyncE_Ref pin state change ice: add TX clock (TXC) DPLL interface for E825 devices ice: implement CPI support for E825C ice: add Tx reference clock index handling to AN restart command ice: add TX reference clock (tx_clk) control for E825 devices Documentation/netlink/specs/dpll.yaml | 3 + drivers/dpll/dpll_core.c | 32 +- drivers/dpll/dpll_core.h | 2 +- drivers/dpll/dpll_netlink.c | 10 +- drivers/dpll/dpll_netlink.h | 4 +- drivers/dpll/zl3073x/prop.c | 9 + drivers/net/ethernet/intel/ice/Makefile | 2 +- .../net/ethernet/intel/ice/ice_adminq_cmd.h | 2 + drivers/net/ethernet/intel/ice/ice_common.c | 5 +- drivers/net/ethernet/intel/ice/ice_common.h | 2 +- drivers/net/ethernet/intel/ice/ice_cpi.c | 337 ++++++++++++++++++ drivers/net/ethernet/intel/ice/ice_cpi.h | 69 ++++ drivers/net/ethernet/intel/ice/ice_dpll.c | 298 ++++++++++++++-- drivers/net/ethernet/intel/ice/ice_dpll.h | 6 + drivers/net/ethernet/intel/ice/ice_lib.c | 3 +- drivers/net/ethernet/intel/ice/ice_ptp.c | 22 ++ drivers/net/ethernet/intel/ice/ice_ptp.h | 7 + drivers/net/ethernet/intel/ice/ice_ptp_hw.c | 35 ++ drivers/net/ethernet/intel/ice/ice_ptp_hw.h | 34 ++ drivers/net/ethernet/intel/ice/ice_sbq_cmd.h | 5 +- drivers/net/ethernet/intel/ice/ice_txclk.c | 235 ++++++++++++ drivers/net/ethernet/intel/ice/ice_txclk.h | 41 +++ include/linux/dpll.h | 1 + include/uapi/linux/dpll.h | 2 + 24 files changed, 1122 insertions(+), 44 deletions(-) create mode 100644 drivers/net/ethernet/intel/ice/ice_cpi.c create mode 100644 drivers/net/ethernet/intel/ice/ice_cpi.h create mode 100644 drivers/net/ethernet/intel/ice/ice_txclk.c create mode 100644 drivers/net/ethernet/intel/ice/ice_txclk.h base-commit: 8737d7194d6d5947c3d7d8813895b44a25b84477 -- 2.39.3
