Article View: linux.kernel.netdev
Article #1394[PATCH net-next v9 02/11] Documentation: networking: Add timestamp related APIs to OA TC6 framework
From: Selvamani Rajagopal via B4 Relay
Date: Fri, 09 Oct 2026 17:12
Date: Fri, 09 Oct 2026 17:12
116 lines
11080 bytes
11080 bytes
From: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
Added new APIs to support hardware timestamp feature as defined in
OPEN Alliance 10BASE-T1x MAC-PHY serial interface specification.
Added the newer read/write APIs that takes MMS as one of its parameters
as these were not documented so far.
Reviewed-by: Andrew Lunn <andrew@lunn.ch>
Signed-off-by: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com>
---
changes in v9
- Added Reviewed tag
changes in v8
- Updated the the order of the parameters in oa_tc6_read_register_mms
and oa_tc6_write_register_mms apis.
- Removed the reference to ioctl
changes in v7
- No change
changes in v6
- No change
changes in v5
- Fixed "no blank line" issues in four places
changes in v4
- Added information for new APIs in OA TC6 framework
changes in v3
- Added more information for documentation
changes in v2
- Removed the changes to the existing API
- Updated information about newly added APIs
changes in v1
- Added changes to an existing API
- Added documentation to new hardware timestamp related APIs
---
Documentation/networking/oa-tc6-framework.rst | 59 +++++++++++++++++++++++++++
1 file changed, 59 insertions(+)
diff --git a/Documentation/networking/oa-tc6-framework.rst b/Documentation/networking/oa-tc6-framework.rst
index 2545ef694016..3cfe8cb7cf75 100644
--- a/Documentation/networking/oa-tc6-framework.rst
+++ b/Documentation/networking/oa-tc6-framework.rst
@@ -153,6 +153,10 @@ OPEN Alliance TC6 Framework
- Forwards the received Ethernet frame from 10Base-T1x MAC-PHY to n/w
subsystem.
+- If supported by the hardware and enabled, updates hardware timestamp
+ in skb, when indicated by one of the three timestamp capture registers
+ through TSC fields of the header.
+
Data Transaction
~~~~~~~~~~~~~~~~
@@ -496,3 +500,58 @@ the MAC-PHY.
Zero align receive frame feature can be enabled to align all receive ethernet
frames data to start at the beginning of any receive data chunk payload with a
start word offset (SWO) of zero.
+
+.. c:function:: int oa_tc6_ptp_register(struct oa_tc6 *tc6, \
+ struct ptp_clock_info *info);
+
+Registers the PTP hardware clock related functions with the kernel.
+This API simply registers. Initialization of the fields in the
+ptp_clock_info structure are left to the vendor as programming hardware
+timer is expected to be vendor dependent. The fields max_adj, owner,
+and all the functions for the clock operations, like adjfine, gettimex64,
+settime64, adjtime are expected to be initialized in the structure before
+calling the registering the hardware clock.
+
+.. c:function:: void oa_tc6_ptp_unregister(struct oa_tc6 *tc6);
+
+Unregisters the PTP hardware clock related callbacks.
+
+.. c:function:: int oa_tc6_get_ts_info(struct oa_tc6 *tc6, \
+ struct kernel_ethtool_ts_info *info);
+
+Provides timestamp related settings that are supported to ethtool.
+
+.. c:function:: void oa_tc6_hwtstamp_get(struct oa_tc6 *tc6, \
+ struct kernel_hwtstamp_config *cfg);
+
+Returns hardware timestamp configuration. Part of net_device_ops callbacks.
+
+.. c:function:: void oa_tc6_get_ts_stats(struct oa_tc6 *tc6, \
+ struct ethtool_ts_stats *ts_stats);
+
+Provides hardware timestamp related traffic statistics for ethtool.
+
+.. c:function:: int oa_tc6_hwtstamp_set(struct oa_tc6 *tc6, \
+ struct kernel_hwtstamp_config *cfg);
+
+Helper to set hardware timestamp configuration. Part of net_device_ops
+callbacks.
+
+.. c:function:: void oa_tc6_set_vend1_mms(struct oa_tc6 *tc6, int mms);
+
+Helper to map MDIO_MMD_VEND1 command to vendor specific Memory Map Select
+(MMS) value. This function offers flexibility for vendors that may have
+used any MMS value between 10 and 15 as allowed by the specification.
+MDIO_MMD_VEND2 is already mapped to MMS4 in the OA TC6 frame work code.
+
+.. c:function:: int oa_tc6_write_register_mms(struct oa_tc6 *tc6, \
+ u8 mms, u16 address, \
+ u32 value);
+
+Write a single register addressed by @mms and @address in the MAC-PHY.
+
+.. c:function:: int oa_tc6_read_register_mms(struct oa_tc6 *tc6, \
+ u8 mms, u16 address, \
+ u32 *value);
+
+Read a single register addressed by @mms and @address in the MAC-PHY.
--
2.43.0
Technical Details
Message-ID:
<20261009-s2500-mac-phy-support-v9-2-dcefe1d0bf0d@onsemi.com>Path:
mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343826-linux-kernel-netdev=dewy.ruReferences:
<20261009-s2500-mac-phy-support-v9-0-dcefe1d0bf0d@onsemi.com>Show Full Headers
Complete Article Headers
Path: mbox-mo1.pugleaf.net!archive.usenet.blueworldhosting.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!usenet.network!.POSTED!vger.kernel.org!netdev+bounces-343826-linux-kernel-netdev=dewy.ru From: devnull+Selvamani.Rajagopal.onsemi.com@kernel.org (Selvamani Rajagopal via B4 Relay) Newsgroups: linux.kernel.netdev Subject: [PATCH net-next v9 02/11] Documentation: networking: Add timestamp related APIs to OA TC6 framework Date: Fri, 09 Oct 2026 10:12:22 -0700 Organization: Usenet Network Message-ID: <20261009-s2500-mac-phy-support-v9-2-dcefe1d0bf0d@onsemi.com> References: <20261009-s2500-mac-phy-support-v9-0-dcefe1d0bf0d@onsemi.com> MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit Injection-Info: usenet.network; logging-data="1155814"; mail-complaints-to="abuse@usenet.network" Cancel-Lock: sha1:Z4wxQoPeIlgTyzQiyr7SkF48iB4= sha256:5ovGbsW8N3W7ZPOW9ofu267AdW+KqJdPdIc2/BMlHUU= sha1:DEdTNWZmxaY0hdkWKOxWY9Sbo3o= sha256:gMBSvhEWK+fi/NUbr4yJW//SlX8q+gtxvEpXM8H12+M= List-ID: <netdev.vger.kernel.org> X-Mailpost-Empty-Hdrs: X-Spam-Level X-Received: from localhost (localhost [127.0.0.1]) by mail.dewy.ru (Postfix) with ESMTP id CEFFA10F75C; Fri, 9 Oct 2026 20:17:54 +0300 (MSK) X-Virus-Scanned: Debian amavisd-new at usenet.network X-Spam-Flag: NO X-Spam-Score: -0.241 X-Spam-Status: No, score=-0.241 tagged_above=-9999 required=6.31 tests=[DCC_CHECK=1.1, DCC_REPUT_70_89=0.1, DKIMWL_WL_HIGH=-0.241, DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, MAILING_LIST_MULTI=-1, SPF_HELO_NONE=0.001, SPF_PASS=-0.001] autolearn=ham autolearn_force=no X-Authentication-Results: mail.dewy.ru (amavisd-new); dkim=pass (2048-bit key) header.d=kernel.org X-Received: from mail.dewy.ru ([127.0.0.1]) by localhost (mail.dewy.ru [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id W798RFlABLMS; Fri, 9 Oct 2026 20:17:51 +0300 (MSK) X-Received-SPF: Pass (mailfrom) identity=mailfrom; client-ip=172.234.253.10; helo=sea.lore.kernel.org; envelope-from=netdev+bounces-343826-linux-kernel-netdev=dewy.ru@vger.kernel.org; receiver=<UNKNOWN> X-Authentication-Results: OpenDMARC; dmarc=pass (p=quarantine dis=none) header.from=kernel.org X-Received: from sea.lore.kernel.org (sea.lore.kernel.org [172.234.253.10]) by mail.dewy.ru (Postfix) with ESMTPS id 9B1EE10F729; Fri, 9 Oct 2026 20:17:48 +0300 (MSK) X-Received: from smtp.subspace.kernel.org (conduit.subspace.kernel.org [100.90.174.1]) by sea.lore.kernel.org (Postfix) with ESMTP id 9A30E27D3A; Fri, 9 Oct 2026 17:12:28 +0000 (UTC) X-Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 74A473B47E1; Fri, 9 Oct 2026 17:12:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="fYDyOtq8" X-Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (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 4FA2C37DEB7; Fri, 9 Oct 2026 17:12:26 +0000 (UTC) X-Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=10.30.226.201 X-ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791565946; cv=none; b=bZ0lffbwQPExKt+hvXKiCym5qXb4GIXueftEJyKpmnoWigpMQhmhC9n6g08bMCNgsNjS9hTTvBHXqTCVEL9a7BX/SxaypOCULbG3uEUmrTUDbT3paYC/jgflo8ZUDi3Nvh3JjTB0it+EnL0Wsv7cICP9/lrj6cLJQd3qCLPUXZs= X-ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1791565946; c=relaxed/simple; bh=bYaNVv1wfu+K/XTJi4v+Pezk+vx7ZqiXClmhFnMAH+E=; h=From:Date:Subject:MIME-Version:Content-Type:Message-Id:References: In-Reply-To:To:Cc; b=XjXgxn0TqbMTbkh7axjhGj1RuLHyovLjZPYWAXJGO17YONOCtMD4Rgbg6HCiPaINeRYV/Xlv8zz3RqTgQ7qtNM+W1k1e6kWibMjtw1Ul/463JEsrWCbcP7qy65cmV0wvP6J9Ew4Px/xK4R/rSgXMGELeF/wleXB0Q2CYS38thLw= X-ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b=fYDyOtq8; arc=none smtp.client-ip=10.30.226.201 X-Received: by smtp.kernel.org (Postfix) with ESMTPS id 11F53C2BCF7; Fri, 9 Oct 2026 17:12:26 +0000 (UTC) X-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1791565946; bh=bYaNVv1wfu+K/XTJi4v+Pezk+vx7ZqiXClmhFnMAH+E=; h=From:Date:Subject:References:In-Reply-To:To:Cc:Reply-To:From; b=fYDyOtq86GxAkFO+YqM5NVur2YcngXB/UZvymDh1F7NJbxHh7D+nCIE0OVve4lq6u YfUabeJwfpXzhu+nm3UTCblCkQRQkVIs3zv2LvBZD4q+c3Jt7Nv+KW9TOiJvKrOaue JA5ilvnXTuBHXtU4wVsMgVfObLe4gV7MKKHtD9viuHrazF+bjlwJaEVnGEjB7Voy5T RJDudVliHz+4CcwqVa4r4UXsUm3l3gyJUIIJb2n3qdmNxl9szK37l3HAqaOzFjg5zN 4aRZjIF82cy84grCJDrp4/gG0DnMWxXk+Z+9Zh3GSJSNgEUqKJvGgk92VotUzpvpvi IPggUR28JGE9A== X-Received: from aws-us-west-2-korg-lkml-1.web.codeaurora.org (localhost.localdomain [127.0.0.1]) by smtp.lore.kernel.org (Postfix) with ESMTP id E471CCA9EC0; Fri, 9 Oct 2026 17:12:25 +0000 (UTC) X-Precedence: bulk X-Mailing-List: netdev@vger.kernel.org X-List-Subscribe: <mailto:netdev+subscribe@vger.kernel.org> X-List-Unsubscribe: <mailto:netdev+unsubscribe@vger.kernel.org> X-In-Reply-To: <20261009-s2500-mac-phy-support-v9-0-dcefe1d0bf0d@onsemi.com> X-Cc: Selva Rajagopal <Selvamani.Rajagopal@onsemi.com>, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jerry Ray <jerry.ray@microchip.com>, Ciprian Regus <ciprian.regus@analog.com> X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1791565943; l=4629; i=Selvamani.Rajagopal@onsemi.com; s=20260531; h=from:subject:message-id; bh=9o+zv+MhVib0ZyKSed2M2RcOfdUYo/DismzGgck0r9w=; b=LFzA0nm29AJXDHK28NzYlucFGaJThudqijmJBsCbtExFIXlPoqPMZSKhFg206YhfKvzpKPljX nCUUAksZbepBrezlCWzVZKAVEGxRjlDbWFi3gg03cZjEYMxPYbBDqCy X-Developer-Key: i=Selvamani.Rajagopal@onsemi.com; a=ed25519; pk=5QRdM0HS/LGWWcUZZ9hVfZ+qbPQGZCumcTXOiN7Fyug= X-Endpoint-Received: by B4 Relay for Selvamani.Rajagopal@onsemi.com/20260531 with auth_id=803 X-Original-From: Selvamani Rajagopal <Selvamani.Rajagopal@onsemi.com> X-Reply-To: Selvamani.Rajagopal@onsemi.com