From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from us-smtp-delivery-124.mimecast.com (us-smtp-delivery-124.mimecast.com [170.10.129.124]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 1A6F041C31B for ; Mon, 11 May 2026 15:58:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=170.10.129.124 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515119; cv=none; b=sngEeRRPtN2lh4ra1EwkcUMIeIR1Q1JWPN4yRA4zNfctffrmBN+ChJGAA+HDYyxdu6/qfsK32BC00Xo3+HycV7i68lcJhnpG5ynTvByfUboHcjvSM62L0N9ESNBPnzdiEMa7KHpAAnbNOYvSmFTDK5enI5IdTMYcPaWDzZyMhMM= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1778515119; c=relaxed/simple; bh=0f733Z/TX/wx+L/uoTgJYtOAPWpuzndYa6v+JxLLAls=; h=From:To:Cc:Subject:Date:Message-ID:MIME-Version; b=TRYFnPkP6B6Cd4UnPdPZ6h0+kxkh5dsfWul+Dw0721n72u5CHzpl4IZPURCPtRSgGuwghLbxznjytS+45tSBCOyQZMxWIl7lN/mPvCwgb5l8x315IMvIX4Cok0O7q6l2Cgt3nRPWM4LAIk1IcTyMGQYTGTPCa/OsXl18om8G7jM= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com; spf=pass smtp.mailfrom=redhat.com; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b=RL/1DKsh; arc=none smtp.client-ip=170.10.129.124 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=quarantine dis=none) header.from=redhat.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=redhat.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=redhat.com header.i=@redhat.com header.b="RL/1DKsh" DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=redhat.com; s=mimecast20190719; t=1778515117; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding; bh=PvBs0XuNqDi9m0Wooxh2TkMdEChLbJ5nV+4KSQ/yOts=; b=RL/1DKshFbWRTnx3ykgJftwbJqu2px3OVR89HLcR2mj+/Sf0ci9qWSIliaLxpIOYTlqgKm pkT8vXJJslHVIG+R0ib4gL1mkaajDT3Iv/xXEUaI/uP8T7lAp7mjzD17yaClzub0lqDVev 6/ZsICCR4hjF4E1VDS/nxmBrF55C8bA= Received: from mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (ec2-35-165-154-97.us-west-2.compute.amazonaws.com [35.165.154.97]) by relay.mimecast.com with ESMTP with STARTTLS (version=TLSv1.3, cipher=TLS_AES_256_GCM_SHA384) id us-mta-661-XZzcg4T9MlydHuQCVRB6jg-1; Mon, 11 May 2026 11:58:29 -0400 X-MC-Unique: XZzcg4T9MlydHuQCVRB6jg-1 X-Mimecast-MFC-AGG-ID: XZzcg4T9MlydHuQCVRB6jg_1778515106 Received: from mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com [10.30.177.111]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (2048 bits) server-digest SHA256) (No client certificate requested) by mx-prod-mc-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTPS id 3236618002C9; Mon, 11 May 2026 15:58:25 +0000 (UTC) Received: from p16v.redhat.com (unknown [10.44.49.148]) by mx-prod-int-08.mail-002.prod.us-west-2.aws.redhat.com (Postfix) with ESMTP id 24101180034E; Mon, 11 May 2026 15:58:17 +0000 (UTC) From: Ivan Vecera To: netdev@vger.kernel.org Cc: Andrew Lunn , Arkadiusz Kubalewski , "David S. Miller" , Donald Hunter , Eric Dumazet , Jakub Kicinski , Jiri Pirko , Jonathan Corbet , Leon Romanovsky , Mark Bloch , Michal Schmidt , Paolo Abeni , Pasi Vaananen , Petr Oros , Prathosh Satish , Saeed Mahameed , Shuah Khan , Simon Horman , Tariq Toukan , Vadim Fedorenko , linux-doc@vger.kernel.org, linux-kernel@vger.kernel.org, linux-rdma@vger.kernel.org Subject: [PATCH net-next v4 0/2] dpll: rework fractional frequency offset reporting Date: Mon, 11 May 2026 17:58:14 +0200 Message-ID: <20260511155816.99936-1-ivecera@redhat.com> Precedence: bulk X-Mailing-List: linux-rdma@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Scanned-By: MIMEDefang 3.4.1 on 10.30.177.111 Rework how the fractional frequency offset (FFO) is reported in the DPLL subsystem. Both fractional-frequency-offset (PPM) and fractional-frequency-offset-ppt (PPT) attributes are now present at the top level of a pin and inside each pin-parent-device nest. They carry the same measurement at different precisions. Introduce enum dpll_ffo_type and struct dpll_ffo_param to distinguish FFO contexts: DPLL_FFO_PORT_RXTX_RATE for the RX vs TX symbol rate offset at the top level, and DPLL_FFO_PIN_DEVICE for the pin vs parent DPLL offset in the nest. Drivers declare which types they support via the supported_ffo bitmask in dpll_pin_ops; the core only calls ffo_get for opted-in types. Patch 1 adds the type-safe FFO API, updates the YAML spec, netlink handling, and documentation, and converts mlx5 and zl3073x drivers. Patch 2 implements the nested FFO for zl3073x using the dpll_df_offset_x register with ref_ofst=1, providing 2^-48 resolution. The old per-reference frequency measurement is removed as it was redundant with measured-frequency. Changes v3 -> v4: - Replace dpll=NULL overloading with enum dpll_ffo_type and struct dpll_ffo_param (Jakub Kicinski) - Add supported_ffo opt-in bitmask in dpll_pin_ops for fail-close driver validation (Jakub Kicinski) - Add WARN_ON in dpll_pin_register for supported_ffo without ffo_get callback - Use atomic64_t for freq_offset to prevent torn reads on 32-bit Changes v2 -> v3: - Keep both FFO attributes (PPM and PPT) at both levels instead of moving PPT under pin-parent-device only (Jiri Pirko) - Unify attribute documentation to describe semantics at each level Changes v1 -> v2: - Minor commit message fixes Ivan Vecera (2): dpll: add fractional frequency offset to pin-parent-device dpll: zl3073x: report FFO as DPLL vs input reference offset Documentation/driver-api/dpll.rst | 20 +++++++++ Documentation/netlink/specs/dpll.yaml | 28 +++++++----- drivers/dpll/dpll_core.c | 3 +- drivers/dpll/dpll_netlink.c | 30 +++++++------ drivers/dpll/dpll_nl.c | 2 + drivers/dpll/zl3073x/chan.c | 31 ++++++++++++- drivers/dpll/zl3073x/chan.h | 14 ++++++ drivers/dpll/zl3073x/core.c | 45 ------------------- drivers/dpll/zl3073x/dpll.c | 40 ++++++++--------- drivers/dpll/zl3073x/ref.h | 14 ------ drivers/dpll/zl3073x/regs.h | 15 +++++++ .../net/ethernet/mellanox/mlx5/core/dpll.c | 6 ++- include/linux/dpll.h | 16 ++++++- 13 files changed, 154 insertions(+), 110 deletions(-) -- 2.53.0