From nobody Sat Nov 23 15:22:24 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) (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 2A517157469; Tue, 19 Nov 2024 08:11:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003866; cv=fail; b=PkElo2SGQ28Iwxza3ps+/AHgwBoKkSE+5BniIFDUhUbaeBvVxb+bg1Mx7zRhhF0RDCgnu1WNWqaDCKFJR2MU6U3GWw4gn/7AUf8E+8H/KBBxIkLiyyjYFg3fWwvV8qGs7Dyxieum2eJ0qE+ZhNfwYpwQllAlR9cw2RHx4Y1uzE4= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003866; c=relaxed/simple; bh=2lC5tG3oSaMMhEya7MsoBHOSGN2fF94UtT4f2Wd32sQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=Z98m6Qn2Ii/pOBfHdUA0mrASe3d6YjPswEiLS2QrW00PcEKhdKJQBIvgAUWbu2YMgWkObvv00TJ64xlrhFY9D1rOV5RlQxVnPubRDbyE4RQkpuCqsRvUVJ9XLwvQuMoCuBlod5oeqPhRvE3WNDZ00Qs+k2hhdnz3o+I/nUkD0+Y= 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=IMNwiZni; arc=fail smtp.client-ip=40.107.20.44 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="IMNwiZni" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=W7Cd1Fu2l2nGa4On9FUzqoLmbwyoA5hvp/8wKMdnc0+9xsYAFTMt1AZyNKaIH+NpqLd9HlsnX0KzcZkZ75F6FjU8SRl22Lx7fp1LSpvChFEmaPf51UO0KutHIQucNP1sUFhGKL8zrH8YWouuWzdrYCExvhCTgydOkekn90yKgq6qr/uPex+ilJeixpNN6JHInwcBOi9beIGHWU9sTDfMcccoVlvwkISxXv01h0Wuqz9hrylanWSf9hnhR3PMj5U/KtJEtWRETyj6my80HInSdyrxTEXqii6PcaRCRrjc8CpdUfJIIeOdJxt+TMXHQwTd90aJXexi2egHn/orB5b93Q== 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=Zm+Ou+Qc6KomIYnh+sPgqRr7u/wWjPGAlWW15rwFxcE=; b=ZoWMns50cQmBcOuAmmnzoC5WlcVqTjVKqSfZNXhlGf5TZykt0yngjjl/k9YYh+BN1jku2kPLUYavOcsndJmAcLVNuid4Tst2ruQubfTHwmX8KVzsm8w9pbFl5QC9XsSqC7WHNjteAJWEDlqAf0kWD1NbhNe70p5UfTa1Vnr8pYb6OO5vwnxj+so3DSB4BUAmVXMESKZjr18Anh79WOvoobHFgVGuS87hoztrP0ATUWNH4whN6BoEwzEeL0O3moqqiLKu/zwZ7aMVJikxYKuS7IoSkiDmNDtL/Y5sr4AfSHDK7OoI2Kid42alD3vwKFWKqKcyVmmPKhC7CrPD7q/VHA== 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=Zm+Ou+Qc6KomIYnh+sPgqRr7u/wWjPGAlWW15rwFxcE=; b=IMNwiZnigfRknjgOacOKw2CpbSwthOtIPHnp2WPUpG4Y2MfCF+ozsLFJ6TT/6z0b63bDF1mb4D4JkmLy8OjgWWjku+ksvS6K3zklfpwoHrFtlJ1r42ENBxirb9u/pxYyh1l4UwP0XAbdONTbaixXQ7pdqt8/zBBhLMCEoR5WQwKw2oRDhiBLabynOvplQyjXtoxAnbtPgGjqTGHSQYiyhkMQiWfUQYVgWMkLz7zSjjv1/DS6WHb5OB1DWjX2mjFyzX4TOOxhD4Ye60JRS0QrIJgMdYtl+hdQ/sgRt4l2oEijQtZO3TS8fTGeATujq1dY7g6sjzaP0faCorO9q/PyvA== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by AM8PR04MB7876.eurprd04.prod.outlook.com (2603:10a6:20b:240::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Tue, 19 Nov 2024 08:10:59 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8158.021; Tue, 19 Nov 2024 08:10:59 +0000 From: Ciprian Costea To: Marc Kleine-Budde , Vincent Mailhol , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, NXP Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH 1/3] dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support Date: Tue, 19 Nov 2024 10:10:51 +0200 Message-ID: <20241119081053.4175940-2-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> References: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM4PR05CA0036.eurprd05.prod.outlook.com (2603:10a6:205::49) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|AM8PR04MB7876:EE_ X-MS-Office365-Filtering-Correlation-Id: a832a998-e519-4e2c-2096-08dd0871b39b 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|1800799024|366016|376014|7416014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?OFF2YlNXWVVSVWpMekp3Y3d5cU5WZ0gvSWtXYnVMbnNPUTY5ejFaK2RwRGhQ?= =?utf-8?B?cmJLeUQ2am15WmczTVdTUTlzZnk5U2ZOd0k3VVpwQlkxY2ttekE1NHpoZTZY?= =?utf-8?B?bjJoSGg4bnBkVi9EMEVzSUVTR3llWGt3cktWbmlS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od.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?Yzcrdllydm41ZVIwZ3lWdnp3Rnd5cmdVR2RoWkdNb3NoSkxTSzdxT3lvVldN?= =?utf-8?B?MXhhTVduajhYN0ZWekZwUlRKNVpxY0o1cGp5SVFrMDY3bWNNelRsSjh2ZXhU?= =?utf-8?B?ZVg5S3lGa2dNS25LeGxJRU51WGU1bTNSZVZJM1ZZMXNUc3pOQWtsUzJJQ1gx?= =?utf-8?B?dUZ1YWtSbWJtU0lHREhEVVMwb2pIenptL3l3ZHF6WVlOY1grYm9tTk1IU2ht?= =?utf-8?B?ZnpNWHhrVmJYMERMME4ydXhUMzVHV3dnNkZVdStoT1NMRnRzRWNuNlRGZkFu?= =?utf-8?B?VFlqdzlXY1VNeXdyanl6bHNYS29PUUtLZ25vQTI1ZExYKzNNbGdTeGlqN042?= =?utf-8?B?N1IrSFR4blRrU1Q4ZUs2MkJGeExpNE4xSVZaNUZHMmFsdXBUZjdWMmpic05G?= =?utf-8?B?TjBHczk5aTRiV1JUUUZicVdYRFlISlJObGoyR3BIUFdMazNnaDYrb2ZJMnlp?= =?utf-8?B?cmQ0WXJITjYzMldDR2NhLzlIbGMvYk5oNDZKc0RMYXc3bDNaWVV6Tkp4TnpG?= =?utf-8?B?Q3BqZDZuQ3NUZzAxU2ZJQWpNNXJQM1lYVW52cmlKWm5SS0lycjJrVlR4Y3FR?= =?utf-8?B?S0lWVi9iQS9WSzlsOXFJMCtuZkRCSkpuTEU1TmVwdkdIRDg4VzVMeFd6ZGEw?= =?utf-8?B?U3ZOdDYvdW9IWGtuVFVxQkp6WTRObm1DOFV1U3RxdWdaK2FFaHB1MStwZHZU?= =?utf-8?B?UzVqbzU1WWQ0Q1NYczdkVHlTN1lEYlNxUVZXSFVDWWxrenpIUFF3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IQVlqWEdYT0VmVU5zV2ozSXFKSExzUGRNKzJGQzJNRVR5?= =?utf-8?B?RWJTYnhoa1FCa1ZEaTcrRTV0dy81LzVDbVlkZnZPYkFDQUIzR3NOU2lQelRT?= =?utf-8?B?SlVURzNxd3BRdEJqZ1FseHdxSDZhLzNMTDUramVPQkZYdXZxZ0NwRWxGOCtG?= =?utf-8?B?N0RVem40R25GZlNVUUZXOXJtdnFjaGRmaW5sRmVldkw0KzJVNGRvMGo2U3Fy?= =?utf-8?B?czRWWFdsdWQ0UnpWVW1nNElOdVZUbmRlaTZUT21TMXgyNTltWGRKWU1QUm1B?= =?utf-8?B?T25oNzBEZHNZMW5JTjU2ck1rSTgrMXA4UkRMN3BrdGlUZWJwNHBmNXZYWG9I?= =?utf-8?B?MnB6UlhVTEt6c1BMamZkUUJ5K3BHajAzQ2tFRVZid2FMMUlFNUlKWWxsOVl3?= =?utf-8?B?TWx0RjVUcmQvR3hORG1GOHQ3dWJtN2xvRUtFTnZaNzhGVzJHbEUzclE1U3hC?= =?utf-8?B?Ky9Cc1pwUG9qZ0tGQVVwUjdlSlVPSmtGV0h3dDZ6TzJrdzRMSzZCLzFNTkVO?= =?utf-8?B?RUE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a832a998-e519-4e2c-2096-08dd0871b39b X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 08:10:59.5571 (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: Z5gJ6pEXb7VJNS+xpKoSJ2BXRmTDEvCLKpylu2AZkwQoO2+uQBIgGhuBkwlQX+UavejYKp8by48rLZl5oB5we3czkuXyOT6NU6tDalR19y4= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7876 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea Add S32G2/S32G3 SoCs compatible strings. A particularity for these SoCs is the presence of separate interrupts for state change, bus errors, MBs 0-7 and MBs 8-127 respectively. Increase maxItems of 'interrupts' to 4 for S32G based SoCs and keep the same restriction for other SoCs. Also, as part of this commit, move the 'allOf' after the required properties to make the documentation easier to read. Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li --- .../bindings/net/can/fsl,flexcan.yaml | 25 ++++++++++++++++--- 1 file changed, 22 insertions(+), 3 deletions(-) diff --git a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml b/D= ocumentation/devicetree/bindings/net/can/fsl,flexcan.yaml index 97dd1a7c5ed2..cb7204c06acf 100644 --- a/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml +++ b/Documentation/devicetree/bindings/net/can/fsl,flexcan.yaml @@ -10,9 +10,6 @@ title: maintainers: - Marc Kleine-Budde =20 -allOf: - - $ref: can-controller.yaml# - properties: compatible: oneOf: @@ -28,6 +25,7 @@ properties: - fsl,vf610-flexcan - fsl,ls1021ar2-flexcan - fsl,lx2160ar1-flexcan + - nxp,s32g2-flexcan - items: - enum: - fsl,imx53-flexcan @@ -43,6 +41,10 @@ properties: - enum: - fsl,ls1028ar1-flexcan - const: fsl,lx2160ar1-flexcan + - items: + - enum: + - nxp,s32g3-flexcan + - const: nxp,s32g2-flexcan =20 reg: maxItems: 1 @@ -136,6 +138,23 @@ required: - reg - interrupts =20 +allOf: + - $ref: can-controller.yaml# + - if: + properties: + compatible: + contains: + const: nxp,s32g2-flexcan + then: + properties: + interrupts: + minItems: 4 + maxItems: 4 + else: + properties: + interrupts: + maxItems: 1 + additionalProperties: false =20 examples: --=20 2.45.2 From nobody Sat Nov 23 15:22:24 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) (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 9143B19B5B1; Tue, 19 Nov 2024 08:11:06 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003868; cv=fail; b=iijtqPbb7noiKSBfIj0YswWg6y9XxLfQ+pKunJcYzjq/4T2v50DSHSTWRu8yyPxqacTGJ8WBBaxyBlaugbGRP2vPGiXtn1OrpRsc3ocM3VzmVNgXWGiVZ1bPob0f25c5B8rZrwrInt6iWb9AgtztDqJulzVd2B30IPJZy+OB2wI= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003868; c=relaxed/simple; bh=s5GyuIVsTRuB+40aK1xPdi/4m/eU1k0HoIdFk2wTwjw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=g473NrwVwUstUiYckV6CPo6xv8S44NbQR8fqEHBHKj32iOz/FBZBv4bUTiUffgcWd0WE5a7DzxttmNlvgK9U6uiS2OZxr1Gd6Go2oTqsfrQogitH9aFDfM5c5Mz4uveft/nmjCfmKNeshPqelub6lr0bXFu87Koe5/s81gwOSsQ= 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=kPKTAa+K; arc=fail smtp.client-ip=40.107.20.44 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="kPKTAa+K" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=vh0t5IynW+TGrZF3FzA80y5xXy8JGi2H7L24bSv5Yuju4eeSc+2PC6dm4wnIHuqQOQOBFjM+cNpGIiMJNEvWYjku6nSUiaRZ7vxgTIuFV+q2wStr8PZhf17m6aRtPoWAM67B4Sm3pI1NRSVciqySA+lnDXPqrS+T+ORk58NxOSN8koksTtFMvGqn04cZpgKnn597F4oed0OEVWwth+WIBOVOtcWr6HZ08EbjC+q9AM5plQH0gH1D4qDWL3k1SEWqQdT8FW8KHuoe7PWbpWXKRlTnuT/nAPvVo1jXig3zMk6ZPl4r5rVwJlife04ERyTY11Usu12jVx6iYuRCIbL/iw== 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=tQz1hpJ7w6n4hw+ZQnp6Vi37ibD95Iux605dlxQo19I=; b=dBSei8sb+V8AsX4deYpQB/GhbFm7EtTHUOUEPXYfExBYD069gspxx5bDqf4nboKnjdzV/bZnobcv/mVCSNvo4pZCp76UXFF4hWEccc+eP7G11betz+vGAkL6zP+nmwKaOxS01xUpazvbwn/kNvaGA0k0VM5biFL0cirvfcsjlbLEriWdYQ50XaQ7D8Bske834JyD8ChZkH5zsY17gYDTAmhxSAPMfVWoxEnldxibx5bRk7sDFFSP39C2jS6q2Ka868KYC7CubLx7lxFFTAP4E9xdcCe8WEexjYdG3JSmrqeGlyaY+9l3A+gNd4aAx4T85m90p84bP/f5/UKm3Fv0Cw== 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=tQz1hpJ7w6n4hw+ZQnp6Vi37ibD95Iux605dlxQo19I=; b=kPKTAa+K/7RzPy/JQDgk1rfP7QjiNZ8z9A1fBQU163qk9djPbj1x1LJxaod8bxUmcskhgdrMvjIYytVbUJ/snigMjyWb/6ztNWZ7EhGpKO/Dmps6gOOUxlooWTWYsHdZt90OMsTZiXHwWBtFpau+18GKNiCrjjWR0upPVESZpwW9eeuFexPNLDROuNfXc3Nb300Xw0aqfCFT2Grb51ybcN7aOyilcQKxsHRS79tGSohM+TtHACaX8CIWoE1D74cTrbACwL4gcu4Q7mXcx5HYDWwC1tlfa2okZMdph77cR/0G53+HO5/Uba8KjtDFSMHMckHVLsTuxLXAub2ymURtFg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by AM8PR04MB7876.eurprd04.prod.outlook.com (2603:10a6:20b:240::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Tue, 19 Nov 2024 08:11:01 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8158.021; Tue, 19 Nov 2024 08:11:01 +0000 From: Ciprian Costea To: Marc Kleine-Budde , Vincent Mailhol , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, NXP Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH 2/3] can: flexcan: add NXP S32G2/S32G3 SoC support Date: Tue, 19 Nov 2024 10:10:52 +0200 Message-ID: <20241119081053.4175940-3-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> References: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM4PR05CA0003.eurprd05.prod.outlook.com (2603:10a6:205::16) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|AM8PR04MB7876:EE_ X-MS-Office365-Filtering-Correlation-Id: fa80d4aa-0d7c-47dd-29fc-08dd0871b4d7 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|1800799024|366016|376014|7416014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?eElZSjZCZW82ckJqRHArZFBQWUJnUjNzK0x1R3BQNjVubW1LZVN6b2FrcVBK?= =?utf-8?B?c1dpcTFHNXQyM2Ira3hPaEVLREp6TUJsTHl0R3pRSUowbDNhaUdBaGdQK2VB?= =?utf-8?B?ZzZXRE82Nm5VSmZGQ0JRSGdqRURFWG5iaDFpRWhtdi9UTXJlM28yRWpkdlcx?= =?utf-8?B?QmxLQXQraHpzeEFtQVVQc1ZSSTVBZGpHWGMwTEFsSHJpYmV2NjltL2tWZmZX?= =?utf-8?B?bTFwK1dF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?B?THFLa2FFNjNnbFhNaGdidVRJMmNRNnpIM0pDR2p0eE5FWW5qMy9vdC9ySXE4?= =?utf-8?B?ck5xTWx4aUt1M1djSzF2cGJpVHZVQVN4QWNzNkdkc1Q2bFJuODgwRVI0OGlC?= =?utf-8?B?dnp1K3VTMXp3MGgzNkZySFZ6NHM1UGMxTm5oRTNNc2ROWHh5VyswVjRPRnFJ?= =?utf-8?B?QkpMZURPNlREYnB1eCtPUU8xd2orNkZnc2FCK3FKb2ZzWkZGd1Q0VTlHRWxq?= =?utf-8?B?MjRpUnBNTzFQenJRbGovZVV5TkwrclBKb0dpS255VXVERmFNRDRZL2w2RHBx?= =?utf-8?B?R3grUVJlUkNDT2NGdmtjSlpHSUhZNzVxTmlleTVMNHdwbCtwWllOSFBZRFNZ?= =?utf-8?B?ajNxOFR6VUlhWDJEWEZZRUZHRWJ0MHNSVS9VQmpKeXFvVEliOXpjQnViOXl3?= =?utf-8?B?aE92dlRUQ3JzeTFVRER4UUI1akJFWm1jWDhQQmNhWTRtQmQ4VnhZeGF6ZlZR?= =?utf-8?B?b0o1aFRUUkRGenBxc0U0ZUtnb25nTHlNN1JJR2FsWXdhcG5NeDdBc0xCVXFh?= =?utf-8?B?QVlST09xS1MrZmN1dUJKc2dUbC9JRnJvRTIrVnRYVFVvOUYwZTgyME00Uk5H?= =?utf-8?B?QUo1VU9naTl0aXFYMkkyWEhsK0NFdkE3R284cERsUjNLVDdNV0c5aFpJckhM?= =?utf-8?Q?VANkdOvplzoeUspXNktxp3PeUO+O8bDbO7cPw=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9251.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?B?U1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UZuMUNzQU50MnFFdXhwekR0UnVyWHdxa25r?= =?utf-8?B?L2xpdytPVC90TFNTdDNFZVVzZ3V5eldlMDdpTi9pQ2xUUUF4SXQwODJiL2Ev?= =?utf-8?B?ZlVYU0Q0WTdEUVJJNzhSYXVZWWVtK1Q2dDcva0g3UnFCYWdxR2diaHRSd2lX?= =?utf-8?B?UmoxdiszNDgrUHBQaGVyVWdtQk1TWDhIL0NjY2IwazJ1OE5tdjhjRjBMTjY3?= =?utf-8?B?SDVLV2FsNUNhWkZYVEdUQnFJbjdxdlJjSTREdno1M1VlRTMrNTdnWXVSTFFQ?= =?utf-8?B?YzV3RUtiMUJVVXBOMTA3ek54WTZhWldsODRXVG9qVHR0NzNxcTY4Rkk3a2p3?= =?utf-8?B?S05VYkNUdVBteFcvdTlGNTh0ZTVGZmpoamwxUCtEQyt4WjBQTXY4MS9uQWlY?= =?utf-8?B?a2c9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fa80d4aa-0d7c-47dd-29fc-08dd0871b4d7 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 08:11:01.6342 (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: gmmb6bWUFWQsvfEk1v0uqFqPHwB4aqLG6RhrNL1V+WtPmAmncVRhkIMr2igZMz703SVDd8g2eTW+eymPmZalQ6qimpscRf7O6B2nzkKkHMA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7876 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea Add device type data for S32G2/S32G3 SoC. FlexCAN module from S32G2/S32G3 is similar with i.MX SoCs, but interrupt management is different. This initial S32G2/S32G3 SoC FlexCAN support paves the road to address such differences. Signed-off-by: Ciprian Marian Costea Reviewed-by: Frank Li --- drivers/net/can/flexcan/flexcan-core.c | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexc= an/flexcan-core.c index ac1a860986df..f0dee04800d3 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -386,6 +386,15 @@ static const struct flexcan_devtype_data fsl_lx2160a_r= 1_devtype_data =3D { FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR, }; =20 +static const struct flexcan_devtype_data nxp_s32g2_devtype_data =3D { + .quirks =3D FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | + FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | + FLEXCAN_QUIRK_USE_RX_MAILBOX | FLEXCAN_QUIRK_SUPPORT_FD | + FLEXCAN_QUIRK_SUPPORT_ECC | + FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX | + FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR, +}; + static const struct can_bittiming_const flexcan_bittiming_const =3D { .name =3D DRV_NAME, .tseg1_min =3D 4, @@ -2041,6 +2050,7 @@ static const struct of_device_id flexcan_of_match[] = =3D { { .compatible =3D "fsl,vf610-flexcan", .data =3D &fsl_vf610_devtype_data,= }, { .compatible =3D "fsl,ls1021ar2-flexcan", .data =3D &fsl_ls1021a_r2_devt= ype_data, }, { .compatible =3D "fsl,lx2160ar1-flexcan", .data =3D &fsl_lx2160a_r1_devt= ype_data, }, + { .compatible =3D "nxp,s32g2-flexcan", .data =3D &nxp_s32g2_devtype_data,= }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flexcan_of_match); --=20 2.45.2 From nobody Sat Nov 23 15:22:24 2024 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2044.outbound.protection.outlook.com [40.107.20.44]) (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 C588F19F416; Tue, 19 Nov 2024 08:11:08 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.44 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003870; cv=fail; b=YdASwRI54mumPV1aI1SKiJn3lVe6wvMouvS25DvQJGUeUqgF47RGLUjWyn8kLtBZD4F2E0ODT2gjtrZG68eMy2LG8V7qiYiefWoGJNrcj9d7OaY/P0yxHB8CLBRK12e+E7dzSnelqDePzpBOl5DPf/F0s4pjRxIX5O2+awHaewo= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003870; c=relaxed/simple; bh=G0WXPIXmMq0Zlpzu9iMfPQeI0xxXc0kD7I0Hsy8XA30=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: Content-Type:MIME-Version; b=O/BF4WkoB9WkwhzHHEt94/OukG30AAMWd/Ivab07gmakHgfiEoehhOxPcb6cpbf6Km9CoIdrrU4kCDfPD5FylsY9Fx1hFDIpxJW6GSYSDZ1+sJCvlnqWiK1g6evXET5x1SX/Xym8zR265z3GidHCpTqdbYwEJ76VcDke7e0rdIM= 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=djEO/WED; arc=fail smtp.client-ip=40.107.20.44 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="djEO/WED" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=erPxxAu5A/5CQq2wJpp2OlE5rTgujdX/BckliJSEHS+h3YWo0osU8ASQ5BxTZ+NcEi8Iup6NMUIZOKl4rjGhEtaFk6+ScGWicdOEktK9/Q4bu1jLkDa3eU4q5OwDU45zgnX5DWW0MicQmr3uq/VMQl7Zn8PXPzTfJEm5xELvog5AOz1bXcpgMX4xtbE42SUTpL1PLxOucPBIrgH2iX/J+Ck+VokGHIDnhqs7f2dkmylgRAqfloCubeegHmPPjiLIDF7t/TNJizW1xaoSkHcwnEKSqz6FtcAZZRfFEsWA4KS/bC0Rd+xMVnaKC+NJvHLRS8m56tIUc7BaGBNjgsocfA== 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=d+MvJjMJ3N0pA8nHxioLNChTuV+Hmdtz2LxJKzYJbxY=; b=LZQU4HQvUYFa+ArSxX8oSEzccrJKmfNo+23N7fRjaTBdF0LUQT4EDWGqE28Y6OidmGrmjEw77Xjr79BVsIgqELrOmbRnBHWYpvy25UzuPywhVlwOywi+fFLJJW6b5FVUosnwfYgswrYyrE/ZGX42Yntu0dkrZTC0J4zjynwGGiLZwYQSBW9UiiCpos8PJJVC4Duccvb/E7B5TPJy+Bl081SNStjSy8S9A64TFrd0TAnFcuQt9r/uxqzG/WxSG+5UjEvW+fwHqP8Bgp0+gMnkRPKVD5/wypzu84f6YfG/9H3WOZzDjTAqw5T/IrrRZpB2QvON+u3nuIM4nnFo7hBwSw== 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=d+MvJjMJ3N0pA8nHxioLNChTuV+Hmdtz2LxJKzYJbxY=; b=djEO/WEDxg/M+oRBHEBMMuPvZYEqG5NWgDjGhpNDYen5IvNcqvExPcuMCo5T1a6P8wnPldgABIdzmToO2gUtjdtqs1h5Aa4u1Z6GF1H3VsMvx9+dqe95HBKWH/vaw29D24EWi+VT3c4HqykqQPpuDSsXDjLtOYrIOMHGsZFm9ePTCSvTLsgkVi1GyfQfx0vsPHBnd2WD3FYm1vp/a7hhROZ0Yd7YLeZ5uMnCXyKRjuZowecS3KcDjlE2zUjncMdfTYTJGCiFsHvSM00LHEK/rY/PthI88VfhABhT+DEeNan7VfOcJU3upUyRvIIhjqrffaoo0PPZwo8680b2pXLhxg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) by AM8PR04MB7876.eurprd04.prod.outlook.com (2603:10a6:20b:240::22) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.23; Tue, 19 Nov 2024 08:11:03 +0000 Received: from DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd]) by DU0PR04MB9251.eurprd04.prod.outlook.com ([fe80::708f:69ee:15df:6ebd%6]) with mapi id 15.20.8158.021; Tue, 19 Nov 2024 08:11:03 +0000 From: Ciprian Costea To: Marc Kleine-Budde , Vincent Mailhol , Andrew Lunn , "David S . Miller" , Eric Dumazet , Jakub Kicinski , Paolo Abeni , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-can@vger.kernel.org, netdev@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, imx@lists.linux.dev, NXP Linux Team , Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH 3/3] can: flexcan: handle S32G2/S32G3 separate interrupt lines Date: Tue, 19 Nov 2024 10:10:53 +0200 Message-ID: <20241119081053.4175940-4-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> References: <20241119081053.4175940-1-ciprianmarian.costea@oss.nxp.com> Content-Transfer-Encoding: quoted-printable X-ClientProxiedBy: AM4PR05CA0021.eurprd05.prod.outlook.com (2603:10a6:205::34) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9251:EE_|AM8PR04MB7876:EE_ X-MS-Office365-Filtering-Correlation-Id: bc93aa2f-5cb8-4877-cfef-08dd0871b617 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|1800799024|366016|376014|7416014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?B?c0Z3bGNLZFBlT1hIQXovSnd3KzB6SE9CbXhQa0pqcE5DRk5JV2t0a05tTUJ2?= =?utf-8?B?YTYvQTlpVEJ5akNuMkpBcEpiM0Q1eDNmSG9kRHEvTTV5R1hRdVB0Ykd1Nmxw?= =?utf-8?B?alBLMjRJaFNhNmllVkZuUUxmdnM0WGgxd1h4LzR4WjRSZy9ubElCNStGVDh5?= =?utf-8?B?WWtFYVJyMnpwL25Fd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XBBOXE4MkJhSjMvWVFmY3lCUUc0NGtsMkRhcXkxbGlnK25HcG10ZkYwVkxI?= =?utf-8?B?MUowY29OMEVKYythYUE2REVkNDdWeG5PWExmcG85VGFjeGErLzhyWW1DQWJR?= =?utf-8?B?cTBuTGdTbnRUNGxQQ0pPdy9oOGhRZTRSUS9HaXlQSlV5QXZqRDVWMGQrajk1?= =?utf-8?B?Rmd3bHY3M0Y3V0QwdldpakcxWStqeDZSd1h2MTBqQUl3Q0ZXR1NVbVFKdmFk?= =?utf-8?B?SGVqWk9MQ0FkVFRabzB4Q1pTdGxHdTB6QVNETVNXN2hFTDQ2V1lHOTgyWkR3?= =?utf-8?B?dzZaRy9vSCt5VHpZT0hGWlRsUUlJdnBQdUNoZWNhRzZ3Z0dGUDhXNEtPWjVG?= =?utf-8?B?SElUVkl5anRzLzZ5cTF6azQwRUtyTFBEVDlsM0l3d3o0ZnNrNHpsdDByWGFR?= =?utf-8?B?QllaRm5hN1E0dE5uWC9LWTl6NjY2UXozWlhjM3NKeE40d243SzhuS2RiZWtw?= =?utf-8?B?bE52c3h5NDlmZ1hUY0Q4bDEvN2dJcXF0em5NQmRIcU9qVmtYTVBIWlRGSDZV?= =?utf-8?B?Sm96YVJaekZUa2dVVUZQMWhoZTVXTWZhL3krMlRRRHVnenN0SmppTmhrcTRr?= =?utf-8?B?ZnZabGFwVUtyNHBzaitndU9ROU5COWVHMUxmbUx0M2ZGWGw2OGxETEpJQnhl?= =?utf-8?B?cFMzOTloZ2RCZFRiYnhFVVljWVJ6YW41MWowcVgwaWpjQUFUMHlSemhlczZy?= =?utf-8?Q?etgRKlWdU4BzfE1Fo0MzU0tawqVJqrqOx2zAQ=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9251.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(1800799024)(366016)(376014)(7416014)(921020);DIR:OUT;SFP:1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VQbGcvUU1kUnBodHpmT0JQU21HYndo?= =?utf-8?B?eWxSazhDNWd3bDdYZnQ2R1FselVjRWJBUlY4SmVCNXdGMzVXOUp6dDFhc2R0?= =?utf-8?B?b3FjTmhkenhKcDMvWndyL09oTHJLYnZpRlIrNGY3K0tmaFJrNmRtQzNyb0lS?= =?utf-8?B?R3BkcThHV3hCR3JoVGI3VDdSZk5Dd1puVFEyc0NzcDk4dUZKWjhTMEpWYytH?= =?utf-8?B?bEZCV1ErakdSOVhBbjJ4RVZQUCt1V3l0RzI2ZFU2SFprMTZhUXdraVg3MElj?= =?utf-8?B?TTlSTEZGYjFnSHhlcSt2enZXTnhMYVNUNGt1ZE9XdmIrejNSNVF4VDl6cUp1?= =?utf-8?B?ODZIZE9QbktlZ1BocUo2MFJuNkV0Z0tFUUVQNDJMUVR1YVVrNHkyMEZFakZY?= =?utf-8?B?RGQ5eTJ3MURkNDZQTVJXUVZaZVFoaFFTZlJJdjExQ0JSRk8wMW11ME14TkZ3?= =?utf-8?B?cEE9PQ==?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: bc93aa2f-5cb8-4877-cfef-08dd0871b617 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Nov 2024 08:11:03.7235 (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: H3X6bGugneoxgBVbFvkW2TPf3yTkSebfD4BFRZctynlcyrDmhdHx8/S+/F6wKGuWPqFEn/9Ns3wO+9bVp83MOJOyNkKG1beAeIr0+5WC+ZI= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7876 Content-Type: text/plain; charset="utf-8" From: Ciprian Marian Costea On S32G2/S32G3 SoC, there are separate interrupts for state change, bus errors, MBs 0-7 and MBs 8-127 respectively. In order to handle this FlexCAN hardware particularity, reuse the 'FLEXCAN_QUIRK_NR_IRQ_3' quirk provided by mcf5441x's irq handling support. Additionally, introduce 'FLEXCAN_QUIRK_SECONDARY_MB_IRQ' quirk, which can be used in case there are two separate mailbox ranges controlled by independent hardware interrupt lines, as it is the case on S32G2/S32G3 SoC. Signed-off-by: Ciprian Marian Costea --- drivers/net/can/flexcan/flexcan-core.c | 25 +++++++++++++++++++++++-- drivers/net/can/flexcan/flexcan.h | 3 +++ 2 files changed, 26 insertions(+), 2 deletions(-) diff --git a/drivers/net/can/flexcan/flexcan-core.c b/drivers/net/can/flexc= an/flexcan-core.c index f0dee04800d3..dc56d4a7d30b 100644 --- a/drivers/net/can/flexcan/flexcan-core.c +++ b/drivers/net/can/flexcan/flexcan-core.c @@ -390,9 +390,10 @@ static const struct flexcan_devtype_data nxp_s32g2_dev= type_data =3D { .quirks =3D FLEXCAN_QUIRK_DISABLE_RXFG | FLEXCAN_QUIRK_ENABLE_EACEN_RRS | FLEXCAN_QUIRK_DISABLE_MECR | FLEXCAN_QUIRK_BROKEN_PERR_STATE | FLEXCAN_QUIRK_USE_RX_MAILBOX | FLEXCAN_QUIRK_SUPPORT_FD | - FLEXCAN_QUIRK_SUPPORT_ECC | + FLEXCAN_QUIRK_SUPPORT_ECC | FLEXCAN_QUIRK_NR_IRQ_3 | FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX | - FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR, + FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR | + FLEXCAN_QUIRK_SECONDARY_MB_IRQ, }; =20 static const struct can_bittiming_const flexcan_bittiming_const =3D { @@ -1771,12 +1772,21 @@ static int flexcan_open(struct net_device *dev) goto out_free_irq_boff; } =20 + if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SECONDARY_MB_IRQ) { + err =3D request_irq(priv->irq_secondary_mb, + flexcan_irq, IRQF_SHARED, dev->name, dev); + if (err) + goto out_free_irq_err; + } + flexcan_chip_interrupts_enable(dev); =20 netif_start_queue(dev); =20 return 0; =20 + out_free_irq_err: + free_irq(priv->irq_err, dev); out_free_irq_boff: free_irq(priv->irq_boff, dev); out_free_irq: @@ -1808,6 +1818,9 @@ static int flexcan_close(struct net_device *dev) free_irq(priv->irq_boff, dev); } =20 + if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SECONDARY_MB_IRQ) + free_irq(priv->irq_secondary_mb, dev); + free_irq(dev->irq, dev); can_rx_offload_disable(&priv->offload); flexcan_chip_stop_disable_on_error(dev); @@ -2197,6 +2210,14 @@ static int flexcan_probe(struct platform_device *pde= v) } } =20 + if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SECONDARY_MB_IRQ) { + priv->irq_secondary_mb =3D platform_get_irq(pdev, 3); + if (priv->irq_secondary_mb < 0) { + err =3D priv->irq_secondary_mb; + goto failed_platform_get_irq; + } + } + if (priv->devtype_data.quirks & FLEXCAN_QUIRK_SUPPORT_FD) { priv->can.ctrlmode_supported |=3D CAN_CTRLMODE_FD | CAN_CTRLMODE_FD_NON_ISO; diff --git a/drivers/net/can/flexcan/flexcan.h b/drivers/net/can/flexcan/fl= excan.h index 4933d8c7439e..d4b1a954c538 100644 --- a/drivers/net/can/flexcan/flexcan.h +++ b/drivers/net/can/flexcan/flexcan.h @@ -70,6 +70,8 @@ #define FLEXCAN_QUIRK_SUPPORT_RX_FIFO BIT(16) /* Setup stop mode with ATF SCMI protocol to support wakeup */ #define FLEXCAN_QUIRK_SETUP_STOP_MODE_SCMI BIT(17) +/* Setup secondary mailbox interrupt */ +#define FLEXCAN_QUIRK_SECONDARY_MB_IRQ BIT(18) =20 struct flexcan_devtype_data { u32 quirks; /* quirks needed for different IP cores */ @@ -105,6 +107,7 @@ struct flexcan_priv { struct regulator *reg_xceiver; struct flexcan_stop_mode stm; =20 + int irq_secondary_mb; int irq_boff; int irq_err; =20 --=20 2.45.2