From patchwork Sun Aug 4 20:49:20 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752704 Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010050.outbound.protection.outlook.com [52.101.69.50]) (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 0E8C2179AE for ; Sun, 4 Aug 2024 20:49:23 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.50 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804567; cv=fail; b=mRh3AxxaDGuZoY3N/U4wzIjnRFeiOgPZOjfwEZgFIx9D0jmRoezox4Mseb6ihirMWlGtB3CvQzVzbEY8ZoUB8U46AnzD9ywve3+oDIw4fpFOMub8mPrKb4Z+kJeXgY+amnMMYUzVfa7472MVYs9LQgFJicAn6SdzdtMt5/rTUYY= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804567; c=relaxed/simple; bh=zHZZU+eMO+FrOY3Oel46Sqe/Wv2yGcs8HjWvaP+IS0w=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ufNcAq2RpfHtt7tKCkVUtqdoC+/8IS+lTTfI82+ACy8ifdutI5wlSwYmrF74EdtBzYKKeoom3D0sTcWS21iNe+9ssqnBdx4OYSQdYgGoZTkajygYZfIt0rfyVfmCFTFMFoUDo/Vn0iLNUIu8dIQATgLL8/HmfxhN5k29UH3a9Pg= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com; spf=pass smtp.mailfrom=oss.nxp.com; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b=lkf3kIo/; arc=fail smtp.client-ip=52.101.69.50 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=oss.nxp.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=NXP1.onmicrosoft.com header.i=@NXP1.onmicrosoft.com header.b="lkf3kIo/" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=OBezwlk6lLIWQah8DHEyjy6A7bmmOr9pTKB2xk3aLHp/csXcgHA3RrcUg+wxhW0+GlD//5nZXCirHsbWCW9OWpU2Di8WKh6Sd9PwB73lptf9ap0E5qxzygD0bGVLJmag6vC6gszyS8zDRV6xDRSUFFBYpprV1evTgQMx8ZQpWgvW7OiqwZc6qMMbLMwZRTrYSNOHi8Vo+vGjoBIV3s6u2V4X/3moxQjxURY8FSeQ4GvwkEW3KVHvH5dvhuOaFGlYBIYdWwokd4bG1HKtWNdf+mj5poT6tFiaNLYcAUb+o5CQJXAeek7emyTLQswb8vzmvgW6dJorp6JoXGm8JORNrA== 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=4aHwJ1puYs7FtDZRq6sNAQxrReo1YFuZndXmuCqk+DE=; b=ZBRFeHifVs9JejlovjLk0AC8izBAcHF0bB4G63edNn6sJ7Z/4awCGRB4wHOl2XqGiDx6oOep+Q2oOBomqz0ELklMx0Glm3nM9QGgcVtIyTUJ6f+U6h6d++iY5maC+2x6h70Zx3CkL5i19NV2WeMteoR+goOpPkzI0IuSaiQhUImCXagy9f6idrdW+K/PIuYSKBjOKED4aMyJ5IwSIIdCdR3Z/Nh2pOPI4XYbIO6UY6ViaxBDdhfw1fnXaRamXF4zaAWKbWNbWX61vxb2VX1e4lCBrtaFTpuWzjIE0TztOgN6XB0R57gzygcB9C2v5u5oB/DwU2FpnSIuOwna5v41+g== 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=4aHwJ1puYs7FtDZRq6sNAQxrReo1YFuZndXmuCqk+DE=; b=lkf3kIo/j9MbCH55x6EA5U4HVFWa/pNb5p7sI1IesiiPT1e8IB9eicvCNXOy7di+5q2+RakPgVTKPRtqyrNShZJb3XbHIwOt0grved47tHfXB4pqsWbBO6/rIV2e8lmN8zltHoWLdXyQaQZOQXWyoWHx4LFDdRTgpfeIlr/JLUE9GIGRygkYxFfNgXLcvL64S3Jg3M6/rJg6VANW4Y29/jLwVztUPwBt6gqtUf7ydUJsHqqMBX7Oq3mJNfHaEyNTdKqCLhzMmnOymGF7C7C/IG7uKK1e4492ps2DHoPcwxSHrWjslkjEfwIXaZobrjvkf1JfuuZJwC0oqOMscK1XEQ== Received: from AM9PR04MB8506.eurprd04.prod.outlook.com (2603:10a6:20b:431::16) by PA4PR04MB7965.eurprd04.prod.outlook.com (2603:10a6:102:c9::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7828.25; Sun, 4 Aug 2024 20:49:20 +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:49:20 +0000 From: "Jan Petrous (OSS)" To: "netdev@vger.kernel.org" CC: "Jan Petrous (OSS)" 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: Adrmrz+4BcZlv1cLQ5CYyuBA6jKoHg== Date: Sun, 4 Aug 2024 20:49:20 +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_|PA4PR04MB7965:EE_ x-ms-office365-filtering-correlation-id: 27bacc57-9168-45dc-5b83-08dcb4c6ea14 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|376014|366016|1800799024|38070700018; x-microsoft-antispam-message-info: VEtYejFtUeTzjNt/Jc8tngBucJ3SvIA5v2QcMMSC2MD7rGT1IwfuAUDT2qNrtkeFK/3y0YUhKINXQpYpMR4lxTxkwh2hR8HMgNnnDEdhbEtYoJnxq0uue5ESiICUF8jm04WQPwIiKBdFEbSPJNRU5ZiesQgdAqOETb5BUpdSKME69D0UaJw+hzQ+wHiqgDhiz4g5BmURe6Cnir7efQb07JrKxsS36E6q1rwd5LW7uFTc53avAOewqKMSpjIfMSEzkZ9vFDp8kjW7BoN86zox+7FRpCE9F2QPqTvgISNBMj8ie2joh5Fv6JXmwLH6F9XdYk6crRjTBl6vCHsLwnW71dfg74M5aE8Cj+3GMl0RyCOQaJHIWRBYo/wMH5hfpIkkwcn6zxbsJSUaqvF9cNqd4JyXJsjnlaMPWgAK+b2tIVSlw2VMf64MTBotLMNKOx/nXj11iCIV1FThhAQpzXcoyYhdXEV78QYmTFUM1malifEimC4LGXWLkLXV26rO/TO+oBW6NKWQWCbAMM1klwJLd6FrvNfwNu9DuKxz+La4YCQRrnUpGR0x67AkTukeNipe2FcrJAF0sot572r1Biw4qAbz//phn4g9IyzQCOyGfmyydPk04DxoGZdHko+wnFGC7nPlk9Znj3J7kKW59F2NIRrrmyD6uXFp2AnNXUh5dIQMGtcht3wH2jFa21KdLAIHt5Ipb1XJ3HCNVsPGp4lQsJggRwgD/Bh609dkHPmxfJRX22fLjCQomIFmvNLH+1DYIM0CwO0ji0iZontdxXQ1m/AI1gYWW4RTFxTx0pQPh3wg/z+lU0SaQSnkmzHmOAnHjI7NFZqPbjXH/io35qqZLMYlnqwrQhKXwRypmdOnBI+zuosLFCy2wGk3C2VpvSL5fhXGOcz+eaEfoWg3TbBHl/GJjQuGZKt5BgNFlEWluP2gpp9bpmJ+BBVVu2Wz1xcOue8yOfmIBML9dxUldMkf4qglckrsUZB+UAp2p2c5pKj3dn+M3sG22lHdLjxmLQFC8GWshFcnVQNCwABTAzP/3JpExCi1lbi+v5qRr8A6j7VJOSHadE2VBvplTdFJtBUvc2TNzHVHEZABdDYOpUwAmTLGQyjyInRqyOJZTmX5Sj4dD1hLdMOVMjjzYw/NCL9TK3uH8ATL7je79EybIyLBPa5PyV8Ct1k3kVr/CgL1dIf5GOblxy4uGKO7bySVWwT29CMFe4vd+TzwSjJPe21qfq4oJqQTYVXWhkrWpqJve9SSs15j2HPwGgL4VXA6Z5fK5VV8Gxgn84G6xpy9i3FbiXnVV2ZAYh3FWXU0weOXlzhPg7BWdYciY0V0AlbnCugUpaE+e+kmy+bof+YYFmfv3LeAcefXJpeFP4ZfJTkdUFw= 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)(376014)(366016)(1800799024)(38070700018);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: 3R9Lw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6e6uxb47ithh1+Tjsgxd5FOXLy4sbykPNknCvemwQxcyNe3qQV1yF5HHf86cf0posLjgr5OWf1UeQjUytDhPuYpP6t8svYQrui3TuPOOo2EyQKga5RqM531uUyZMYV12YAXQgaSg5vYPTGzS1kSRrYtysFaNgqBl6WUgVdCM/EbPEpBljv64Iq1ocNFzrXNxXHOFKsI0CZm/z2aP0XjzYO1L5WDwgUGhqutTeO+0XeJaUCq7kuYChAwuWdP0erDBloAOj2spHdS/JZo+rKLMeWvkQ6e05BRlHthL+F+G+Njsqi+PEQx61Gmc8L5aBOBhAwDfa6xFySN8cZPS6iz67EayaHnsCnIjbPU3W22rG2C97TDBW3XsoKplVPBMQ5f/fkZfKG3kN57XsdKMyqmV+ewf6rhAYjoU1gIcM2FQ2la94BAd6tw5ysJ6uN3RA0983lSGIaylR0yyTl7r0Q9dDea3xkAssajGv4Vqcm2sRjMgEYSUu+QaGR1DX/++0ChpCmpJ/Xyi Precedence: bulk X-Mailing-List: netdev@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: 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: 27bacc57-9168-45dc-5b83-08dcb4c6ea14 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:49:20.3355 (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: 4MtBuJehXAL/7hsa8i3VJKVwgqgGVIv0Oe708CO2IyRR/LVM2l5VmnFYENFrdXnqO/Xzl/OuHNy34sxG72UkpQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 [Resend patch 0/6 to netdev as it was forgotten in original mail] 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