From patchwork Sun Aug 4 20:39:26 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752703 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org 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.lore.kernel.org (Postfix) with ESMTPS id 69DFAC3DA64 for ; Sun, 4 Aug 2024 20:40:32 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version: Content-Transfer-Encoding:Content-Type:Message-ID:Date:Subject:CC:To:From: Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender :Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=gUu5pbyXRjTd/6NStP04iFCQqXnqi2s9NTNiu7QWdjs=; b=0GbjGJkjFURyY6k51KcmiAxtEw dFcwqF419+fewMdwvOSzQy4UAlNzpXnujJrfmpWg0Uz3Qx6ISnG/X/eUWCWcnpMYhwpb7pXIK/6nc SzOwQ/NLJMueMhhIJlln2upsKO3P9Bx+2HsmPFHTbO8KzgHZN/Qmj3ph8wpimy0cnZKtdyX3R7rFy ICCrGag6M76gjxbkNJYnTupXPy76cK/i5ub9OrYCsEB3qLtTTr/wQMUCG8b70rGNDEJ75Lqs78/lj pPOXRUuG4VkHkS68JMO7OUpZAM3SnwxpyR9BAsFzt0YBRucqKawvpZjLxSEY+mLc/2dqlu4+HrcJQ WNu4TYyQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sai1U-0000000DssJ-0JW0; Sun, 04 Aug 2024 20:40:12 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sai0y-0000000Dsmp-09bU for linux-arm-kernel@lists.infradead.org; Sun, 04 Aug 2024 20:39:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=IE1EAoxMsmCMzHNdNSlEKBP1J6ziTPCQi8xDVYUkwVdIUN0ynJCkZCVzfT+x9LggDkpSGaVDCUohfY9p1dwEXr4XB6Kfj0uusUpZnoFm8GqJ5Ph3GD1viTJzaSygFSxc77x9jveRaQwmejTs3Tn3WNdeO43arY+TRAfMq36XscSbXoIXYKyQDPkWE6Eis3cFVoPefZSmBmePxHVLLYoWy7aXgsqz0pFzyEyhqz2l3DkRXbwWGsz7U8BFEbyY/gVmybmWLx71Z+jAkAzJAi3uBJ5AvwCyLSzq3hxXRktT4x5NCGginvxodUBEophdrwrBvJlZwAmYbMdnUoKwDKe/Hg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=gUu5pbyXRjTd/6NStP04iFCQqXnqi2s9NTNiu7QWdjs=; b=ir+DjPDXEFm/PsldA3mehP+/iv2hlBKuWTcZi5tLCQEi4zib15H3gnktEEwkrjhOtyISyi/Od4lv/+kq9oL2MbjDu71AB00Y6gP2tI9PDTNkIvytdTk19lmtJb2w9F6waQySCwSlPcOjPA76k4O2gBuw4jEYP3EIlblBAT012DMAqNYA0GE99xs+wzrsPQIt4GPMLhNGgHA54cndmjpkFLwqzjS4lCwUChrOcJN8rcagRf3UlrpLQYbQ9cEwtiBIjmlXh9ig+UM5xrMsD7pRhNnEKYtmdenZiav8Vq1yQPjHqQUzBoZf8ZoZ9DDf0C9U/Wa4GZxv4dEMGu993dI4RQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=oss.nxp.com; dmarc=pass action=none header.from=oss.nxp.com; dkim=pass header.d=oss.nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=NXP1.onmicrosoft.com; s=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=gUu5pbyXRjTd/6NStP04iFCQqXnqi2s9NTNiu7QWdjs=; b=p4xgST/qoXVeG37ZHbSNuDW+rkQBrkskVBOQtkm4aOuNygcUlYGeGCV87IONZkEjXaoJltGoY6skoNP6ACGJrDhUsGi8zmxzxlBwOavV6FIGYlzccesbp0J2cdaQlmTFcEFzLORiJCBJ4DPzIN1FJux0PzZgVsQRd37dx3poHOVHtHwgVhjJiK+z4w+0oV1C2GzpL8fIJvyyq5DSDKdUCQx782RTPuwouEfFH/aUIX+oaLJjtnkJ8U+pI3hMUY3+tde+1LOodQE/Uj+Ok1yqbLqU1JbrcOJ4Zna/tTPTukoTL7EzojmYQD7+5dNPiwmO2FoUEHaAnveoAbgmki+irw== Received: from AM9PR04MB8506.eurprd04.prod.outlook.com (2603:10a6:20b:431::16) by AS8PR04MB8596.eurprd04.prod.outlook.com (2603:10a6:20b:427::10) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.26; Sun, 4 Aug 2024 20:39:26 +0000 Received: from AM9PR04MB8506.eurprd04.prod.outlook.com ([fe80::5f7:9bab:66a3:fe27]) by AM9PR04MB8506.eurprd04.prod.outlook.com ([fe80::5f7:9bab:66a3:fe27%4]) with mapi id 15.20.7828.024; Sun, 4 Aug 2024 20:39:26 +0000 From: "Jan Petrous (OSS)" To: Maxime Coquelin , Alexandre Torgue CC: dl-S32 , "linux-kernel@vger.kernel.org" , "linux-stm32@st-md-mailman.stormreply.com" , "linux-arm-kernel@lists.infradead.org" , Claudiu Manoil Subject: [PATCH 0/6] Add support for Synopsis DWMAC IP on NXP Automotive SoCs Thread-Topic: [PATCH 0/6] Add support for Synopsis DWMAC IP on NXP Automotive SoCs Thread-Index: Adrmh82HhCYlBOqeSieajd3V15CcHw== Date: Sun, 4 Aug 2024 20:39:26 +0000 Message-ID: Accept-Language: cs-CZ, en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: authentication-results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; x-ms-exchange-messagesentrepresentingtype: 1 x-ms-publictraffictype: Email x-ms-traffictypediagnostic: AM9PR04MB8506:EE_|AS8PR04MB8596:EE_ x-ms-office365-filtering-correlation-id: bd6ff6aa-c44a-4abd-1e41-08dcb4c58820 x-ms-exchange-sharedmailbox-routingagent-processed: True x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0;ARA:13230040|366016|1800799024|376014|38070700018; x-microsoft-antispam-message-info: kKwSaGNOdmAqtFM4hz/X26oNwG0kQ/2/CAAVF33TD9D3RIDTkbVIFbBkC4fzg+Pbn19vo9muAUPF1ZZWUaFjSSRBTIn1Y7inEa0EYoF1fHwFg7kUi8YyMVwg0wwTHQkScwo8Vt09w6ejTrwI+FEs+fOGwwwUr4GzDUZkxf49CCkoa6g9GHLt5PJVZfQyBPRFoY5lnKE7G2TFtxRips/TGAhjGuTuhXFho3AdFxxiNdVqIISoL/v+UudtvRIyd5YB0/GlqP4Rbwl7kcMA6mztSV75sUa0xi4/Bm2qfY2N43+zT0NUAcbaJ2D1vkJ45TXhROamMlPhv/HBpxMtYmlSp7op6ENe/uoC8fqDwp+KGZGT2rpaGnR+BTluVYAT6HiduRL79uYqZrJ+lU5t4w8kbx2RxGlFsT3AekEj1J6sDfB9RgYprTyGOoUr5cRRFCXPeLV4o7FCwtsl4Kbg8d+bIAy9aCU0VhaTFFk2cylMuUuhEKFATdOmP868IwS3rkWSmpDu3vYLG8tze1g420Baivtn37KhkOlIbRzhz8903hOy3se8FggisjFKz+iKylZaSeErd809GWSmm9KeRW++iPnpRk7g8I9dJdoP0lDnQ2rTr3HijUy+zB5bD9falextXHvyf33tXvwJ4gKtj4Vz5L2FuR9elzw+uzqCdJpgnwz7e4kETI83Nl601y4AXMoh/Yg0T0IYfpKt1EUEPaocBoO/iJMRTAZ7+oGurmz/nLtAdUHEGhUdTdOOuN+lvVYMAT1Z3sbk8D3twvyfO2uZBAdn9CULMUqaPWOwePe/vsaN63nrKcSdRY8h5Po1OJ0yiGtGxMQkcmofcyO1FHavo0MGaeidtp5Wkx26YqArHPyVMZqYWyx5Vkfl4623jIonjU8el9dNYaPHRbwi3nYezMWMukCxFjICso3nX5doLYwqvFBR4rY9sskP6TLpqEMj7tO7f0C+RWZYxmYILddDv7mQ4mM3+VlbsAKAOlO3iTyBaD1wFIx4wzSTMHIzHs9Mgfs3m1vu862S7C9BmCu3I/e8EpBuLUybO1BiFcbUlalRJm4MmZg7rlnmV5puhD4Ymv0TbFK6MbXkppcGRcW+p5mcTuARAUHj78jBvyisd4ocZil0PHhISwBx5xfo/emMItkN+BbZXJMNZX3dUX4zfi282EEfTLFqRJmZBLimFDRSJ4DUnfZwk29YqmelY7kM3DTDTq3jOjL0YuW/Wjzonbcq8mmKo41DGUjD9S856r6EtFwkcHnOM9ELMaf80UdGlvYCNV3mcY+QTO+p8DBtkzdbg+dqxZ8LNjKoojEAmF+vqQ3xE3v3gYgnFsTRBBClpVwQekA9ycctAHpqa1hsSyXxEn7xGHdPB99a6n2a+Fo= x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM9PR04MB8506.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(1800799024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fmDZ2fSSh6NYrK+1DF+vts1/LTR5luaM2M9EUM5B9sDBpmzcngdRKQv8BK4aSP7DBW3FacU+PU+MPrcg9vxP2oR9wA2jN3KFed20JtmkpcdnjLnhXVTuiU/TSx4lLLTXeLw/Y8zXunOqY+b0SlNiQucmwdqCsuc+wgVjQrqv9C5schs8SAAYkqzynaPOABWy65VaSrhs9sozJi0OThIv5iOY7HwjS7NVE3i3Sg0ZK/JCVZlKemGEzbfsUbez4h+0ujuZkRaV4otPIN8DNU3KWR7J9JxzPk05p8EslxSfGzsnt3t7dYt0bT3iOexuaSUvTBnUloS8/3OvxmlD0UrGxAqn8AgE0UW+Eim4IkRBfX/hz0B7gOhOO0wnAmpnaYyQJ+m3zoG7DNR02OX/rAbGWYjez9hdP82I5NyZZ1gyFtD6xCZNLnjFfl6UMyi28hJm1KQy3nGmVye7zb9OZnjbkimjwil0ZnsXcLjpOsDUj8/VzTDONGGa3F+AmwInguXYockpSsncMefjNqrfyxHc91TakUEN/VSS/CEmRWT9MoGemfTHWhnP9tzBOUC8Q9ppik9E6j6YvzmMVIoXYArbxxyOs7ks16bC MIME-Version: 1.0 X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: AM9PR04MB8506.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: bd6ff6aa-c44a-4abd-1e41-08dcb4c58820 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:39:26.4655 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: vdhvCzWie3w77ssLFHZyTFq3tOhCcai/5Y2s8SXLUuDdCX/si6vDjBELa9NCFf+89nqqorQFFVIzxmFNuIJv+w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8596 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240804_133940_108512_356F047B X-CRM114-Status: GOOD ( 11.61 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org The SoC series S32G2xx and S32G3xx feature one DWMAC instance, the SoC S32R45 has two instances. The devices can use RGMII/RMII/MII interface over Pinctrl device or the output can be routed to the embedded SerDes for SGMII connectivity. The provided stmmac glue code implements only basic functionality, interface support is restricted to RGMII only. This patchset adds stmmac glue driver based on downstream NXP git [0]. [0] https://github.com/nxp-auto-linux/linux Jan Petrous (OSS) (6): net: driver: stmmac: extend CSR calc support net: stmmac: Expand clock rate variables dt-bindings: net: Add DT bindings for DWMAC on NXP S32G/R SoCs net: stmmac: dwmac-s32cc: add basic NXP S32G/S32R glue driver MAINTAINERS: Add Jan Petrous as the NXP S32G/R DWMAC driver maintainer net: stmmac: dwmac-s32cc: Read PTP clock rate when ready .../bindings/net/nxp,s32cc-dwmac.yaml | 127 +++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + MAINTAINERS | 7 + drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + drivers/net/ethernet/stmicro/stmmac/common.h | 2 + .../stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- .../net/ethernet/stmicro/stmmac/dwmac-s32cc.c | 248 ++++++++++++++++++ .../net/ethernet/stmicro/stmmac/stmmac_main.c | 4 + .../ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- include/linux/stmmac.h | 10 +- 11 files changed, 409 insertions(+), 6 deletions(-) create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c