From patchwork Sun Aug 4 20:49:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752705 X-Patchwork-Delegate: kuba@kernel.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013029.outbound.protection.outlook.com [52.101.67.29]) (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 37BE022095; Sun, 4 Aug 2024 20:49:37 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.29 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804580; cv=fail; b=pqwXCc0VgRIeybip9tOXwk//vak+8nqEpHk+Oy3g/zYFYhy/psWTRgXlJ43uS89DFqRf8gEOxS/d/4E9ybKTn1z1AgzPxPR3cOkP1u6/z47Kr9tJz2+LcWqMlPE4y0+YfPCe7JR7zHshzX1iG53gVpFR8kxIPsvoqipSwRRtfHs= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804580; c=relaxed/simple; bh=ZKX7VytUsWlSGRGU3wmsS3teLwQ6HYWpc4tmuTGjNlA=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=kgo6CfB79X9Njx8oQu+U6/yz8uMuUXAgCcSNuS0pOopBQxIvMBzUSf6Yxzyhd+1SRzaXSgj04r1SwQkQtqCLEYtiX0fOYJttXea2hIYl4VuOf7wW6Je5jS1qoV36FEqVqTBE9kq3YEU28Estcg9VBPTf1zK/8x/9o+hUFFTOwoY= 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=sF8WQm0L; arc=fail smtp.client-ip=52.101.67.29 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="sF8WQm0L" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=GwXIkNCKwXQh6mgc72/SwAe7lcYKFuJ7p978+Qx8WSZTqZjLvle17OCoP3BCk//YLQS09hccnMhTojvYB+KigDGtTpivxQDinmK7PDwJc3QDns6fP/LdOcxS2HF5/n8JQYYoE9sjJQCLJ5rF90ZLz/OTZb/UidjpQ19BxdMI7xDFyvpatsfEpCdq1f5PIPgodfEMEbgQA5O1GHqocQFEgKRiDoKmI9NUukrDIduSP6BYpKO+ZgonBaLszS8smvTov8GU61UUPOVY7Zc97aFCGmDzY9UPSVfvqO/YyD0d02GP9ab74Trg9HXmSeZJv4mnjmoo6Qqwk5scSaKIjKQSDQ== 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=PEVTv0FWlk8JDzY0sd7BIrVpqlx3+DsdjiPVsgRhvLY=; b=HCiiIybldg8x9U9ZertvqjXvwM6IytRTXqGWL5MepibbU0MeMDyll8Ak8V4b/odme+5YLOr3HaLpprai4l6YxdcIfEqy5KAuWB24CmdN8AD7n3JGzRpEOdEzZIflDczYtqJSnDK0P34RPp9j+fZWv91jIGdXS75/3FmffiKTvvGi781mTRB1CE0L/ZWVE3ueAkNACgZsmmAKrLAc5ODwwh531gMU46AhjEMNX/bj6dY3LuL5bH4qXer+VTIiqmHFlVx3cMnBIEKPwtK7I6StS0SfMkyObcIEeMzxs2I+1puf+hfhOiIfP3DiD/ueg3D4mR5qYAayseQg4h3LVmdagg== 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=PEVTv0FWlk8JDzY0sd7BIrVpqlx3+DsdjiPVsgRhvLY=; b=sF8WQm0LyX7eOnkY+XgMaavsWxwyozQ9+ivGipunsaZI55QmVva51843X6IPiiE0wKnXJL1Bxb824EYTXNDrB9IgF2I4kjtbWTb5VsHjk1QjGDwXUNCCT+seskAv3ZqGxy6dbwzQMcCenhKS4K9wZBYPbAqdELeR4HjwJwL8jpYs9kg/InkozOVGRqop8GYBL8MtkZG7XH9rInXQw+6Q4zTu9YJT4R3lBtiYLmY979Eks5Hsjq8/oEYr+trkM2k1RV4JBa2kuAkBWgghLJezd2WJTX3yWAZKG25aYhsUfjrkzxrRtoTPKiWJHYede97gFljG2oUyScUL4csSQLw5Rg== 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:35 +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:35 +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 , "netdev@vger.kernel.org" Subject: [PATCH 1/6] net: driver: stmmac: extend CSR calc support Thread-Topic: [PATCH 1/6] net: driver: stmmac: extend CSR calc support Thread-Index: AdrmqCAbIYfhhpSjQm+gwLO5S8kGvw== Date: Sun, 4 Aug 2024 20:49:35 +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: 11c2bb2b-6ac5-4009-f34f-08dcb4c6f2e3 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: 8PdM7t14UC7m6kvj8gewQKYr1uGwziconZg3kMAjOPD9psoFqv3yLllHQ5UMIcQQH0G34a0AY1bzzhMo/hX4lxUdU0uMwYPL8ueg6gHG1VePyvautTfO0022H8AxYkIPupQDtLQ3qttTWPz9PGBLeK1UIpgvUQX2Bx55e4DAvsRodAae6ARiXfca6mYMor/xsPVkRp3HGHkYi3WBeLQNizq6Xe5Cv6GwL46VSijyb0jxH7O63ZY8Jo7L5tNHtiCIfzyllSNmW+GnJsD7Eir5hNsG47yPB1u8CiNKKz9m/ThspEdZ8ajeKJ57Kd7vsG9eg4Vdi6clvboMCQ0fb53LPtZtGBBjEi9bsRw+3fqTtZ2V1fUDgVekMB9Y/vMmpnEYvnknac9Lmo1H2gKzugqD6ke7TQ3JuhxE29SR83k+GHZT4HWWQipmZwIEJh5MfTVM/H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ook.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: I2JiaV5EvVqLSga3PeujftYM58AZFNVnkjWlb3UarToGrHIUL1gX11iuPNSB9jTmr0LSVElcgvW+fF9dCcGD9O2ipxWHvgnkgHmMqz72WadtSKhUzNnh5lzLvjGprPLJI/r9GwQKPIU5f94jT8gI4bbDcFAOC1nB5jFx/He/cbapn7fWmIC/D9pN3+xZgXkF7AxMzodKsVFuXz6JaEtXVNs9vFrUIADDXAkoQNGilXpU1iEPRavt9p7Q3KX0gm7X7qm7rs1k1f/+Pxy3Vl96YhMeeQyp2nHw9uJobBzU2rps+bDvNU0zKbEFTI6yz1KmogmqRV93sjaIulHmayq9o6BPZvqcwNIotPcpjQFa6sCK4gPEdp//SbFgse60gKHSeRZVelQhjFmmF8bBwZUa7ZEwkbgbbqest8y3nQlwEdt897Q8DZM9+EDqyjgsPSykyeay+MgdrNshrxtZ3Oz/U/r7z02NzTn9IMOi+alvj6PLYr/88AOlEidbInpK5zXb2buLWysXjwI6yt55aQNvjjMIdnFvmaP++JgnF1sxsSMvQK47cl9CxEcpkN16UkO+CPGpliMFTuqPUfsZc1mw2hrqWyTLGA4AGQ44YMiySjZNOErHNoymEXYGI8BYIiWb3LgjaF/sq5g7VuLaax7UfXdyLc11docmEqNbBvu/7KLwCx4Vx9Tdv4BOWFPWvLJQZpnpdxQ2BaLNr4xVlTi0fsVRm3kxQQqJAE1+ga+xNP4gbsbanr2NXjGZ77vEySwItY3qJzntK6sMM1CGM9YvPjRgko1dxxriBYz71SXcNla1LaTZGX12kMbMJc/X1x8ojzE11R4SVDolKeFEBWVSlaEarQ2L+vjxk0EZeHquOg90rauSl1/WulIgJICR7pLkCEG0wM5f4xkSdqATc+SemwG172+gqPsc9D+5mmXZ2QF2K+AQk2HMkCz6ZhkerNC50FK74Spl7DnISbP810pS5UQOVCrDXPxdArNsZxptcRtnIKR5EBF2hpUbf4CWQi5ETrxo/KmcR2NG8Fbx85Y5koMJrP2O3Hwzj/aUwoADdtEY3huBYvXJNv2cOLL9nZ/ojG3BJgPLf8obVJrf4scLDBdqrGqCgMLlZyQ7un42jx3OltxnanE7YDyRu7ANEkwTlfvwtPZwv56mqilBQh0ptjGGcQ+e0WDkTwVz9+nDud1TiGbONq8psaYQm31HwJv966ceFExOdDzdwoRCqD7awZ7sRp9ILyxFPbY/tvRonZi+hQG/lwl6Jyf1pQBJnE0xyjju8/2LkVGpcA49rCzfEmg+tAEzhpOeL2S2cdvHHbVN4FVZqF6oRuX71tpkKjXZZ4ESeFbRB9xivT2yYucnAkerMiMQEkBdt1hrgklgDJR3jZnYlapSY6eqMleNGKn3zUjtpBOI64YVk6zXA9Lef23RFetHeAW08d4AzzMKbvem6X/qhN/grRKeO+PctEYsILhgi3sD8UkAwtYPPbUrAYLnzzjdXCVicsxeL0KvoB1zms+Z1YcRWBv1TeFbFw0OeFT7BUBMjb4EgGtDj0zMr6vaclDzqhm2cGoRAhOiKlsA6vOC3H1V0jF70ffq0iEn 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: 11c2bb2b-6ac5-4009-f34f-08dcb4c6f2e3 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:49:35.1159 (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: GAmvWBhtx/e9gSVQD0OGovZ1Wi8Wl3i1kakC8Sif2Hahsl+e+04T1Os7TdWp85xG6L/FpHmBKp+3npVcOCO92g== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 X-Patchwork-Delegate: kuba@kernel.org Add support for CSR clock range up to 800 MHz. Signed-off-by: Jan Petrous (OSS) --- drivers/net/ethernet/stmicro/stmmac/common.h | 2 ++ drivers/net/ethernet/stmicro/stmmac/stmmac_main.c | 4 ++++ include/linux/stmmac.h | 4 +++- 3 files changed, 9 insertions(+), 1 deletion(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/common.h b/drivers/net/ethernet/stmicro/stmmac/common.h index cd36ff4da68c..e90d3c5ac917 100644 --- a/drivers/net/ethernet/stmicro/stmmac/common.h +++ b/drivers/net/ethernet/stmicro/stmmac/common.h @@ -256,6 +256,8 @@ struct stmmac_safety_stats { #define CSR_F_150M 150000000 #define CSR_F_250M 250000000 #define CSR_F_300M 300000000 +#define CSR_F_500M 500000000 +#define CSR_F_800M 800000000 #define MAC_CSR_H_FRQ_MASK 0x20 diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c index f3a1b179aaea..ac80d8a2b743 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c @@ -324,6 +324,10 @@ static void stmmac_clk_csr_set(struct stmmac_priv *priv) priv->clk_csr = STMMAC_CSR_150_250M; else if ((clk_rate >= CSR_F_250M) && (clk_rate <= CSR_F_300M)) priv->clk_csr = STMMAC_CSR_250_300M; + else if ((clk_rate >= CSR_F_300M) && (clk_rate < CSR_F_500M)) + priv->clk_csr = STMMAC_CSR_300_500M; + else if ((clk_rate >= CSR_F_500M) && (clk_rate < CSR_F_800M)) + priv->clk_csr = STMMAC_CSR_500_800M; } if (priv->plat->flags & STMMAC_FLAG_HAS_SUN8I) { diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 84e13bd5df28..7caaa5ae6674 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -33,7 +33,9 @@ #define STMMAC_CSR_20_35M 0x2 /* MDC = clk_scr_i/16 */ #define STMMAC_CSR_35_60M 0x3 /* MDC = clk_scr_i/26 */ #define STMMAC_CSR_150_250M 0x4 /* MDC = clk_scr_i/102 */ -#define STMMAC_CSR_250_300M 0x5 /* MDC = clk_scr_i/122 */ +#define STMMAC_CSR_250_300M 0x5 /* MDC = clk_scr_i/124 */ +#define STMMAC_CSR_300_500M 0x6 /* MDC = clk_scr_i/204 */ +#define STMMAC_CSR_500_800M 0x7 /* MDC = clk_scr_i/324 */ /* MTL algorithms identifiers */ #define MTL_TX_ALGORITHM_WRR 0x0 From patchwork Sun Aug 4 20:49:49 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752706 X-Patchwork-Delegate: kuba@kernel.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013020.outbound.protection.outlook.com [52.101.67.20]) (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 D014C22095; Sun, 4 Aug 2024 20:49:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.20 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804594; cv=fail; b=QEKaeHuipnDbmpIWWyAA2TTYktdgDsbtfP9Xk0QmE5Ujlwz354XOQ0/Hem8/4KDu/2Pzxd6cRBDjccCBBgezWto/xQ4ZOCxdZYJogSk0SfqbQXFLvCCUot9dni/N17+KMITEDJH5EslFSn5Th6F5HlspLFnKMw7Xq2/T18YgQ/Y= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804594; c=relaxed/simple; bh=VcEYml2Z6QxrQIjfc1b9ysKDpIESjKw5ISWEWGK8bpI=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ZP5CtHRC3UHAFS7uo9cJIXu4uT9USbuE1KkfNCZvgPttERMjEHF3py5M8pOHOF1TFy0dN8EzJZoXvMidb3pN/nVXoPuOwv9WvgmrHjLUnzqPPxOjWqtzeM0VpioFGIlTjGp4Li8b/kpzbbJX4NmU2CkzC6Spta7mijHTDCIq5Rw= 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=lXvq/buU; arc=fail smtp.client-ip=52.101.67.20 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="lXvq/buU" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=qqRY/FxU6ImvBcX8p21D90k+yjtct+otYR0i6JA7FdIbH4MeU8R52nyQ0oEM6SlJtDCV1uNuBHaCpIHkNQJJFvAC5bkpZp7E7fMTGUwFCebUYOex5OOjmpOfsGmiOaWzi3lF0OdKFXCHlARQbvF5EdDUlflQFUpou90EYDUm95TPgaD3u2DvPEA849uKg4Oo0NmWfFgN+9+npcXLFxuXYcZdReid28zsgjq4f517FrWJAQB1exX1VinNrOQtAftp5hiOeRB2vwY/3KAYuQvfHPIkx0RrvnWk5trXXILD9fBYi8c9iuMv55FDGzsmBE2FX01WJHNKtJDO64T0oMdBhg== 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=h/OCgEgTxC3St53drlLN828a2omQ4ZUJEeU2RiR6h/0=; b=r90+zLya0i96dnBUplmPiFAyd+Cfaay6Va6vPBlD4JDzA/cmhtZftVwtwcvArYwnOcciMCDl/6bJIlASxLUe13OAyax5MLjvH3zCcK0UuY/40p5FwguXsSYBAE71zoipjRMmdtzJN32vCQNrBK+7mbL6rumkzRRRtQXX5wBCov0biESaYnPHOoGA/o+sffV/2JfCl+sf0sH2PLE+dfYuskKqTrcntRnDLfkMhN86agKTcb4Z/1L67l52xS5XSYzvC0c06M8T1oVbr5uu05ZiqLis6FvtphT179Cxkuv4CpaQxnXRX0kGM0wcoC1chwFxSqm7AKA5x+GKRnz0C3QasQ== 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=h/OCgEgTxC3St53drlLN828a2omQ4ZUJEeU2RiR6h/0=; b=lXvq/buU/phRItTrxzR9AV3WTEbgg/OrgM9F70RGbK9GcKLETbAu+UebB6OojJ3roFq2j9DMDHpWwzgrIRjdCbb3CaLwyWsX5g7A74lxle8Wtlfc6nDAj5KbrAaOqwbrw7APfjBUT/f5i43HjivBz9mwhikmJF8xqkdzjVc6euN2Ukv0MlCeTpBnKsOOJFfaZnaD+g4g92YWNac5CErL0URLygiI+K/sIl6I0bxBHzpM5Xcu+tkw4pbloBeY0ouK2CZ56rrUGlaZ8fjSdq7KAFOANLp+zdFxCixBOupgC1pS7M7QeWmd6B/n3BvUess5YscEah2e86ZgxsnbrvfmWg== 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:49 +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:49 +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 , "netdev@vger.kernel.org" Subject: [PATCH 2/6] net: stmmac: Expand clock rate variables Thread-Topic: [PATCH 2/6] net: stmmac: Expand clock rate variables Thread-Index: AdrmqsaM0WqC9DJ8TumkGgCGdwvf/w== Date: Sun, 4 Aug 2024 20:49:49 +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: 3e517082-a172-4f82-2316-08dcb4c6fb92 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: s2vJFxvmvb0+W6ADrT/gNdAXY2X+hruw2n7RrhZ2nkRTjy3jTcdHDAoGzf0Zda6JXr1L2Q3b6NmtQViPgtXDc/eF7oH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l/CZncrIXNmv0PrNcBdliUaWvO89/9w/891ICev5wCfuJi1PacQNQ1HhOAvbPbFifhktqs1Yrj90hkVmrf359yHRvPF5IveEwVgANz/3zjdAISHD012VyOG73YBCtImmy+GMa4ROpMtN5lCieTymc8IuyH6ug+Ln83hzC6vwXsW/56vVu68r94KfI50Q1MLg/lOUDqZIer+Xd3Yb1lJCUTzmd2Er/3sppEDXx4bGOPExthWdLLHLUQG7HqrqcYsWTuXKIr2fK3SmyhQ== 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: DlD+PusbAnObo1UJRM+QodCAuT8coSZq+T3nHaZuokB4+kpt/qP/dccyU9iSM1Hz/FGJ2+LLl76uIo7LzuRxvcgTTz8AuvRh34Io+RcKP23jQ5+d46+MFHhoX5fqvtT7am6ThTbQa85b+hmHZCqAU/noI2wh5VfSzoQ16wXXIYk/gCjlD1VNBViLipdcCcWe71JQOVGVeE1MBrGSom+xXExPasXhWIPp29H3REYrBJW1/DJHZFJwCAWVu9e67dRXWLLXkJyAilg8TBdWV705vq/vrdFr4jEcKWSNFcg1ZE1llt++1gmaLtPfPk5quy89dKcWwnqdpbzQ07f5ngSO+5AMv1HgzWECHWz2VzuhN930t4Ukp5NjRT8Cxx1LZq9ZEwgNZlg/ES2kN/1WJXDIHbvecpvrz0i/h0J8y8riyd2wo2/1u+EMe4sbPcwkqI3FNalYfbCAZbS2xiGbPIghdglas0+qD/fDGVPbpKy91solux2XmF2s3tfQ788VA+rHIUnVf6LznK13luQRuY0WU+WNdcLa3lUh2kivv6NtaT5bwsj3LXJhG/Xk/7mW0hJyD7o9qBHZl8GQojbE60F051/1t2896a8XpU2PC33CbSnNQ3d9YK2VZahuUpLyd+oYEqmACCT0zEfYiVeXNKvX8SNAXu+SiUW4NCZE4ITa2YdgflYlhSKbEhcJEoU2kSFmbdcW8Ziv9BeAnu/s+hdfqWYVEKmhOs2U/cHRea8ToCD2I4qqQG53zyLDfTVMcqf1HumxKS3c9l06906Zv686zPAHPizvRNJZ+uZsXREFjNU0kYx022DyDDwrZlPwP0VG+c0pmF1yoPWjkgHuGALKWt3lGY6//rC+bLY7fbwc1S9ZD+0JvBIg3CqCXw2Lygzx4RsVRwqzc44XgZZJGpl7G7ujCmvcmjNLUAlQCa8vgINSfh9sPPTEiIB1yN5E7XuR3W1Gz5Z7tu2Cpk7h3Rloxnh8k63oDY/6T4xaGaF1yBAAPP4/4wp2XHWfRzxcYAqjYVoxOg0foAW1VzNwW6ewfOgqHXrLwqE5l2vo2d3UJOookeLKWND8/dscDDbzORJ5HFauE6qCccG6u4ONdc8DdhnkWo+t3o2WBeskv2/6vBGJTGXjAJN36bsENerqH+tQGZN54VUFMmeXtFrwVW821E84w6SfUmRni5BeZQoUba5sZJ6U+OCssXffyuE+0fKe9D4JC5S7yAkdT/4Jw+01uQOzrtcdLvI7H5NqVcew7KPjhezNCRIPtRJeAWuP/i5oIyzAZaKAvPW5pKlknUUBcPyi5hvvp4dyVUsYePVXgA3PTTVjfzAGwJt2pXeWh4Bj15GluKhn3j2ttYA3DO2H+EsJ5i/hag83MI5wCMXrdxWdNs5957RG4bqHkXjf9KMd2kPuF133dNPcL24xXCXvTk92DyjV2aDh7/X4JJgJh5N5Dq1qJY+I11UYvONZ5u9d+Sfuk9mVlgdE9NhV9gVU0cfyWJDfnXRv7jEo9FKrRaMrGipwejyRIjjXm656Q6gmrp4eHOGQEY4waCTTzhxXfbt6SMYACOLjQEUI68r+pNhR0UvIPa16Co/kCQ80Bu3h 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: 3e517082-a172-4f82-2316-08dcb4c6fb92 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:49:49.6665 (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: MvjY9BChH6JNreqE3unT0fAWCqtV0dYrrRsSNn0PALnCGjtgvR1PJh+QwJsx7NwYv+tQYsj2/iJEzhzqQERfGA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 X-Patchwork-Delegate: kuba@kernel.org The clock API clk_get_rate() returns unsigned long value. Expand affected members of stmmac platform data. Signed-off-by: Jan Petrous (OSS) Reviewed-by: Andrew Lunn Reviewed-by: Serge Semin --- drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c | 2 +- drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c | 2 +- include/linux/stmmac.h | 6 +++--- 3 files changed, 5 insertions(+), 5 deletions(-) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c index 901a3c1959fa..2a5b38723635 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-qcom-ethqos.c @@ -777,7 +777,7 @@ static void ethqos_ptp_clk_freq_config(struct stmmac_priv *priv) netdev_err(priv->dev, "Failed to max out clk_ptp_ref: %d\n", err); plat_dat->clk_ptp_rate = clk_get_rate(plat_dat->clk_ptp_ref); - netdev_dbg(priv->dev, "PTP rate %d\n", plat_dat->clk_ptp_rate); + netdev_dbg(priv->dev, "PTP rate %lu\n", plat_dat->clk_ptp_rate); } static int qcom_ethqos_probe(struct platform_device *pdev) diff --git a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c index ad868e8d195d..b1e4df1a86a0 100644 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_platform.c @@ -639,7 +639,7 @@ stmmac_probe_config_dt(struct platform_device *pdev, u8 *mac) dev_info(&pdev->dev, "PTP uses main clock\n"); } else { plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); - dev_dbg(&pdev->dev, "PTP rate %d\n", plat->clk_ptp_rate); + dev_dbg(&pdev->dev, "PTP rate %lu\n", plat->clk_ptp_rate); } plat->stmmac_rst = devm_reset_control_get_optional(&pdev->dev, diff --git a/include/linux/stmmac.h b/include/linux/stmmac.h index 7caaa5ae6674..47a763699916 100644 --- a/include/linux/stmmac.h +++ b/include/linux/stmmac.h @@ -279,8 +279,8 @@ struct plat_stmmacenet_data { struct clk *stmmac_clk; struct clk *pclk; struct clk *clk_ptp_ref; - unsigned int clk_ptp_rate; - unsigned int clk_ref_rate; + unsigned long clk_ptp_rate; + unsigned long clk_ref_rate; unsigned int mult_fact_100ns; s32 ptp_max_adj; u32 cdc_error_adj; @@ -292,7 +292,7 @@ struct plat_stmmacenet_data { int mac_port_sel_speed; int has_xgmac; u8 vlan_fail_q; - unsigned int eee_usecs_rate; + unsigned long eee_usecs_rate; struct pci_dev *pdev; int int_snapshot_num; int msi_mac_vec; From patchwork Sun Aug 4 20:49:58 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752707 X-Patchwork-Delegate: kuba@kernel.org Received: from DUZPR83CU001.outbound.protection.outlook.com (mail-northeuropeazon11013045.outbound.protection.outlook.com [52.101.67.45]) (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 C634877102; Sun, 4 Aug 2024 20:50:01 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.67.45 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804604; cv=fail; b=IWoxUP4f5e1N8yn4fQEt17ocVOjRc3Ec2nHKWr6vr+2SrChjvCLbdynZjyl3RVjUswm6m+nHRkEWfGTj4sJWI//Inrg7fcVmhwxo9wmM1dkUniuw5fPssrdQdXBUQNBCt8+D6TfxJ6blt2pg79XqHKAbFJmQU65FfwrX3h8knXo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804604; c=relaxed/simple; bh=rsfZWh6Pdl8abiHTkN8k5uYzX6cbziQ2r4PDgjZREk0=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=B663h9KqAAEN++b9jfeeRDcftCag6XL6VtNhfvc7aJdFYl0bDfPLGeAnBuC07MsHTfMJdpe8Z66s90fGir3djkZmF5EcIPSOGsmEc+omnbQwCjz6qTy9YXB8z+2I9Yx7m/Ecwao5oa0rMItMcn4VcKs2Sx+muVJsNwrL5OviTTw= 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=w15O0Qcc; arc=fail smtp.client-ip=52.101.67.45 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="w15O0Qcc" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=BSPypwUng6dLspPuJLzYnoZBrjt6Gzdnp6qazIpZWworA5A0caUH7PORJP0xXZSXIfersTA1g/Q1pmmoJU6IjE/tVKoMWOlh67Aq3kTBFtSqxWxD8A/tT1GnNlQRdMPPPHPBMZA7oIPk/hSX9oIUaPOYztoimQq/kdNAPAY+hsgjQh/bTc6pUIU1txaofUYBxj2wfrFkKtPH9oNChuhM+LlpyvHmb/n9cZmeDu+F3K6uBfrLXgP8YYiSSwRKjzwnZrGxNCbowygRxBDS3CbB03PVXc36fUhyUUpx7zywT84PbhN/+RG/jRWtMweKW0y09JLsvJ2tB9XbcumpHXQ0zQ== 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=qwKhSRw+uiEh5mXtgk+giF0HBGnyeb2UKaFcSBnRScg=; b=fboHan2sFZA2vWWRrcsyvKp6l3SvnnUtCqmasOOK+dvxwHGn0SI0/XHHtndVi5fz6Ae+HFDyFpa7tqFE0Iqw2I9vr7IuakFrzIIBbL+BcuzqLIEzc60XrKFMQYHHPimmdC3dzzU1Y3fRSAGUTOu7xh7bHlaWDVkcKrgDrwYQcOSMASwh7gYsZRo/Vx2dOmJWzJx1WMCdSCoBqZ4+uEKSqqUvrbtpT3KyfC4AG03mooviS9WZ9heVJbzhInIIWzbsB8w7HTrnIxzf4n5tM13kKXTIKTWNroYmOiZ720+Kt12d7jtx6BHBpuPFaqpJR8Bvbej3H5ngBrYA1g7O9+FuGw== 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=qwKhSRw+uiEh5mXtgk+giF0HBGnyeb2UKaFcSBnRScg=; b=w15O0Qcce+QuQ/VG774emuAEM7i+n4KaKNRp9SzszBcaZdzyaf11+417l79GPZl+kP6SScI9LxM1sGmSujSYYCfRVqcnurVn9D9hOP3/AdQKGkeR90rEkvW28Ucx/OAQh3PXWG3h9uW2k1N3U43LS0sIGQkS5oMXywZT4dgqSZm0gnaQIkvTDMyoOqkwr23IouywtK3YVlY9iUG656peJnbcBpR5EeJZs6fEYj31KIDVxYGQMnpbDWEO8+umDq4asHA+4wsgVyE5wLpyZ+FO18/Ono/oqOESCaEqD9EFIw9lt4/fI8fPVLtvmJclfcBugnNAKZsmaUiBeJHXX09otw== 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:58 +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:58 +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 , "netdev@vger.kernel.org" Subject: [PATCH 3/6] dt-bindings: net: Add DT bindings for DWMAC on NXP S32G/R Thread-Topic: [PATCH 3/6] dt-bindings: net: Add DT bindings for DWMAC on NXP S32G/R Thread-Index: AdrmrOTtkwWMBqX8SE2obTTIuZV8xg== Date: Sun, 4 Aug 2024 20:49:58 +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: 95e724cd-036c-482e-17f3-08dcb4c7010c 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: bsV0Lq89C/tHUrOl3M0uTMiXfknKIIs6y7Ka5KPhdaZSRwbi8G+mxj801D2/TKeJJn7IkZmxiqaqpBsmOGaTk0lSbNnVUG6rG12czWjcli6k3oyIzuJ2Mp+DzxMEQaDCRmwz0ghL/t03ct+8/sC4r6WZDfSYwS1N5RZ48fCswEu1+4xzS2YIrsFfqi4Ozjxv5FAe9A/xpNfIGGbKzit6PjVGmdHoQj4ucBWMcq3e45BfgU3uO+8PvfU7peBT+4Nn2WeFREbaIvaLgYflk5AJwYM4Jm9Q6bMK+fnGJYyIlZfLV1uUZidwJLbs9Iax6mHxc804ftZIwESwfZaRTFiokP3s2G/+ZVXcIejJaVhnwuQH+NaVwUWxkXNwibVY+S3X7PTPpJlgY7oxMtFcVbaK4N9SsFRBo+bDP1PSflP1367ov54ks+jm2QEB98rMaWxXTxjswPFIkPdJ+3Y4QoayLCuMhshCFvfRpmIiRvCn1Lkd1V6XGziiYfIFcnkgiyvNLiusoGn24xGJfxdeK8RTeH0KlcUjw4JLcnCueUER9Azh79A59g8/mKDPlf9hBrPJ7vL08L7HUB9P/oJXeC9B8AZKLC6dfIqoiGKkjS76b3D7hrl7GOBUNn1o4puPIzTZuVTyAh4Pjwt5Cl1Zqj8cjERb5bMxhFK4wqotPbsECF2J178icXcl5yT2eAYCSu+7epqiwGNIVUEb5mbLrhM7GikltQLiS/qsHs2qcxwjA1biJBGceHJFkz1QnPSFtxnawlMFZXFe/ihwLC2MZlzjjlyUHr2tAxk4G/NFZZQoiwAWf2sjXFy1SvZKGvaY8eWxf56a7zFJ2RvpJHYllT5FGtDsqeycS9Gs2h2Ys6Yax3EhgLRaLRB9s5VHfSUmF6pgY0aAXnU+6YTelkspdGbitthfBfDknDKVIdlZWA8HoycufZsQVU9AB/+zIdmgjhO6vZ+QI3tBy0tZ2BQpSWEP+hvB6+klZovghfXzlIaWzrTLYzEIt4puEwt2C++FxqvERjw3kVLrmnWVa/Vzv4XcYEPxhWjHvPhEDn2tI0onbJJDFfUo6xqaBFxi6JInip4C9NwGmji55HioQNF//Fi3A9IogaPnDajiWNhlTfyd/gLc8BrNBYjeR5u9HtH8jPy0XIJt5ygPmMrtO5/FqGv1Y0n9O5uq2dB+6O5cpNNb4+FSKEhGxyQV7QXpmQufWT809Y2345evqE41H+DlGDGvI0EImLwnn5/++TxWPCewMSYpxDF+UglG1mJU6DJpdeS9mcc2vZh+StpLJQ9VxGJ0Ua2sUJQS0Coodf6apv9GiH9j2arImeP3UtI1nqcRm3kcRX0eFAZRd7T9hF+Unj6ETZey70kTgxqXNIp4hYB7/gI= 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: gOZguMxaqw8ic/M74yQiP+Ij+BmDG0gblDTO9anF3MRHTWqOLWtL6UW8TXR74OKECdtMt7OYNiBLQ0uMTnGs+shUmhGHQajo/RMe9E/jD05BzubyPqOvqbsEVMlCe1smfuLFcqL2S8jOrd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kw6N6E/O+XqA0pV2LhOhH6K1D+auQ/WjTq9qi5o/pXZk6ZR84jAS61f5M0bG6RFwwvRnHDn+vdmFhT1SASe1b/xf5nxNzlAvwx++M9MXSWIZQbUxpSGf5KcGYp2g7YWXzire9OQ2pk+AJ2q0NqSRtN7IdB1dkf4A1rDaKu1sUr+0AfwsE+gSEOvcJnXB9fRAMKyY0qkqyDSXKCPSYL9kjhUv4W6s7dGyZ6k1DTpmbmxLc/uvgxj7BmhuHqO+WFXLNrln8uTxPEb9cYcMycCsMLnoM45c5gCH0Xd3Er9Y4Eub5qHze6pKVjCcqcnSBAnrZFOyLX3+1ZoPfdrqUdTUhUL89bW3tDnOc9CGyo6wIRLl3BaUlD7lFUnE1+ 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: 95e724cd-036c-482e-17f3-08dcb4c7010c X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:49:58.8563 (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: 6lrJzuIad+BiLWyBFbFeGr5ZjuoJWf/XQhl+oyFokvRDCPnvKvzmfKfLzaA9beAxtMe27nBIMiFTtbBDgJ2dnw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 X-Patchwork-Delegate: kuba@kernel.org Add basic description for DWMAC ethernet IP on NXP S32G2xx, S32G3xx and S32R45 automotive series SoCs. Signed-off-by: Jan Petrous (OSS) --- .../bindings/net/nxp,s32cc-dwmac.yaml | 127 ++++++++++++++++++ .../devicetree/bindings/net/snps,dwmac.yaml | 1 + 2 files changed, 128 insertions(+) create mode 100644 Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml diff --git a/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml new file mode 100644 index 000000000000..443ad918a9a5 --- /dev/null +++ b/Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml @@ -0,0 +1,127 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +# Copyright 2021-2024 NXP +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/net/nxp,s32cc-dwmac.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: NXP S32G2xx/S32G3xx/S32R45 GMAC ethernet controller + +maintainers: + - Jan Petrous (OSS) + +description: | + This device is a platform glue layer for stmmac. + Please see snps,dwmac.yaml for the other unchanged properties. + +properties: + compatible: + enum: + - nxp,s32g2-dwmac + - nxp,s32g3-dwmac + - nxp,s32r45-dwmac + + reg: + items: + - description: Main GMAC registers + - description: GMAC PHY mode control register + + interrupts: + description: Common GMAC interrupt + + interrupt-names: + const: macirq + + clocks: + items: + - description: Main GMAC clock + - description: Transmit clock + - description: Receive clock + - description: PTP reference clock + + clock-names: + items: + - const: stmmaceth + - const: tx + - const: rx + - const: ptp_ref + +required: + - compatible + - reg + - interrupts + - interrupt-names + - clocks + - clock-names + - phy-mode + +allOf: + - $ref: snps,dwmac.yaml# + +unevaluatedProperties: false + +examples: + - | + #include + #include + #include + bus { + #address-cells = <2>; + #size-cells = <2>; + + ethernet@4033c000 { + compatible = "nxp,s32cc-dwmac"; + reg = <0x0 0x4033c000 0x0 0x2000>, /* gmac IP */ + <0x0 0x4007c004 0x0 0x4>; /* GMAC_0_CTRL_STS */ + interrupt-parent = <&gic>; + interrupts = ; + interrupt-names = "macirq"; + snps,mtl-rx-config = <&mtl_rx_setup>; + snps,mtl-tx-config = <&mtl_tx_setup>; + clocks = <&clks 24>, <&clks 17>, <&clks 16>, <&clks 15>; + clock-names = "stmmaceth", "tx", "rx", "ptp_ref"; + phy-mode = "rgmii-id"; + phy-handle = <&phy0>; + + mtl_rx_setup: rx-queues-config { + snps,rx-queues-to-use = <5>; + + queue0 { + }; + queue1 { + }; + queue2 { + }; + queue3 { + }; + queue4 { + }; + }; + + mtl_tx_setup: tx-queues-config { + snps,tx-queues-to-use = <5>; + + queue0 { + }; + queue1 { + }; + queue2 { + }; + queue3 { + }; + queue4 { + }; + }; + + mdio { + #address-cells = <1>; + #size-cells = <0>; + compatible = "snps,dwmac-mdio"; + + phy0: ethernet-phy@0 { + reg = <0>; + }; + + }; + }; + }; diff --git a/Documentation/devicetree/bindings/net/snps,dwmac.yaml b/Documentation/devicetree/bindings/net/snps,dwmac.yaml index 3eb65e63fdae..3311438f67ee 100644 --- a/Documentation/devicetree/bindings/net/snps,dwmac.yaml +++ b/Documentation/devicetree/bindings/net/snps,dwmac.yaml @@ -66,6 +66,7 @@ properties: - ingenic,x2000-mac - loongson,ls2k-dwmac - loongson,ls7a-dwmac + - nxp,s32cc-dwmac - qcom,qcs404-ethqos - qcom,sa8775p-ethqos - qcom,sc8280xp-ethqos From patchwork Sun Aug 4 20:50:10 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752708 X-Patchwork-Delegate: kuba@kernel.org Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011067.outbound.protection.outlook.com [52.101.70.67]) (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 90C261CF8B; Sun, 4 Aug 2024 20:50:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.67 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804616; cv=fail; b=PU0agBPIj0R783TWXiMcdaJptlAs4FiY9pLbvtVg8QFpaPYIP/+x1p7hT5TTzM0/zBgSTXn1VA/zv6pt1OGHABjz/yzcXi6ISRviTy+HA/0DgVt7C5K7ieT2p0mAnNPfCVs0ga5qB+fcs3RyLrnq3RWu2Iye7CffYviviKoFBFk= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804616; c=relaxed/simple; bh=sTB18sPciT/bNyq5XCIJM9I/CtJ5y5lkn7tdhyW/Wis=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=AAYXIA1+LUtQFjSDi7sv7IauB5+AzdSDbxJyWAq1fM2+RL+vA+ErDRdCxYVhoWrsUHhZyvEZ0w06IFLv+ahl9nnX639TdfyAvyycWWP/UMJ+KQhMtQlN6AI33OWenEcAelBl+AqkIby8qyK8BAvaLmkPdEBkrnztuY4pNnXkAog= 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=qWQmQIbC; arc=fail smtp.client-ip=52.101.70.67 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="qWQmQIbC" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=C8i+rOUk2h8E1djyAmgQ6pRx8cKp2kWYeFsec2W/OuCpoMkFxuyp9ArJXIR9/a2yOiaqxyBbLV84Yje33VQJrMk7T0+Qe7bwXHoPtByPzBXHcFFIpSBt746Kz7b/r9FKE2/5tCMvnjUsYoksS16vLqhkauEUGX4yVs/WI0jlMWAdW7VmZ47boDyddUEXlqWc/GxMZtC5bfhNIdtZnqswjep9t+zlqIMCCW6UOJdVMTRLQarjX9dS4DcmzHHAgkbRKi8ayx3h15RkNnMAHjDDgl/ne2qUQDFvRmmdDL9R5I3g+AGgudzbrRZhIjQHHXa0q3AsxCf3+PK7x4Fs8fRRiA== 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=NMB8mNVRjdVqv2i9GDwiXIMh+SsN9kN0r8pyi7oJWD0=; b=iC+VhPIVXjuMkHYDvGwofyRSuGhebuUcEmdxlbgunr67MGi5AUdf3xCwNAFz1p/XZgcUtp3oh4xe5yn3E6Zhj0AwX4SphwO1WKWfX9qacuu9UUEDgmrg1nnzHke94VbRHl257zXrY3sSdnacVE+q5KxQLC2N17S7XJbMaBzD65gvYoGk7WuUyaBH9u1UGp/L20KWLApoyKoxS9Dkjh547ks6t393ab7OB3Flkr/ljkr0HHgZ6jt7CJOCHMb20KN0t+llDt8Hfa5fNxJaAtBtDYpT+m3Im6bGXpgVDz/dSu7kOtVs0orcOSA7ZSBKf6LlkWLAJ5s3/1gqy/RE3lmcVg== 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=NMB8mNVRjdVqv2i9GDwiXIMh+SsN9kN0r8pyi7oJWD0=; b=qWQmQIbCgh3jZqL1k6DjoQStNQtRqHgcWNsX283JCqppUR2tuqTFd9FyANj59yvXb0LN4bL1NdzDDIRWayj0a5M5J7nrqMCHgPn9P8Eqp7LAuPkFonLXzAHHiur1ofm+Eyv5J44KOIzz1yOLSp3TbaZ9fD1is4brBCOhp/QPyoWoZA4Eo/QdrG4vIqTUeHz4gZZBuKIblXndUDMa+UCI3SLqDpnVrA0vBR57FWjfT/CzuED5wGsGX09vYk5tdCPi8BqORzzMjhGeJdvab/11BX5ez3boIi6wR4gKq+b/BtFc3D2BqExnSe+WH+5PsMX3x6BKvgbF6Y6+XjH8F2emfg== 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:50:10 +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:50:10 +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 , "netdev@vger.kernel.org" Subject: [PATCH 4/6] net: stmmac: dwmac-s32cc: add basic NXP S32G/S32R glue Thread-Topic: [PATCH 4/6] net: stmmac: dwmac-s32cc: add basic NXP S32G/S32R glue Thread-Index: AdrmrVyUKT3e9hhXSvuIq/Wc0/85TQ== Date: Sun, 4 Aug 2024 20:50:10 +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: b8d56ecd-c1d5-4342-4193-08dcb4c707b7 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: jSIjBJ9nWSoOJ+4uzv+EZfb0C7XcKCxbTUxqfxdfupQsLwcycyCP5R+oXO2dyg5/WsNKP4qUsZ+zWTKcSGgPvWLl2A52tkSVlyt4GmOWFJ+K2vqinCW7K5q4RaNP4Ey8RYSKyEM7+DeIt12MXJsq8gW1CqHY6N18AMjcUehxxrxKEeKmwTxrHcejbD7PHXYMqa/HzjulP3D/WdKZ6BrP75wYiBDMmzIrddtpERVJMoKARXaaiSp7KcR1BkUT64jiQcA53OeMpZgYOld/2mdWnr83DhVSttDuTjej+cTJFM+fOoI+xmmfweYmLExuNQIE5V4sW6QcKEpXtxoBkkwGnPwQwx32sH8im4ipSxST/EO3QVYoQ+XS6R9xjOmikw01WYxgIER+NzVR8CYzGRee3zd1QamVbLvkRIO15dEoWQsBO9rFph09pqgFMTWDh5aLy+3lwghm7nKZuN6tkgJUUuqmtjDNiai/6m0M9IQMIfIIDRXSVxnKQ1JT+lDsa//VuV4pS7/dhZTeMmdHaiYMZ2cBmo3M4lwuJSqygrlOGPoJig/YzD/CswGhc5H3tLPeQwC6xbWZK/vVKlqzsNExoUVjZzvVokB0MRnIw8hLU2l09Yhp4TpM82jXnokmtCC7MqDRcDEBxXR3UZQGlr/gS+gskCVKJLmZUebq0N7JJp7TWL0LFeyXqBNGVmi9/6oJM787zbvQ52G6e6AVHS5A7zu0uZXbwcREn8EYryLo4GWinTmK3XOSiWu6HAClRCZUapZE/NhzPlszNF/4HUeKBp84G0INLZaVSDKG6RkdIdo7DXXNVZ2Q1LJxMMg8drkFW+4UtgcXUU11eLCH3Bymi0VDfwvrteVA7GSgCqfiklw4x0ldzXneGWCtdGUSJpeLm8NDNWI2nNljP6k8xdjqbFgjeoQEjLVnSv8aknihFtG6MDl4dat0TCe1FW0+AZfjEsm1j5MaBLcCPBtmCnBZGM+J5uusYUp5HYBou/q11bg32pKq+Fx03i5lzwFC1mSC0CUtF+pxoY9QMBkw3gGuoK1zd+SiW6wG57DznANXVxMYe8D7wIXXUOm3y/whnoVVyJWucy8Mr4UdU7Ev1dVixRCPdLvtpEHcN+WqjqRb2l0Q5qptr+mcwAuVytahu7JqjZbonSQOUPzRxKMyYasq6nARyyKB7h+Ld4iVt+kx1Jx6iiKLWs5RJNq7WiqLEa9sl31O+sOYDkhExsOKagkhC89vXteSixCw1LO8EPe5Ijv+Cu3Y3HOZKrFZlaJ1hujPYDmf7QbtIhiTsdNMsAIrAFbAM0I6iCAfR1yMXhzTnSyjSuQu8HVuS82lYCs6KdCfLA1mheik/Sv0cg6GLm/WF1r24cqrkgP82zX0UrcPsouCrzFeaPOJhaWStDWfg4qTwaJHol2wruzUF4FkMvCIyw== 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: qvKtB3F+fwn4IyLaSz/iMs77WRkxt+DrFBZ0B7n64Tk1q3706VXb6AB++jDSB1PDaT1A2laDuKdAKT1SV/rYAlfHL9ik1UvuUcYJIEVfvfkFK9vt+ChzqQ7/qtuNkx7VuOdm52ax2aLgsfQ7HTOJDdADJWNYLofXFz35YiwIGz8OQxd2lI80RM09wvX48sSdzRe5PfhRZHturVja4OZXFfmck+fDTrz+MCQDUHGgpYhJoDkdqlBLQCcWSNBRPcTwVP0JSo76T34a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srS8ZKkubc5IvqnIiQOsRHOfWE0wZVoaFki7l1W5jHyleWgDDdYqy/bxCn9jpixJJlP8C17nRej6Q15yy3MFuNC4DOoH2JfFm++4TMSVZjIlPY5EMNYsi2fzVwc448+GauojLveoBtWI1TGb3DIDauN8YKfVmJJWPn+n+/PBH5vA9HXjiNlXwXsuUvFvIWf9K+n+qMaI4y7HNmGrekXtGEAIpjqGkvCFUZ3bqGL2V7Q207GzQjx2yVt1Y 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: b8d56ecd-c1d5-4342-4193-08dcb4c707b7 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:50:10.0617 (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: Xz/IxI7AOVA3miNaiz/6LCkkefHwCAf0U+bng/P5xf+70NoC7tHYymbyYcdpQecFlx61o2/tmte9Y3RL5EbwSQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 X-Patchwork-Delegate: kuba@kernel.org NXP S32G2xx/S32G3xx and S32R45 are automotive grade SoCs that integrate one or two Synopsys DWMAC 5.10/5.20 IPs. The basic driver supports only RGMII interface. Signed-off-by: Jan Petrous (OSS) --- drivers/net/ethernet/stmicro/stmmac/Kconfig | 11 + drivers/net/ethernet/stmicro/stmmac/Makefile | 1 + .../net/ethernet/stmicro/stmmac/dwmac-s32cc.c | 235 ++++++++++++++++++ 3 files changed, 247 insertions(+) create mode 100644 drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c diff --git a/drivers/net/ethernet/stmicro/stmmac/Kconfig b/drivers/net/ethernet/stmicro/stmmac/Kconfig index 05cc07b8f48c..31628c363d71 100644 --- a/drivers/net/ethernet/stmicro/stmmac/Kconfig +++ b/drivers/net/ethernet/stmicro/stmmac/Kconfig @@ -153,6 +153,17 @@ config DWMAC_RZN1 This selects the Renesas RZ/N1 SoC glue layer support for the stmmac device driver. This support can make use of a custom MII converter PCS device. +config DWMAC_S32CC + tristate "NXP S32G/S32R GMAC support" + default ARCH_S32 + depends on OF && (ARCH_S32 || COMPILE_TEST) + help + Support for ethernet controller on NXP S32CC SOCs. + + This selects NXP SoC glue layer support for the stmmac + device driver. This driver is used for the S32CC series + SOCs GMAC ethernet controller, ie. S32G2xx, S32G3xx and + S32R45. config DWMAC_SOCFPGA tristate "SOCFPGA dwmac support" diff --git a/drivers/net/ethernet/stmicro/stmmac/Makefile b/drivers/net/ethernet/stmicro/stmmac/Makefile index c2f0e91f6bf8..089ef3c1c45b 100644 --- a/drivers/net/ethernet/stmicro/stmmac/Makefile +++ b/drivers/net/ethernet/stmicro/stmmac/Makefile @@ -22,6 +22,7 @@ obj-$(CONFIG_DWMAC_MESON) += dwmac-meson.o dwmac-meson8b.o obj-$(CONFIG_DWMAC_QCOM_ETHQOS) += dwmac-qcom-ethqos.o obj-$(CONFIG_DWMAC_ROCKCHIP) += dwmac-rk.o obj-$(CONFIG_DWMAC_RZN1) += dwmac-rzn1.o +obj-$(CONFIG_DWMAC_S32CC) += dwmac-s32cc.o obj-$(CONFIG_DWMAC_SOCFPGA) += dwmac-altr-socfpga.o obj-$(CONFIG_DWMAC_STARFIVE) += dwmac-starfive.o obj-$(CONFIG_DWMAC_STI) += dwmac-sti.o diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c new file mode 100644 index 000000000000..2ef961efa01c --- /dev/null +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c @@ -0,0 +1,235 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * NXP S32G/R GMAC glue layer + * + * Copyright 2019-2024 NXP + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "stmmac_platform.h" + +#define GMAC_TX_RATE_125M 125000000 /* 125MHz */ +#define GMAC_TX_RATE_25M 25000000 /* 25MHz */ +#define GMAC_TX_RATE_2M5 2500000 /* 2.5MHz */ + +/* SoC PHY interface control register */ +#define PHY_INTF_SEL_MII 0x00 +#define PHY_INTF_SEL_SGMII 0x01 +#define PHY_INTF_SEL_RGMII 0x02 +#define PHY_INTF_SEL_RMII 0x08 + +struct s32cc_priv_data { + void __iomem *ioaddr; + void __iomem *ctrl_sts; + struct device *dev; + phy_interface_t intf_mode; + struct clk *tx_clk; + struct clk *rx_clk; + bool rx_clk_enabled; +}; + +static int s32cc_gmac_write_phy_intf_select(struct s32cc_priv_data *gmac) +{ + u32 intf_sel; + + switch (gmac->intf_mode) { + case PHY_INTERFACE_MODE_SGMII: + intf_sel = PHY_INTF_SEL_SGMII; + break; + case PHY_INTERFACE_MODE_RGMII: + case PHY_INTERFACE_MODE_RGMII_ID: + case PHY_INTERFACE_MODE_RGMII_TXID: + case PHY_INTERFACE_MODE_RGMII_RXID: + intf_sel = PHY_INTF_SEL_RGMII; + break; + case PHY_INTERFACE_MODE_RMII: + intf_sel = PHY_INTF_SEL_RMII; + break; + case PHY_INTERFACE_MODE_MII: + intf_sel = PHY_INTF_SEL_MII; + break; + default: + dev_err(gmac->dev, "Unsupported PHY interface: %s\n", + phy_modes(gmac->intf_mode)); + return -EINVAL; + } + + writel(intf_sel, gmac->ctrl_sts); + + dev_dbg(gmac->dev, "PHY mode set to %s\n", phy_modes(gmac->intf_mode)); + + return 0; +} + +static int s32cc_gmac_init(struct platform_device *pdev, void *priv) +{ + struct s32cc_priv_data *gmac = priv; + int ret; + + ret = clk_set_rate(gmac->tx_clk, GMAC_TX_RATE_125M); + if (!ret) + ret = clk_prepare_enable(gmac->tx_clk); + + if (ret) { + dev_err(&pdev->dev, "Can't set tx clock\n"); + return ret; + } + + ret = clk_prepare_enable(gmac->rx_clk); + if (ret) + dev_dbg(&pdev->dev, "Can't set rx, clock source is disabled.\n"); + else + gmac->rx_clk_enabled = true; + + ret = s32cc_gmac_write_phy_intf_select(gmac); + if (ret) { + dev_err(&pdev->dev, "Can't set PHY interface mode\n"); + return ret; + } + + return 0; +} + +static void s32cc_gmac_exit(struct platform_device *pdev, void *priv) +{ + struct s32cc_priv_data *gmac = priv; + + clk_disable_unprepare(gmac->tx_clk); + + clk_disable_unprepare(gmac->rx_clk); +} + +static void s32cc_fix_mac_speed(void *priv, unsigned int speed, unsigned int mode) +{ + struct s32cc_priv_data *gmac = priv; + int ret; + + if (!gmac->rx_clk_enabled) { + ret = clk_prepare_enable(gmac->rx_clk); + if (ret) { + dev_err(gmac->dev, "Can't set rx clock\n"); + return; + } + dev_dbg(gmac->dev, "rx clock enabled\n"); + gmac->rx_clk_enabled = true; + } + + switch (speed) { + case SPEED_1000: + dev_dbg(gmac->dev, "Set tx clock to 125M\n"); + ret = clk_set_rate(gmac->tx_clk, GMAC_TX_RATE_125M); + break; + case SPEED_100: + dev_dbg(gmac->dev, "Set tx clock to 25M\n"); + ret = clk_set_rate(gmac->tx_clk, GMAC_TX_RATE_25M); + break; + case SPEED_10: + dev_dbg(gmac->dev, "Set tx clock to 2.5M\n"); + ret = clk_set_rate(gmac->tx_clk, GMAC_TX_RATE_2M5); + break; + default: + dev_err(gmac->dev, "Unsupported/Invalid speed: %d\n", speed); + return; + } + + if (ret) + dev_err(gmac->dev, "Can't set tx clock\n"); +} + +static int s32cc_dwmac_probe(struct platform_device *pdev) +{ + struct device *dev = &pdev->dev; + struct plat_stmmacenet_data *plat; + struct s32cc_priv_data *gmac; + struct stmmac_resources res; + int ret; + + gmac = devm_kzalloc(&pdev->dev, sizeof(*gmac), GFP_KERNEL); + if (!gmac) + return PTR_ERR(gmac); + + gmac->dev = &pdev->dev; + + ret = stmmac_get_platform_resources(pdev, &res); + if (ret) + return dev_err_probe(dev, ret, + "Failed to get platform resources\n"); + + plat = devm_stmmac_probe_config_dt(pdev, res.mac); + if (IS_ERR(plat)) + return dev_err_probe(dev, PTR_ERR(plat), + "dt configuration failed\n"); + + /* PHY interface mode control reg */ + gmac->ctrl_sts = devm_platform_get_and_ioremap_resource(pdev, 1, NULL); + if (IS_ERR_OR_NULL(gmac->ctrl_sts)) + return dev_err_probe(dev, PTR_ERR(gmac->ctrl_sts), + "S32CC config region is missing\n"); + + /* tx clock */ + gmac->tx_clk = devm_clk_get(&pdev->dev, "tx"); + if (IS_ERR(gmac->tx_clk)) + return dev_err_probe(dev, PTR_ERR(gmac->tx_clk), + "tx clock not found\n"); + + /* rx clock */ + gmac->rx_clk = devm_clk_get(&pdev->dev, "rx"); + if (IS_ERR(gmac->rx_clk)) + return dev_err_probe(dev, PTR_ERR(gmac->rx_clk), + "rx clock not found\n"); + + gmac->intf_mode = plat->phy_interface; + gmac->ioaddr = res.addr; + + /* S32CC core feature set */ + plat->has_gmac4 = true; + plat->pmt = 1; + plat->flags |= STMMAC_FLAG_SPH_DISABLE; + plat->rx_fifo_size = 20480; + plat->tx_fifo_size = 20480; + + plat->init = s32cc_gmac_init; + plat->exit = s32cc_gmac_exit; + plat->fix_mac_speed = s32cc_fix_mac_speed; + + plat->bsp_priv = gmac; + + return stmmac_pltfr_probe(pdev, plat, &res); +} + +static const struct of_device_id s32cc_dwmac_match[] = { + { .compatible = "nxp,s32g2-dwmac" }, + { .compatible = "nxp,s32g3-dwmac" }, + { .compatible = "nxp,s32r45-dwmac" }, + { } +}; +MODULE_DEVICE_TABLE(of, s32cc_dwmac_match); + +static struct platform_driver s32cc_dwmac_driver = { + .probe = s32cc_dwmac_probe, + .remove_new = stmmac_pltfr_remove, + .driver = { + .name = "s32cc-dwmac", + .pm = &stmmac_pltfr_pm_ops, + .of_match_table = s32cc_dwmac_match, + }, +}; +module_platform_driver(s32cc_dwmac_driver); + +MODULE_AUTHOR("Jan Petrous (OSS) "); +MODULE_DESCRIPTION("NXP S32G/R common chassis GMAC driver"); +MODULE_LICENSE("GPL"); + From patchwork Sun Aug 4 20:50:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752709 Received: from AS8PR04CU009.outbound.protection.outlook.com (mail-westeuropeazon11011057.outbound.protection.outlook.com [52.101.70.57]) (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 195F213A885; Sun, 4 Aug 2024 20:50:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.70.57 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804621; cv=fail; b=nAmIPdQ0ei2zp4lbc5bR88WdJd6DEPRXFH8Kqa4QhwYt7fPVPJGfgMskMYPgJ2I8/nW076eYJ8LxtDTqhf1DsHshgi8SEv3/zrStHnPW0L9Nrb8P9TSYGLZlvVLhxBEWa3hdxZhvz3M9jv2KpNKQhYfo4IMZ810mdaNAE7n0ZNQ= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804621; c=relaxed/simple; bh=36RtBfVxH0XMWubSRIn7ncie6I0VMXwlrTsVHvWTKqc=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=TApGPSmad6gIxiFUZlz7xJIvJwy6mzJGYZbgHuQOPg7pRMQ24rZNEsSqjs+XetZHlWdiH7g+k4Jq4By7GMox907q6QYrdqjNwQyRozDtYNnZI6P2K2FK0Cd2z9Cu4kxrpbi9nBeaIaMCA29BFwckQmXyX29vceNXcOgBPo1wfzk= 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=n18eUpA3; arc=fail smtp.client-ip=52.101.70.57 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="n18eUpA3" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=lMQOarNoXx52KKrpAFAwEKQGVDMp4DcNTfklNsSEKi2jVPzr0wrk2uh2lrPiDEyQ3TtjmrfAGcFvThiSBkTB0FzvVVIIaVIK0I2W5daxLgx2j3rdyQJNBBuXa7wVyu/UZSMkWIHVYRH1dODXc6KpyqptCFKnNGkphJ2TAYLHHUmyWof345AusauuEHG63dP3UVs/xaVe694qDZPxAx5Pj3ECV/bucHh6qIPxfzYc4N7snd9WB3nR0voO3K1hS+pFKrz/FCMmxsgf4lmANDsxZwr6MrgzCxy6WG0+hgiGsoL77zBEE4PhY+g6GCWvmCPndABSpbhhGFcQBdJ+N5N3wg== 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=1RqbJkS1ALvlAiZP0DPN7NVCEUCR6eZP6/J+2+h7w9U=; b=P26AMyZeT8uqWXFDnjJfClVN3Y3PonZj6n9+r4oXy7BABQ3gtjPpEOIe268bxoSfbmftsecS4NRxD2VbRnnnkiyIxs3zU+ldDGmODS08FLMyzdeOqfavYkg9HW5ZneUv7fe8+bcJeokHPq117Zl+/5SWg9UBqz1ZqO7OcLFwfk4MHf56xbaxqbPfoBzoS0kiW2+LBF9rTs7+lhaBTi3oWaITMW+WKj6L0YZ7tHwCtjHsMVq8+ePmAzG9Cnku6z+tD0oLN+g00labqwY8lcMrQ55xGxU+eX0pH+s0yTpSERpn1ipp4hzohZ78JBXJ22hMY9nUPn8/Gcy+I0PT7+0Bdw== 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=1RqbJkS1ALvlAiZP0DPN7NVCEUCR6eZP6/J+2+h7w9U=; b=n18eUpA3bEmRAwjIjWP3e4Y11mQ1ADx8uBlKoXwx/ZQI+mul3qgBcEroTgux9yFPcBzUjAWhMDHtb2/+pPZHlEWlrPAGMMU7nCUb/jsE7lE3pkg+0AS3HhD3eRPZQ22WauP/kNNRmmfeiUhraH3qSlEYKlk+UDQYiqE0dgKRwrJhBAgan4QtwxJ5Xfa0Ka4PMIORBG2xb5D5PLtZhUvB1MEdxIvyQbOhKrr7EWAk2m2y3J+0jMxvi6YotLQRHQopb8nXK0EvqmSCkfELCuKUWTpsPHnvcTHmGHLmC0fH+IQk0Z8jEk36VBWteWMVgWyq0ccovpp+s/i8jZwBkHwspw== 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:50:16 +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:50:16 +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 , "netdev@vger.kernel.org" Subject: [PATCH 5/6] MAINTAINERS: Add Jan Petrous as the NXP S32G/R DWMAC Thread-Topic: [PATCH 5/6] MAINTAINERS: Add Jan Petrous as the NXP S32G/R DWMAC Thread-Index: Adrmrb+HT24CeNXCTAuMlJKgRTqONA== Date: Sun, 4 Aug 2024 20:50:15 +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: 23906f19-f664-48e1-b2ed-08dcb4c70b43 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: b9IVnrcPKq49SXOuXPth4wgXX7ZGfHnil72DLrLxA6cj2SUyoYqItZdT0WhhLaiJrJGcYSvrBXu+jKibGISfMl3U+RjfcLJoZUd6JBonRLRWjKxlKHo4/U0jaPiRJGfa03xLY1FdGBMZbh7+LqFkNDu2X17oNh6pazs2ssmjMEmVvYvRzYNV31dzsUlwBpvBL+tpYPNeJ5QRYRP1Oz0b2ae50TVFtC+z7wZ8gZwOvA9XLAzXRxjGXMcSuq/qY2iavQIrhLglGlC9LBYBqsXK0LDjZSgQ2DaAfIBK2J6dT9tXvLb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G2hwGAjshfgml9oVEmCTQLHEfe3eSTFylMM8eWOCxzZqyA== 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: HjcwcX3x6HcWvU+GtIejANIQ61FzMMQBKC5AG7lZEKY7/Ze3Y3TNUXGHi3zTbs0nEgJW7MKpS1PCFtdUysiiAG6HzVM3UpYpeqUHfjo9PDSrTTnAECxKKaf0PXz440rxTxzf3tkO9NLGW5h1Wp23DAVrfsd3bFzg8Gjz0S1DjF7IsKssQTs7rgDBOJ01cuphsRojFzxPRae/kiUn0LYp9nHiUFbV4rK7tPV/2CkhDa/IJ9JNJ1EIO3VFEVHiva8dgkYZBQWTbmuC8f0YEMxnk8JDNrJsepcZIpZjgnb6QUu1kTX43FjzKx5Zbqz6QMG4vHZZsFBGGlQ5WZGDw5moxar60UwvygYPSJoXWylLjE1S3npwnJeVwiVwECeFQjPoTvp+OzPJNEHyORWu/4RiohgJLearp01kEWSR2I0LAlvWicyvz9XysxXlGoImvA/Cw3/Brfxul3aVOxkoG6dVv0L+Y40ABNnOJva7iI+DIDACMRVE0o9MBZEKIvVcshZERUpw+u7D8FPhdmCBkpI0wLSgY6cQCH64sTqm05t57jHGduMvHotLozcsi+8/y/WR7SdSws/o4VBnq82tH5DXaGRiNC2spURQJWbIFquSTBsnw/Q2gx0/vhV873iawbXrxa901QBWlDURLDv+HzrrdJyAmp1CqgQ9lKXDacRoBq/5qUQHKUxNL5cmYduJIWhGshgFMiCukIHujSW973LOZp6m6YSViaL5O3WZG1NS8sDunLfpPNOmRPmcLxGZZnCSa5ZzSrQbruN+55c1Ioiox1LLhKkwASOu9WWTiHq1Tm1x4GjdxUXfw4DPUL7vQwkm1cDRVF/zLJQcHf0b3eNYIt2HTRx288U5Jd34OsOlYkaZT9p8ABN2sjCe+tc3L+dMK3Xqp0XSvfF7Q0N9X+ENqNBQhrkqziDpKMVT9mvB1eoS3MqXCxvVDwtoI0+3Viweea8MpA5bqsxrvhB8bjYIK8ciA/pDCKw+hjsCQfzYRZQ+Q/SWMr/7e0KNzCKuZdSe743y31ehBNNxwH3XtFU9eAayElEg7dIk7k6LvfWcR16AhgLS7HOOIzoFKf4JvAeGIokfKsX8jbWgFHqd0S1IdMjNDW5t5cfTuLYlBJGjFfQNr2/ztRulwrhoH+JNE7fUuy4dqMVE2oyCB/SF17kk6ztMsPIj4hbGh34ukap6WG2F8yOzbgUrfu6mYLXNZU2AerYQyOR6uEWn8fN/8r5kIV//XiSYhbBWQSocR1D8vbv90t9dXSHYYOhFEp/pB6lDCKgnU4IvF73cz/6sSiTxpCy6tbgFnFsU7DWtPqpBZ3fi31U5b2nkqi0UqWK/F+/7igxzA6DC5thSAS4qY0+Ikavh9GDZmFGJyID/fmMuX4Jj9jyuMWjQaqfRpGmGWMR67mnv1YIChHEZC4OnbudkEh1ZNO/o/X+OG17YV3lt6xYlodtPHuCCuuURxuPpKWs7ESC3TItA5ReXBREyvg1+8Hd0DJL2+feAG5zQf7j3e+5fQdm81/w6PJtfvcWvusuj2aD3kV1PovspvXxNrsVmGpwP/1gPqcmq8smozCTMWBZpMLZ0p3E/8f+0x2+Lc2tM 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: 23906f19-f664-48e1-b2ed-08dcb4c70b43 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:50:16.0067 (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: xMnhEzLNeo6jwMSf1C0BiWvd7gxosqTooQhRctK/yYtAs1MyBZhg47+8IfZ9PZE5QSwZeQWlzYVfoUkd+QSxbw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 Add myself as NXP S32G/R DWMAC Ethernet driver maintainer. Signed-off-by: Jan Petrous (OSS) --- MAINTAINERS | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/MAINTAINERS b/MAINTAINERS index 8766f3e5e87e..16178a647492 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -2692,6 +2692,13 @@ S: Maintained F: arch/arm64/boot/dts/freescale/s32g*.dts* F: drivers/pinctrl/nxp/ +ARM/NXP S32G/S32R DWMAC ETHERNET DRIVER +M: Jan Petrous +L: NXP S32 Linux Team +S: Maintained +F: Documentation/devicetree/bindings/net/nxp,s32cc-dwmac.yaml +F: drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c + ARM/Orion SoC/Technologic Systems TS-78xx platform support M: Alexander Clouter L: linux-arm-kernel@lists.infradead.org (moderated for non-subscribers) From patchwork Sun Aug 4 20:50:25 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Jan Petrous X-Patchwork-Id: 13752710 X-Patchwork-Delegate: kuba@kernel.org Received: from AM0PR83CU005.outbound.protection.outlook.com (mail-westeuropeazon11010036.outbound.protection.outlook.com [52.101.69.36]) (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 8315E137932; Sun, 4 Aug 2024 20:50:28 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.69.36 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804630; cv=fail; b=icTG5xszmrq4KtCE98E/zbSDcaxYitZDroGstJlfGwaXSQwDGOFhVSiDzRbclHkUJABwdbxJ21bfkIHxHxMqSov7VW+TJHWV4Gm1RcqzrQ50Xr8q6pHbna7ymn5kD9m76Pr9YBekbe9sM3GycNqaSI0fc/iG8cdfGbXYn++O7PM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1722804630; c=relaxed/simple; bh=zSt5RuGrCAB03t8wJRaHtFuSXUZq8vpdAvTJioGHhag=; h=From:To:CC:Subject:Date:Message-ID:Content-Type:MIME-Version; b=e8tQf3NVDmrbGMCg67m7VprJOXa67Lo0Z04/n/0vYsaKXzhW/coI/3YO1HgfC/Q25EhXWCOdnoOFrKlqvHxJjbvYnGnLEo5/y5aYFZKdctKluLtxAGDrskBrzPNqfrAr63FzE7R/YB8Gxfc/JOOE6VNrHFZanYf9TFogZ+YX100= 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=tHuZeLIZ; arc=fail smtp.client-ip=52.101.69.36 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="tHuZeLIZ" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=hI1aNdeu/fT68LdJ9MonaXUERBbtAehru6/kxYdGGbXcOicU1lclLaIVn0kcqJXAPPA6NwRxnfRoWXoemtxOQFVlJe69qeWDAnAlBz8Fm7nMs/lhiQ/rNAiEKMdWY1wC2oGfiqpYe8PumSbPQQbo506cZLoPtGh9N+sKMJAvmVB/PDXW05do8hZ5Mo2SPLt3OEvvsz/uOi7EacDv9aL0gj7jSK/aXZJswzBtdMgzXzKI1L00D6UfAQILr+JHjexXEwjYnSqJN39sW0hSfC1FdHQ2YCVFIFtV6CYE/Wf2BnXUpX7LRjsTBAmXHK2GFpB8oUOY5xwnCie/7AHTHuOOhQ== 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=pk684LV3ynuEpTxv6M+A6nHw0iSspAsQbxmxZm6K8rU=; b=R6jIOnC04q1B8JIyW6vt+aEXc26Tz6SR81jCIhHnUUeCfDXn+1AAvVfjGg3bdCxFOpjr7UxxxAXJR7+xWlilWDNStrNVPDs3LfR/6YaAzKe3Lib1YGqnEdZqbVRGvlkbaGrvDWOKNAZBtTpdP33ftwaoqCaW//KbFFhcIMhiLm7kMNfWIIXcRvmjGK0H226wWaWYPi+cwCSAp9H1QzKwGUQpplMGPb224cb2VCu21d5Rus6BTdI7fFwwcDFR+17hRrGLHFugJ4NMCfvje0l0g2z/KLhNZxy6rhsMZzPMvr8wrhMUQ+IgSibNO4/Jj9d6qZre31As1sjgp0AjEeRnjQ== 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=pk684LV3ynuEpTxv6M+A6nHw0iSspAsQbxmxZm6K8rU=; b=tHuZeLIZShKmjMHA6jNRtXVhTCFFwSWZrwC+ue+AS5wvxri1ihfH6aHYiIUS6UIUvasTwwI2wwbXxaPv9BE1luj6Sgl09hTG2nF3VDSgHb36mn4DqcNqkAW0wyIu4N6Az9Nx6FuR/wS0XpelEFSdI365eLJnAbzfn4KmcdMHBcmbPYlhCNyWeKLGI+htGgAHI/uK7fjAOtk0LXF22tkR1LzKFw9FIzf3JfYt6dE4lPpLAnDZcEs+tRKlW2YJWwqu0QWzq8CTxgTi0Uv3UXYicEEEddpaaNA8sIlVRDmIUbiS8yOCTuRIuzJJSyqCi0W0ppp8Irva0S0qPsUlEI86Pw== 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:50:25 +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:50:25 +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 , "netdev@vger.kernel.org" Subject: [PATCH 6/6] net: stmmac: dwmac-s32cc: Read PTP clock rate when ready Thread-Topic: [PATCH 6/6] net: stmmac: dwmac-s32cc: Read PTP clock rate when ready Thread-Index: AdrmrgHXkavt0RGESJ+P/uF7MetJwg== Date: Sun, 4 Aug 2024 20:50:25 +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: 3e2d5d09-4b3b-4f3c-3a6d-08dcb4c710c7 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: K29UH49iorDjiYOA3R6kAjAedIOD2+I2AqMsy7/nmj2wwz/DtdcdjQ6q2pPN5msSHpC3LN+oodA0yW7EYAHS179jl/X4i4fjkaTQIBHxlzv9UOQg/QKOpBN+8CvuEIOyEJ+Z+evsS1o2Xabtxjsp6OyBEmIlB/DrFbStOWqAqf92D7THLU5kcvmfiz0FOZLs6k6FaQrUyu80+c5RTFvr1wyM4p+hsdFSzn+/iZlInPzsKd3vcpTkh9Kng7RL2J3ZZLii3VCBYk2oBPArvFncwvN9FljCA5M8rz0vg4BTAC0L0FXIPm+P+gPF5oU1C6Y32707XTn/yOrQnjc8B5M1+n8bcBHiIxpmrvPvJrBduV3++TeuRHc4j5DZS22pH48CDJ4ks2k7iGSlv+nfRky+LNmifEm9VzWOcRrK+Yt/yXB6jiYVnkJ1bOcQTPdbCrGPSPsJKzNzQWK+nA1ZQ1LAK7tthQ7i35lPK3agtiv8NA5lOuw685cSNmUaEjjJVWQ7v8ZYkRX/2DsDatwmzehb6n8tshTr28OBZJkVdnA15UZMMV4eurGzltsJcJPQdqE0z5DEus0JY7QuBA5CQ8tti6Mu/aH917+EC8j8qJXCbOZRFIn/MsLTNd1sEnwObSf15n6xEtTiFP+N+gW5U9CKTMGjc5q5ZML5LKTI/ejiL7AGDlnJPNjLTvFQ9zhZS9LjpF3RD+KYmE2UMpHHpN886gtt4BhSwrMo4r3SxJyF/kQd4BFCcS13vUm06/KTCSov7hvrEAXlBwQ257+7FOJycX3PFEAWs6M333OZ6sQo+Ej8GalOKQzOWmxeIey5tlwRNrjR5jymQYyqGdS9Xuh6AtExa8wO44JA0IcU12u/gPVbfvClPHgVHTJkIQXfhp1XKdDdmldgclq0e4diIqhuSDmy9rCpwKTOT7xSm3U7ekiC9/h1y+srme9wCDffBgHXS63x2/RcgznWsHNxCSVsMykWa4wvQ+wbQIv8H0ksT6XE45ZIhZQIHuAHZKzSCkQad8wY74oElu55qsZGPx2RX5Wo6842azeRLxjdHH+FDd79h5vC9CFgjk3j5Db6T2YBrtRvwPrQiLKfIZMb1RzlbZSnWavIulIOwJAsuxdFYWvEZXZjbfMGFJXs2lkGd7vnN//ggTMUj0zsKT9MFKyiYrPRxvgABtH4xW3z6pxT6wBELL5nsz+6ay13X0NN3Rnshf0IV2wn+40Btfni/+zDL/kFdU6jDJ2L9ey+AgkTuOT26o0jZ0bpOfduv0zMOpdWIEx4Vn92Y4TihcVinjsdw4IyuRp/4eM/bJSKvtvC/C449WFRkbCK2F5s06sopZWJxMD9NhOi563p46IOPzMGcrRpU7fWiqmWNu4iquKBHqxHSJbYMtVX8CKnoT1eiU632BFU7un0aw2l26PSfOnC0w== 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: rwJiN/hwSTt/sLrNysZVruLj3jKxjbI2DbntMju7nRuu0pWhYZwqi3E5z8+Xxz9lI3f58dN80Y7uopN1yyG8bRLkY4gE0ACUl5nMGFdDPsKYVyKzOIRA8dTy9qmdvYGXadWPR3EzDii6KxqmM+EVNJP2O2/9r95ueFTn1evMcrrTwlysBKH+lnfKfmIDrxGPyAQ7hOhDIxNfv0U/I9Xz06v98ediN986EiPsdhJHymNKLOD01FFG1c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BbPs2aB4oFv+MCgOGI39rBb/nRxzNpFDezkbcfdX4mG2/3CPKbt8Xij+1ErcBP+6GwUEWx1BRYClZ1M3zPr/Dtw+HVOmbgFFSCzsKpKdmPYtA38z02uQs7GCKIPMJUz5EZBpiJO9KQx+NSjrsJRJypOmGbNjSmKPMkyxh+HSxipfq/6IrvytenZdb3Ab3B/y3y/x9AVf+Rs6EqCVkUripleO9Gd26FGSEXIlvOa2UuZPvS7JTBXpOh1I7pjZWQcJsaI5UFAOCZVy2 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: 3e2d5d09-4b3b-4f3c-3a6d-08dcb4c710c7 X-MS-Exchange-CrossTenant-originalarrivaltime: 04 Aug 2024 20:50:25.2581 (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: KbhsZ0uD8PuqvxheAmmy+KZ67/iT/ox44KEhza25TebgbEDvVdiPOZ+IPqWWe/nZgEZH0uHvDiDEsvJzZEUIrA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PA4PR04MB7965 X-Patchwork-Delegate: kuba@kernel.org The PTP clock is read by stmmac_platform during DT parse. On S32G/R the clock is not ready and returns 0. Postpone reading of the clock on PTP init. Co-developed-by: Andrei Botila Signed-off-by: Andrei Botila Signed-off-by: Jan Petrous (OSS) --- drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c index 2ef961efa01c..ad05f72fefbf 100644 --- a/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c +++ b/drivers/net/ethernet/stmicro/stmmac/dwmac-s32cc.c @@ -149,6 +149,18 @@ static void s32cc_fix_mac_speed(void *priv, unsigned int speed, unsigned int mod dev_err(gmac->dev, "Can't set tx clock\n"); } +static void s32cc_gmac_ptp_clk_freq_config(struct stmmac_priv *priv) +{ + struct plat_stmmacenet_data *plat = priv->plat; + + if (!plat->clk_ptp_ref) + return; + + plat->clk_ptp_rate = clk_get_rate(plat->clk_ptp_ref); + + netdev_dbg(priv->dev, "PTP rate %lu\n", plat->clk_ptp_rate); +} + static int s32cc_dwmac_probe(struct platform_device *pdev) { struct device *dev = &pdev->dev; @@ -204,6 +216,7 @@ static int s32cc_dwmac_probe(struct platform_device *pdev) plat->init = s32cc_gmac_init; plat->exit = s32cc_gmac_exit; plat->fix_mac_speed = s32cc_fix_mac_speed; + plat->ptp_clk_freq_config = s32cc_gmac_ptp_clk_freq_config; plat->bsp_priv = gmac;