From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 19A412853E9; Sun, 7 Jun 2026 05:49:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=198.137.202.133 ARC-Seal:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780811360; cv=none; b=OAJq9YH7aZ5NKdDZlrm1mjHDYrv8e7ol8XMkKxBwtbt2NA2seYc42RsNcN4N6TbGCAf6OcyacPBWZHKIRbciPeMiEU5aNSiVvWIMqu/f7TV6j4Xpro/cXXWQ74jqWKUuMVx86yKyAIU1U58W6oXlugeOQtlf2vsUfjmxH8DcAds= ARC-Message-Signature:i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1780811360; c=relaxed/simple; bh=uIzjOavKfaKb8A+vzifaV9lqqFBik5P++T7ZWM6BAyk=; h=Message-ID:Date:MIME-Version:Subject:To:Cc:References:From: In-Reply-To:Content-Type; b=Cd57uTjavDDuCHSKErGsr6Ax5vd7lTNgYAFKYnztVtf0uyDZGjzqE3LihmTicJhuSK5r/vAHjlLwmEJsQ0T8tWGJN2h0lt8JT0pPQNShstwxsS4jVS2vK3XOTBQl1eiXYcqHdaoYARpZLstNv0dtSX348BCnb5QO5bgzO1nas2U= ARC-Authentication-Results:i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org; spf=pass smtp.mailfrom=infradead.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b=dnvXLX7w; arc=none smtp.client-ip=198.137.202.133 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=infradead.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=infradead.org Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=infradead.org header.i=@infradead.org header.b="dnvXLX7w" DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:In-Reply-To:From:References:Cc:To:Subject:MIME-Version:Date: Message-ID:Sender:Reply-To:Content-ID:Content-Description; bh=7gO0UdD5vwxsvPbPXQOY8CU6VnCOXDgqC4KB2RZA/yc=; b=dnvXLX7w9zqkZtiR4Pl+7mJpyw vveBWG1NGSgCCVySw/omqLo3XsZ12cEcpGLao58K88QzIPLIV2Pj+JRD47zSGY8XB5Lfdzzv2GUhO d4uaD8HRZY/c0OIDRkIwHh7B9PHVU4367hivDfE9COUwtD4q1mnNoasGop1kF0cyWOinn3KNDAgkS /LfL+svckxrbZzGb28wR3XdTQ1g+IHJjDEedxi2/1latWxI0F65+i4TVQXEfzVnMZkhh92GF13MXA Rcct45/Z+tYWII8ZQCOebYJdKbwqIOYRJWlBBpUrI9CoDqRZHGDIViGMZO4e5BTA5UGT94sX09s/Z tSj387gw==; Received: from [50.53.43.113] (helo=[192.168.254.34]) by bombadil.infradead.org with esmtpsa (Exim 4.99.1 #2 (Red Hat Linux)) id 1wW6Ng-000000022zW-3Z1Q; Sun, 07 Jun 2026 05:49:08 +0000 Message-ID: Date: Sat, 6 Jun 2026 22:49:06 -0700 Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 User-Agent: Mozilla Thunderbird Subject: Re: [PATCH net-next v4 16/16] Documentation: networking: Add timestamp related APIs to OA TC6 framework To: Selvamani.Rajagopal@onsemi.com, Andrew Lunn , Piergiorgio Beruto , Heiner Kallweit , Russell King , "David S. Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Andrew Lunn , Parthiban Veerasooran , Richard Cochran , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Simon Horman , Jonathan Corbet , Shuah Khan Cc: netdev@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-doc@vger.kernel.org, Jerry Ray References: <20260605-s2500-mac-phy-support-v4-0-de0fbc13c6d8@onsemi.com> <20260605-s2500-mac-phy-support-v4-16-de0fbc13c6d8@onsemi.com> Content-Language: en-US From: Randy Dunlap In-Reply-To: <20260605-s2500-mac-phy-support-v4-16-de0fbc13c6d8@onsemi.com> Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit Hi, These needs a few additional blank lines to avoid docs build warnings: Documentation/networking/oa-tc6-framework.rst:554: WARNING: Explicit markup ends without a blank line; unexpected unindent. [docutils] Documentation/networking/oa-tc6-framework.rst:561: WARNING: Explicit markup ends without a blank line; unexpected unindent. [docutils] Documentation/networking/oa-tc6-framework.rst:566: WARNING: Explicit markup ends without a blank line; unexpected unindent. [docutils] Documentation/networking/oa-tc6-framework.rst:573: WARNING: Explicit markup ends without a blank line; unexpected unindent. [docutils] See below. On 6/5/26 10:42 PM, Selvamani Rajagopal via B4 Relay wrote: > From: Selvamani Rajagopal > > Added new APIs to support hardware timestamp feature as defined in > OPEN Alliance 10BASE-T1x MAC-PHY serial interface specification. > > Signed-off-by: Selvamani Rajagopal > --- > Documentation/networking/oa-tc6-framework.rst | 76 +++++++++++++++++++++++++++ > 1 file changed, 76 insertions(+) > > diff --git a/Documentation/networking/oa-tc6-framework.rst b/Documentation/networking/oa-tc6-framework.rst > index fe2aabde923a..694d9485b1c5 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 > ~~~~~~~~~~~~~~~~ > > @@ -495,3 +499,75 @@ 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_ioctl(struct oa_tc6 *tc6, struct ifreq *rq, \ > + int cmd); > + > +ioctl interface to handle hardware timestamp and PHY related commands. > + > +.. 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_registers_mms(struct oa_tc6 *tc6, \ > + u16 address, u16 mms, \ > + u32 value[], u8 length); Insert blank line here. > +Writing multiple consecutive registers starting from @address for the > +given @mms memory map selector in the MAC-PHY. Maximum of 128 consecutive > +registers can be written starting at @address. > + > +.. c:function:: int oa_tc6_write_register_mms(struct oa_tc6 *tc6, \ > + u16 address, u16 mms, \ > + u32 value); and here. > +Write a single register addressed by @address and @mms in the MAC-PHY. > + > +.. c:function:: int oa_tc6_read_registers_mms(struct oa_tc6 *tc6, \ > + u16 address, u16 mms, \ > + u32 value[], u8 length); and here. > +Reading multiple consecutive registers starting from @address for the > +given @mms memory map selector value, in the MAC-PHY. Maximum of 128 > +consecutive registers can be read starting at @address. > + > +.. c:function:: int oa_tc6_read_register_mms(struct oa_tc6 *tc6, \ > + u16 address, u16 mms, \ > + u32 *value); and here. > +Read a single register addressed by @address and @mms in the MAC-PHY. > -- ~Randy