Received: by 2002:a05:7412:6592:b0:d7:7d3a:4fe2 with SMTP id m18csp2503907rdg; Mon, 14 Aug 2023 04:58:35 -0700 (PDT) X-Google-Smtp-Source: AGHT+IGRndG8yeEDXOdXAhfY3uUgOq4cGPuWeaIQyDGssr7zr96SZwAQDOtX3unXM3bs1pjfcYcx X-Received: by 2002:aa7:c319:0:b0:525:3e99:8ab9 with SMTP id l25-20020aa7c319000000b005253e998ab9mr5005138edq.10.1692014315234; Mon, 14 Aug 2023 04:58:35 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1692014315; cv=none; d=google.com; s=arc-20160816; b=ZhWOyhnksJn32XeXapF6x1qrRA+aUNIk57bs3flt0lVoz+0wG7mD8pqoZJ5fzbbg8A PGYcHtJCwiC0RsmFpYLLIUMJgwCb3U09cFQ4fvNf04bCY7d8cDzvBoaDLdRU2FulJoT3 Ty7En32L/nP2Vac1epYquR3v2uDfLGnT8cJoosXaYwa5EtUQgFigf+kO/sQePsF/Ba5E Lm5AgmdN9TXoopYsAr5vWr8Ro0BcJ70c63h9/z/jbJknnbETLYBhviEXngDcsKtCgafG ZNJhsI0ezj+welYuWiEYsmy7YJ154G3Zp75+1ydGYiFHELaPgX56LPs0qr0AnXLuPkBT AYUQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :message-id:date:subject:cc:to:from:dkim-signature; bh=57XUk92ZlkTTnzZmuSBzRzVS86e3pGIMjmRShA8tzuQ=; fh=TO4fkcEI9b5r/wMetIII7RIVPqbK0XaoWpj6Tf2aW8M=; b=YVEk3IDXjEb/aBK7ATaWTwIwKZyt3WpVyTZmcl0nXhzvlUrpZRd/q+9nVZkWbO0nkk nZUSknKP/Hqv2B7PzlCYNKYTdPHRbC3YLII9qpU6rPayjKWUbcp1LK9ASgguVIP1NznY 0D+Zgpu0Kexa5H7VKfZzigGa6zNso6pYcLDSFmyq6drSaOXSaQLssQ5B6ZiSM/AiIOjh OZW8nMFzpAP5blq122GrfWbW3ZVW4P/2LdfVkPkgz2pf0STQnnvcG30dfMUrQOSoAEZC wkogY+8+vZybXcljuIAWMCT1PwtA8s8GrIG5tX4NLOTTkbq2l7WsZ2GKDi7NIPl0oe4v 5m9Q== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zHRtUR5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g8-20020a056402180800b0052543ea081asi3779227edy.7.2023.08.14.04.58.11; Mon, 14 Aug 2023 04:58:35 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ti.com header.s=ti-com-17Q1 header.b=zHRtUR5F; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=QUARANTINE sp=NONE dis=NONE) header.from=ti.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S235596AbjHNKJW (ORCPT + 99 others); Mon, 14 Aug 2023 06:09:22 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236103AbjHNKJQ (ORCPT ); Mon, 14 Aug 2023 06:09:16 -0400 Received: from lelv0142.ext.ti.com (lelv0142.ext.ti.com [198.47.23.249]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 80CA7133; Mon, 14 Aug 2023 03:09:15 -0700 (PDT) Received: from fllv0035.itg.ti.com ([10.64.41.0]) by lelv0142.ext.ti.com (8.15.2/8.15.2) with ESMTP id 37EA8tqL021908; Mon, 14 Aug 2023 05:08:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ti.com; s=ti-com-17Q1; t=1692007735; bh=57XUk92ZlkTTnzZmuSBzRzVS86e3pGIMjmRShA8tzuQ=; h=From:To:CC:Subject:Date; b=zHRtUR5Fhsi9OxfwZ8QN7IOd2GsCtpwjpQjW7rNl1cH49dW+LGnL/uyWobBT9Zbnj YxHTwMRzJg2NHLIx0Lv9XLmFHZqK3+235Z1NIMG3cWTVDTRNtfiQ/ZEnsXy7xgwYZH rRKZfD98k0J1UxHf0JNPaCgfnNZ98ImFoj50hwJo= Received: from DLEE113.ent.ti.com (dlee113.ent.ti.com [157.170.170.24]) by fllv0035.itg.ti.com (8.15.2/8.15.2) with ESMTPS id 37EA8sxG030851 (version=TLSv1.2 cipher=AES256-GCM-SHA384 bits=256 verify=FAIL); Mon, 14 Aug 2023 05:08:55 -0500 Received: from DLEE114.ent.ti.com (157.170.170.25) by DLEE113.ent.ti.com (157.170.170.24) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23; Mon, 14 Aug 2023 05:08:54 -0500 Received: from fllv0039.itg.ti.com (10.64.41.19) by DLEE114.ent.ti.com (157.170.170.25) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_128_CBC_SHA256_P256) id 15.1.2507.23 via Frontend Transport; Mon, 14 Aug 2023 05:08:54 -0500 Received: from lelv0854.itg.ti.com (lelv0854.itg.ti.com [10.181.64.140]) by fllv0039.itg.ti.com (8.15.2/8.15.2) with ESMTP id 37EA8s9N033239; Mon, 14 Aug 2023 05:08:54 -0500 Received: from localhost (uda0501179.dhcp.ti.com [172.24.227.217]) by lelv0854.itg.ti.com (8.14.7/8.14.7) with ESMTP id 37EA8rBP020344; Mon, 14 Aug 2023 05:08:54 -0500 From: MD Danish Anwar To: Randy Dunlap , Roger Quadros , Simon Horman , Vignesh Raghavendra , Andrew Lunn , Richard Cochran , Conor Dooley , Krzysztof Kozlowski , Rob Herring , Paolo Abeni , Jakub Kicinski , Eric Dumazet , "David S. Miller" , MD Danish Anwar CC: , , , , , , Subject: [PATCH v4 0/5] Introduce IEP driver and packet timestamping support Date: Mon, 14 Aug 2023 15:38:42 +0530 Message-ID: <20230814100847.3531480-1-danishanwar@ti.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Content-Type: text/plain X-EXCLAIMER-MD-CONFIG: e1e8a2fd-e40a-4ac6-ac9b-f7e9cc9ee180 X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF, RCVD_IN_DNSWL_BLOCKED,SPF_HELO_PASS,SPF_PASS autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This series introduces Industrial Ethernet Peripheral (IEP) driver to support timestamping of ethernet packets and thus support PTP and PPS for PRU ICSSG ethernet ports. This series also adds 10M full duplex support for ICSSG ethernet driver. There are two IEP instances. IEP0 is used for packet timestamping while IEP1 is used for 10M full duplex support. This is v4 of the series [v1]. It addresses comments made on [v3]. This series is based on linux-next(#next-20230809). Change from v3 to v4: *) Changed compatible in iep dt bindings. Now each SoC has their own compatible in the binding with "ti,am654-icss-iep" as a fallback as asked by Conor. *) Addressed Andew's comments and removed helper APIs icss_iep_readl() / writel(). Now the settime/gettime APIs directly use readl() / writel(). *) Moved selecting TI_ICSS_IEP in Kconfig from patch 3 to patch 4. *) Removed forward declaration of icss_iep_of_match in patch 3. *) Replaced use of of_device_get_match_data() to device_get_match_data() in patch 3. *) Removed of_match_ptr() from patch 3 as it is not needed. Changes from v2 to v3: *) Addressed Roger's comment and moved IEP1 related changes in patch 5. *) Addressed Roger's comment and moved icss_iep.c / .h changes from patch 4 to patch 3. *) Added support for multiple timestamping in patch 4 as asked by Roger. *) Addressed Andrew's comment and added comment in case SPEED_10 in icssg_config_ipg() API. *) Kept compatible as "ti,am654-icss-iep" for all TI K3 SoCs Changes from v1 to v2: *) Addressed Simon's comment to fix reverse xmas tree declaration. Some APIs in patch 3 and 4 were not following reverse xmas tree variable declaration. Fixed it in this version. *) Addressed Conor's comments and removed unsupported SoCs from compatible comment in patch 1. *) Addded patch 2 which was not part of v1. Patch 2, adds IEP node to dt bindings for ICSSG. [v1] https://lore.kernel.org/all/20230803110153.3309577-1-danishanwar@ti.com/ [v2] https://lore.kernel.org/all/20230807110048.2611456-1-danishanwar@ti.com/ [v3] https://lore.kernel.org/all/20230809114906.21866-1-danishanwar@ti.com/ Thanks and Regards, Md Danish Anwar Grygorii Strashko (1): net: ti: icssg-prueth: am65x SR2.0 add 10M full duplex support MD Danish Anwar (2): dt-bindings: net: Add ICSS IEP dt-bindings: net: Add IEP property in ICSSG DT binding Roger Quadros (2): net: ti: icss-iep: Add IEP driver net: ti: icssg-prueth: add packet timestamping and ptp support .../devicetree/bindings/net/ti,icss-iep.yaml | 61 ++ .../bindings/net/ti,icssg-prueth.yaml | 7 + drivers/net/ethernet/ti/Kconfig | 12 + drivers/net/ethernet/ti/Makefile | 1 + drivers/net/ethernet/ti/icssg/icss_iep.c | 947 ++++++++++++++++++ drivers/net/ethernet/ti/icssg/icss_iep.h | 41 + drivers/net/ethernet/ti/icssg/icssg_config.c | 7 + drivers/net/ethernet/ti/icssg/icssg_ethtool.c | 21 + drivers/net/ethernet/ti/icssg/icssg_prueth.c | 451 ++++++++- drivers/net/ethernet/ti/icssg/icssg_prueth.h | 28 +- 10 files changed, 1568 insertions(+), 8 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/ti,icss-iep.yaml create mode 100644 drivers/net/ethernet/ti/icssg/icss_iep.c create mode 100644 drivers/net/ethernet/ti/icssg/icss_iep.h -- 2.34.1