From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 ARC-Seal: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=pass; t=1796233083; b=zKsjXFMNricpoKUvPwOJt9xvnCHdFvCBW7AmLDpDWcFa9yAQ57hZvGwLKPZcSJEMmBRZ 5aumhjJZU8mok2/vWUOs7Vyol3f4nsy4/aWWTOzJMqsxsfTMzcpHKqFEqrc6uDSeJkYRk E1Xz7zh29KQl32gFmicgxcPTS9/pDZphaWOv/NvWIeKFMdvPPARPsFJL95voHQXWVefo0 rRZ3+VCh1zCViG8mKS+vplPI4YZvkMxLp2pNBf2wXhAuFX0HQzYQgJCt9GVNuyhcclhbA HppmY3Le79Te2ZJI74o61J2VGxgGHilqbx/JVznC6d4Z9zMiW1JciNdzjAIU23VKzjg== ARC-Message-Signature: i=2; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796233083; h=Received:DKIM-Signature:Received:From:Subject:Date:Message-Id: MIME-Version:Content-Type:Content-Transfer-Encoding:X-B4-Tracking:To: Cc:X-Mailer:X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=6jDyz+hD+QX+VHS9xc4jySdPriN0n7rGhbmXUyfhz/M=; b=hcgazfdmwgFy3g3gx7rkxe8j2eGfOl5YvGcpue07EFG3c7ES0UUznwhkbRiJ2LW79rEM ZzU1rTfMrMke8j4sOp3b0gjidrOv4zg0t3+uymu+lwln3/G4C0tmoWYIeEcbJaFQx4Dr3 DrIn9J2JCJdtAP5/c2/qDJDc0sUP3hPW6NCVM5AZcMesbtTq7OvJx3JY9BUTtsZZhaxZt VFqk+3/4J98Ohy99KQ7zmsdR66jD+w5pnjYlme6Kj71HhtDQScOLKRzWe4O4sIJUVcy4w iBVTAEkE7PgLxUC5A7cX63Zy3OB95Ildij7+Aeg0LmJLu9+ubh0N9neaT4qS9avh/sg== ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dkim=pass header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=axAcFrMx; arc=pass header.oldest-pass=0 smtp.remote-ip=100.103.45.18 Received: from smtp.kernel.org (quasi.space.kernel.org [100.103.45.18]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id D9D4C606A322; Wed, 2 Dec 2026 17:38:03 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.a=rsa-sha256 header.s=k20260515 header.b=axAcFrMx Authentication-Results: smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 ARC-Seal: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; cv=none; t=1796233083; b=27yhzP201SOY6BpEhMA2B/0efoGucOqF0zjMpyHtTziwgo05eCRQhp4PBRnr30HJmylN dXGBHwFLX0pfD/ON5jEUgxRYa3+mlZ6KfTvgNXuBX8xDE110YcaUqdTY3DsJIJg3fNvQP XOfMcSjp7Io44vMEpHwg3B0gTABU6eZpQKUl8AGtPrcuMBRhnncxps26lpKJL/yT8dWuk E19Cws7sFkHK3UME5XGwi8GQe2F57Qx18LLNWKLmBxRTLG8S2AtExtGRO25Eqi+ja/Ddd aTYjeRf4PaK9ePIVrr1QXqYqmvFyrwHhs2q3kEfGtwiibtjDrueRP//K++APNoKoX1Q== ARC-Message-Signature: i=1; d=kernel.org; s=arc20260519; a=rsa-sha256; c=relaxed/relaxed; t=1796233083; h=DKIM-Signature:Received:From:Subject:Date:Message-Id:MIME-Version: Content-Type:Content-Transfer-Encoding:X-B4-Tracking:To:Cc:X-Mailer: X-Developer-Signature:X-Developer-Key:X-Endpoint-Received: X-Original-From:Reply-To; bh=6jDyz+hD+QX+VHS9xc4jySdPriN0n7rGhbmXUyfhz/M=; b=061gD2SIEftQB3sWX1e63EdaJqDUdvPCDJKINJ3l4eAszAXvpGIc80EDN4fG0uzpbh3p FRVCHGLYoPjJ7QVy/ecfy6wcTqaiTFdOuNfDXAKFF/R4PDFMS5fkqQXgihaUeQ7joAKut Iv5zBr3gyBqmqXN1TY8p2J6yE0AqPNHseTEB78RDFSmsb4QOdJ6XbDaiadOhQXrdWpASF N6RYtzeSu/4VMQxDd5eOVyJAC6ybN2BYwC36n8qDsJfq2sazbpsdxkMvxC3jqm4Z1zNx9 JphrF2mRzi+E1V2kFqH/IX8MmTdlEuUQVK3zplitr0HNUMg2Jgb+ohFcckfo0pkfKzA== ARC-Authentication-Results: i=1; smtp.kernel.org; arc=none smtp.remote-ip=100.80.115.77 Received: from lkml.kernel.org (nexus.subspace.kernel.org [100.80.115.77]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.kernel.org (Postfix) with ESMTPS id CF7261F00924; Wed, 2 Dec 2026 17:37:51 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=kernel.org; s=k20260515; t=1796233083; bh=6jDyz+hD+QX+VHS9xc4jySdPriN0n7rGhbmXUyfhz/M=; h=From:Subject:Date:To:Cc:Reply-To; b=axAcFrMx+kEnZIjE/JWVzxU6WMpl346JM2WNnoK1E5xfZIZ+b3CUErKWrpKK8edjc zYfAU5itJV2itnV1RVo0jQnYB8ZraPAt1Zu9zD4E66b2On3ofJq4LKkSGyhM+rB8Ft Z40SPgQoSgKCyqQgC4djk2ORUiGIOF4+Wt9KMHmytHS7CMAN+RzpwjDtCkq0y8noA0 HAlMO/HmG1Kx487OoHhlqunsWwScXT+ruSa7dspZxrmUoynZ3oyXjhr019Hjk0DXrZ TCYpKQf279UFNRcJX+jO+00fhPhKkTCkwpI6MQknpo9EQMIl5OqSyskbAAEfasSIFB Rw2f6IJ+BVwKA== Received: from nexus.subspace.kernel.org (localhost [IPv6:::1]) by lkml.kernel.org (Postfix) with ESMTP id 3CD684F57A; Wed, 2 Dec 2026 17:37:51 +0000 (UTC) From: Selvamani Rajagopal via B4 Relay Subject: [PATCH net-next v13 00/15] Support for onsemi's S2500 10BASE-T1S MAC-PHY Date: Wed, 02 Dec 2026 09:37:43 -0800 Message-Id: <20261202-s2500-mac-phy-support-v13-0-a2908fad2693@onsemi.com> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 7bit X-B4-Tracking: v=1; b=H4sIAGhXEGsC/3XRS26DMBAA0KtEXtfVjI0ZO6veo+rCmKGhUgBhg hJFuXsNrRoq5KU/8+Z3F5HHlqM4Hu5i5LmNbd+lA+qXgwgn332ybOt0IRSoEkpAGZUBkGcf5HC 6yXgZhn6cZNFoz05BU5EWKXYYuWmvK/wuOp5kx9dJfPy8xEv1xWFa2OXvqY1TP97WGuZijfjNZ jLZ5kKCrDllC6hDWdu3vot8bl9Df16TzGbDYJFjTGKss1RUpBpSZseUG0a5HFMmBm1gculZE+4 YejIENsdQYgqywRJ5j97tGPtknMoyNjHEgOh9CBr2jPtjECDblFtGHLhhrKFqoN4xCE8Hocw5C AnSWBlfusqaivYQbiDUWQiXxjzatFB0RoU9pDaQym4d1VKRIWONqZ1r/k/o8Xh8A+niHqgWAwA A To: Selva Rajagopal , Andrew Lunn , "David S. Miller" , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Parthiban Veerasooran , Simon Horman , Jonathan Corbet , Shuah Khan , Randy Dunlap , Richard Cochran , Andrew Lunn , Heiner Kallweit , Russell King , Eric Dumazet , Piergiorgio Beruto , Willem de Bruijn , Eric Dumazet Cc: Selva Rajagopal , netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-doc@vger.kernel.org, Jerry Ray , Ciprian Regus , Krzysztof Kozlowski X-Mailer: b4 0.13.0 X-Developer-Signature: v=1; a=ed25519-sha256; t=1796233065; l=10562; i=Selvamani.Rajagopal@onsemi.com; s=20260531; h=from:subject:message-id; bh=MIztBf2ZiPA2kvhn0zZqtb8+vJUePvtLcSSkayGnnyM=; b=08TeuawIsxA+YMEwk0luUykwDwSnYYsvfFJvvKERO7DB1Z0mBr0AXi9hG0u4Da4Fl8KMgR5aE tbEdFd3k/T+C2qm1ezg6JoaMYYbidTjylHd98px9UyUIyyf4uYlcDa9 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 Reply-To: Selvamani.Rajagopal@onsemi.com This patch series brings support for onsemi's S2500, an IEEE 802.3cg compliant 10BASE-T1S Ethernet transceiver with an integrated Media Access Controller (MAC-PHY). The driver works with the OA TC6 framework that is already present, and supports hardware timestamping. The framework gets hardware timestamp support, a quirk to map MDIO_MMD_VEND1 to a vendor MMS, an API to set the TX credit threshold, an RX cut-through quirk and handling of the frame drop (FD) bit. It also moves to its own directory. A device tree binding is added and the framework documentation is updated. Through ethtool, the driver provides a register dump, MAC, PHY and RMON statistics, timestamp statistics and self-test, including PHY loopback. As S2500 has an internal PHY, onsemi's PHY driver is extended to support it. A new PHY core helper, genphy_loopback_no_speed(), is added for its loopback and is also used by the dp83867 driver. Changes to the current behavior: - NCN26000: enhanced noise immunity (ENI) is now enabled and disabled together with PLCA. - OA TC6 framework users: frames flagged with FD are dropped, received frames shorter than an Ethernet header are dropped, and drivers selecting OA_TC6 now depend on PTP_1588_CLOCK_OPTIONAL To: Andrew Lunn To: Heiner Kallweit To: Russell King To: David S. Miller To: Eric Dumazet To: Jakub Kicinski To: Paolo Abeni To: Andrew Lunn To: Parthiban Veerasooran To: Selva Rajagopal To: Richard Cochran To: Rob Herring To: Krzysztof Kozlowski To: Conor Dooley To: Simon Horman To: Jonathan Corbet To: Shuah Khan To: Randy Dunlap To: Eric Dumazet To: Piergiorgio Beruto To: Willem de Bruijn Cc: netdev@vger.kernel.org Cc: linux-kernel@vger.kernel.org Cc: devicetree@vger.kernel.org Cc: linux-doc@vger.kernel.org Cc: Jerry Ray Cc: Ciprian Regus Signed-off-by: Selvamani Rajagopal Changes in v13: - Serialize statistics refresh. - Drop the queued TX frame on interface down. - Remove the unchanged timestamp configuration shortcut. - Link to v12: https://lore.kernel.org/r/20261124-s2500-mac-phy-support-v12-0-3575855d99f9@onsemi.com Changes in v12: - Map MDIO_MMD_VEND1 to vendor MMS through a quirk parameter in oa_tc6_init - Do not drop a TX frame when no timestamp capture register is free, send it without a timestamp and count an error - Fix races in timestamp configuration and in interface down handling - Link to v11: https://lore.kernel.org/r/20261113-s2500-mac-phy-support-v11-0-7a186141952c@onsemi.com Changes in v11: - Create new patches to move vendor changes to its own patch - Improve commit message to be more informative of the changes - Add clarity to kernel documentation in oa-tc6-framework.rst - Fix issues potential Oops issue in S2500 driver. - Add logic to take care of frame drop bit from MAC-PHY - Link to v10: https://lore.kernel.org/r/20261106-s2500-mac-phy-support-v10-0-31b5a69b85b7@onsemi.com Changes in v10: - Removed config_intr callback in S2500 PHY driver - Removed writing status0/config0 from s2500 driver - Implemented API to set tx credit threshold and to enable RX cut-through mode - Drop the frame when frame drop bit in footer is set - Module name restored back to oa_tc6.ko from oa_tc6_mod.ko - Link to v9: https://lore.kernel.org/r/20261009-s2500-mac-phy-support-v9-0-dcefe1d0bf0d@onsemi.com Changes in v9: - Renamed the new phy API from having "fixed_speed" to "no_speed" - Fixed compilation issue due to having changes in the wrong patch - Added the MAINTAINERS changes to where files were introduced. - Fixed coding style issues reported. - Moved the order of patches so that selftest changes goes after s2500 support. - Made Pier's email ID consistent across to be consistent across the codebase. - Link to v8: https://lore.kernel.org/r/20260928-s2500-mac-phy-support-v8-0-7e011aacc309@onsemi.com Changes in v8: - Modified to use newer MMD based read/write APIs - clean up by removing unused definitions/initializations - Better handling of timestamp capture events by using bit fields so that we don't lose any event - timestamp skb queue is protected with spinlock - added reset-gpio in YAML file as support is recently added - removed ioctl from OA TC6 framework as it is not needed. - Link to v7: https://lore.kernel.org/all/20260708-s2500-mac-phy-support-v7-0-478c877aa1a9@onsemi.com Changes in v7: - Fixed compiler warning due to prototype mismatch - Moved the order of patches to ensure dt-bindings comes first before it is being used - Added missing review tag - Added missing MODULE_DEVICE_TABLE - OA_TC6 framework enables 64 bit timestamping mode by default. - Compiler related warnings fixed. - Link to v6: https://lore.kernel.org/r/20260629-s2500-mac-phy-support-v6-0-18ce79500371@onsemi.com Changes in v6: - Changes to ensure onsemi code stay within 80 columns. - Fixed the error of "not described in comments section" in comments section. - Fixed compiler warnings. - Link to v5: https://patch.msgid.link/20260614-s2500-mac-phy-support-v5-0-89874b72f725@onsemi.com Changes in v5: - kernel doc related changes in oa_tc.c, onsemi driver files and oa tc6 rst file - Link to v4: https://lore.kernel.org/r/20260605-s2500-mac-phy-support-v4-0-de0fbc13c6d8@onsemi.com Changes in v4: - Added return value comment for genphy_read/write_phy_mmd functions - Added genphy_loopback_fixed_speed helper function to be used in set_loopback callbacks - Updated networking documentation for OA TC6 framework to elaborate on what is expected in the ptp_clock_info structure for registration. - added spi-max-frequency in YAML file based on alert from sashiko-bot - Removed model/version from the onsemi driver's private structure as they were useful as "information-only" data. - Replaced the non-standard selftest with Linux's standard selftest and made it as a separate patch - Changed bit manipulation, shift operations to use macros so that it is clean and readable. - added new read_register and write_register apis with _mms postfix so that MMS (memory map selector) can be given as a parameter. - Fixed the wrong condition check with NETIF_F_RXFCS to subtract FCS size from the length of the frame. - Link to v3: https://lore.kernel.org/r/CY8PR02MB92499C9080614FA3CEB8CD0483162@CY8PR02MB9249.namprd02.prod.outlook.com Changes in v3: - Moved OA TC6 framework to its own directory. - Split changes to smaller patches based on feedback. - Added PHY loopback support as a separate patch. - New, read and write register APIs with extra parameter MMS - Link to v2: https://lore.kernel.org/r/CY8PR02MB924920C8825C7AE5D22EFA4483382@CY8PR02MB9249.namprd02.prod.outlook.com Changes in v2: - API to add vendor specific MMS to mdio device map. - Link to v1: https://lore.kernel.org/r/CY8PR02MB9249D083B637477C254F9B0583322@CY8PR02MB9249.namprd02.prod.outlook.com --- Selvamani Rajagopal (15): dt-bindings: net: add onsemi's S2500 Documentation: networking: Add timestamp related APIs to OA TC6 framework net: ethernet: oa_tc6: Move oa_tc6.c to its own directory net: ethernet: oa_tc6: Move constant definitions to header file net: ethernet: microchip: lan865x: Depends on PTP_1588_CLOCK_OPTIONAL net: ethernet: adi: adin1140: Depends on PTP_1588_CLOCK_OPTIONAL net: ethernet: oa_tc6: Support for hardware timestamp net: ethernet: oa_tc6: Drop frames if footer has FD bit set net: ethernet: oa_tc6: Support for vendor specific MMS net: ethernet: oa_tc6: APIs to customize CONFIG0 settings net: phy: ncn26000: Enable enhanced noise immunity net: phy: Add helper to modify only the PHY loopback bit net: phy: ncn26000: Support for onsemi's S2500 internal phy net: phy: dp83867: Use genphy_loopback_no_speed() net: ethernet: onsemi: s2500: Add driver support for S2500 .../devicetree/bindings/net/onnn,s2500.yaml | 71 +++ Documentation/networking/oa-tc6-framework.rst | 113 +++- MAINTAINERS | 11 +- drivers/net/ethernet/Kconfig | 13 +- drivers/net/ethernet/Makefile | 3 +- drivers/net/ethernet/adi/Kconfig | 1 + drivers/net/ethernet/microchip/lan865x/Kconfig | 1 + drivers/net/ethernet/oa_tc6/Kconfig | 16 + drivers/net/ethernet/oa_tc6/Makefile | 7 + .../ethernet/{oa_tc6.c => oa_tc6/oa_tc6_main.c} | 575 ++++++++++++++++----- drivers/net/ethernet/oa_tc6/oa_tc6_ptp.c | 67 +++ drivers/net/ethernet/oa_tc6/oa_tc6_std_def.h | 186 +++++++ drivers/net/ethernet/oa_tc6/oa_tc6_tstamp.c | 302 +++++++++++ drivers/net/ethernet/onsemi/Kconfig | 21 + drivers/net/ethernet/onsemi/Makefile | 6 + drivers/net/ethernet/onsemi/s2500/Kconfig | 20 + drivers/net/ethernet/onsemi/s2500/Makefile | 6 + drivers/net/ethernet/onsemi/s2500/s2500_ethtool.c | 392 ++++++++++++++ drivers/net/ethernet/onsemi/s2500/s2500_hw_def.h | 167 ++++++ drivers/net/ethernet/onsemi/s2500/s2500_main.c | 504 ++++++++++++++++++ drivers/net/ethernet/onsemi/s2500/s2500_ptp.c | 156 ++++++ drivers/net/phy/Kconfig | 2 +- drivers/net/phy/dp83867.c | 11 +- drivers/net/phy/ncn26000.c | 68 ++- drivers/net/phy/phy_device.c | 24 + include/linux/oa_tc6.h | 33 ++ include/linux/phy.h | 2 + 27 files changed, 2626 insertions(+), 152 deletions(-) --- base-commit: 41055751bb7b27c1317c679a9252baeebc4aa638 change-id: 20260601-s2500-mac-phy-support-4f3ae920fb73 Best regards, -- Selvamani Rajagopal