From patchwork Tue Nov 19 08:01:43 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Marian Costea X-Patchwork-Id: 13879466 X-Patchwork-Delegate: kuba@kernel.org Received: from EUR03-DBA-obe.outbound.protection.outlook.com (mail-dbaeur03on2066.outbound.protection.outlook.com [40.107.104.66]) (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 587B6157469; Tue, 19 Nov 2024 08:01:58 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.104.66 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003320; cv=fail; b=Q32nTwXfWqLyIahEV+SA43NW8puMFbFiknMgnNT+P4EZTaXDScz17GG654/UdBgcQfkhRnIs3cwpf66ZSLBUVEB+DscCQymSrL6oDZYUvuXGQcJ9WYf0AjgvqM2PfRE8AGrR0sUdX4xRZr2d5ZtDi21TrYT+N8eMrzA6a9IQx3c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003320; 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=l4GyN1A3DRnQejIvoZSkYaKnAP8aYESE4zh4N+awQMEmgEoF7tINp4HwWQzmwMX8ETy23HvdEDPDKxMzIM2eiEho6mNz0MzPpUBPhPMVXIUnNGsIWTyI+/uW0nxd8VITUtOp1P4H2t47m+2xrg3/GctNLdjVEsa6EZkJR4gY/08= 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=Y4TP+etL; arc=fail smtp.client-ip=40.107.104.66 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="Y4TP+etL" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=aaRb9/Z+AFsNsMjS6tI1pXc5+twwCyv3lKdjwXMLLABdwJC+KDMpZZQVpeMTe99XzVkf1tmWxuavhkfgTDVBlIhssmeNG043kHuLJvWRIZZ9HbVb2vrUxtBgVqaTgedhTI8mx5wyouuhUAO5IJaBmjQ8K0SmH88FU+uM3arnYD2NSJ12rS9dC7u0zG66Nt81TaOkJoxQz+6aNCF7i3QeF0vZTV7o+6EeN0FHskAssq5NC1hsDbGunmUzd27BHaoH7zS83B5cuTkT4XmcvtYi/piKWQ6X8m4PTZkzEYOETbHpO4xgAMNhwykgtJAaV4EVOJPKRyK0qytJSoIGOwlbUA== 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=l47zWkPUCpofHERG/D9EBJPDVtnZXSLudak+W44+uJ/tgecy/C5Vr7hGH/eYijE/uKUqfLhNJKsPic7UnjMEnsicxo1frXEetlZ+LclTCrR/5GERiPYKu/XNi6ar69Mo/Q4SiifPeDtA90zUhaqYXbLDRPq4q3+O4Jg8Y0jUJCRQyzVRZMqS3aJBXylgOOySkO6MNWIlQmsB3QoyjUfyTLD18xU/+ptvduSFH+sCOLsScY6qSCRgoDLJLj0brseptOdaJhHTLneK0fpI6pReR6ZVQH5GbD+mPu2TU76P3VnlxHLUPiwjYk+nfD8WKEmiTp8VtY7C7hQUDnAys1IhVQ== 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=Y4TP+etLdJcynZXnwJ7DYNEOcVGQGH4VhbV1JbBUwPHb7i3CBlrp6Qik2UhWSlCZGhhZWhNh/8MxtysfZvtS/1UomS2RjcKO37V/E0wSjQgzvyXKS2BYBXiwWppOEoHW9Z3XQV/OeYwOBWnbE8lRm39dJ+9zdlNt7BKchafptCF+e8WI422L6RPVHNVhBRR6Gd82Heq5YxJA6ffv1nylHE69ygi1Evd5EpCxm7piPHUmrpj9DrihYkYdswqftMa8jGjeJ9ZQWD8OD97N+mmlgRyHMp+2aXjArwG235V13J9s5j6LSPAdAalmdNSuVp1FRF2c1BPcsw8sB+9WVmrzVg== 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 AS4PR04MB9363.eurprd04.prod.outlook.com (2603:10a6:20b:4e8::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8158.22; Tue, 19 Nov 2024 08:01:52 +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:01:52 +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 v3 2/3] can: flexcan: add NXP S32G2/S32G3 SoC support Date: Tue, 19 Nov 2024 10:01:43 +0200 Message-ID: <20241119080144.4173712-3-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 In-Reply-To: <20241119080144.4173712-1-ciprianmarian.costea@oss.nxp.com> References: <20241119080144.4173712-1-ciprianmarian.costea@oss.nxp.com> X-ClientProxiedBy: AS4P192CA0037.EURP192.PROD.OUTLOOK.COM (2603:10a6:20b:658::28) To DU0PR04MB9251.eurprd04.prod.outlook.com (2603:10a6:10:352::15) Precedence: bulk X-Mailing-List: netdev@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_|AS4PR04MB9363:EE_ X-MS-Office365-Filtering-Correlation-Id: c0c77b13-d01e-4af9-abaa-08dd08706d61 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|7416014|376014|366016|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?2FrPGeFPuIQu9pf4l9h2id2XXIcE7bd?= =?utf-8?q?pEUtM3HOG1Ybb33dXInIvFUPq3zddhGymMPXVjK960uujCiGzQg2CIP1OiULQrF8u?= =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C?= =?utf-8?q?zWwG9KL4/7V8JSnFGKRy/O5We7sgAcbQ2t2JxrGHbYlwhx7y85/2ZKLSspWmR6724?= =?utf-8?q?vUMEcVteNPIMsj+TxAtOp09MjND1TsV0Vc/UsiC322pifaX4qxJC6jBeCr5HM9ori?= =?utf-8?q?BRC9V5Tv22roS1oLINyQKWVDVv7+4jRpRrPY5dkDz273WX6fNyqbfWI1TfgzFXpCn?= =?utf-8?q?XrRDD39nrXk77pLqnjLJmLeSrGKL5xVHvHbpCYJC6eiWSJGHW3aFHdTpp3J9vHRLA?= =?utf-8?q?HtowQ3WreNUfJPC/giRTelSdj+qNfTf6N06plCUu0deRDne6FX8HC+dD6R2j0ShPH?= =?utf-8?q?Z9g25D3/zU8/wrXXMktJ/RtMyB1UmF3h9yHWNCYu6PJZfHqucMmvzqio=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)(7416014)(376014)(366016)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?22pGUHlz1yA0P6W8fpW3T1rEOoaz?= =?utf-8?q?IsxA3LNmT4U13p3BXB54HcbWXXW81tq7vVDH5Rv+/RXn4VXcOkd9jojE9IJwSeEdv?= =?utf-8?q?TEmsHgfBsPiV6/kKamyGpaYeS69GfUKvMTk50nsLl5bs9975LRWwkeGOXAWqusV08?= =?utf-8?q?ZQJZUsocCU5VWt1aCU2nt2i0OB7eid3V+vxMllTjgVosnz4od4QD1JXgBk5yrD7/l?= =?utf-8?q?AmgRH57Qz5qnV+zC4Z2bp0MNv57AFSx8HVIQAzCc1oNE+HtVcTF9mqea9wU0eEDPj?= =?utf-8?q?4b6Ne3+Gf9vVXP7HXsQAJI8/f8YATNQRIC2un/RQXFeb1momgC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C69mMmuZsWxulSytFh1u7vNRR?= =?utf-8?q?4bCg5pqxT6/yaUocKIG3uqRE6hQkm5OahIRNAPSdnShcv/zzKdEk4j26/0xqRk08p?= =?utf-8?q?UZzLcZFk6qAEMje65ENsfDgtaU6804TItY1npWY6flQb2yI05muigmDX/BmdVTh2f?= =?utf-8?q?7v4xKvWh7cHZMUQ4cSIjbtcmxNkE9mzhgKbSnK/qQA9jK0D7ZWojcVbE+ndmosFii?= =?utf-8?q?5rOS+Q97ddwurToGRm6aT3R1qyFc64iB8enVefsPTamPb/r/TeM1DjpDPJ8EP1HpI?= =?utf-8?q?SA1I6+awaXZUi7zVB8+2QUtm+VZHipEBGQTOA9SJanIcm9OwmP+m4QKuU2FzxQvhR?= =?utf-8?q?3Qo1zq3Lc+RECeXVWOB9cAGyc9kozYiuZw=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0c77b13-d01e-4af9-abaa-08dd08706d61 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:01:52.2774 (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: miK7onlwZXUlq7UF1FshEN/NkE76EO3uqp4w+qyycFEQ936/dZwvmAZvF4QkaHXpwVnW57Sl8FKRav7isJtk9W1JpowhltqVyMqCqyaQbpE= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS4PR04MB9363 X-Patchwork-Delegate: kuba@kernel.org 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 --- 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/flexcan/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_r1_devtype_data = { FLEXCAN_QUIRK_SUPPORT_RX_MAILBOX_RTR, }; +static const struct flexcan_devtype_data nxp_s32g2_devtype_data = { + .quirks = 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 = { .name = DRV_NAME, .tseg1_min = 4, @@ -2041,6 +2050,7 @@ static const struct of_device_id flexcan_of_match[] = { { .compatible = "fsl,vf610-flexcan", .data = &fsl_vf610_devtype_data, }, { .compatible = "fsl,ls1021ar2-flexcan", .data = &fsl_ls1021a_r2_devtype_data, }, { .compatible = "fsl,lx2160ar1-flexcan", .data = &fsl_lx2160a_r1_devtype_data, }, + { .compatible = "nxp,s32g2-flexcan", .data = &nxp_s32g2_devtype_data, }, { /* sentinel */ }, }; MODULE_DEVICE_TABLE(of, flexcan_of_match);