From patchwork Tue Nov 19 08:10:52 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 13879481 Received: from EUR05-DB8-obe.outbound.protection.outlook.com (mail-db8eur05on2077.outbound.protection.outlook.com [40.107.20.77]) (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 5DC5115530B for ; Tue, 19 Nov 2024 08:11:05 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.20.77 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003867; cv=fail; b=acrw6Ct7IU1+UjjydbJ838n4tUECwNLa6LeSF1c5xFTtSeEYZpCdVmLRysHg8ErWqUSOx6/6ipOE071wglmGyyp4qG3MthmcxIJ0VnwdngDx79v2DUIsOR64haNuYaPUlwxxB6WVHZ5B7ETd+AoU1Mtlgrutb6BSzpEv3ssptbc= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732003867; 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=lom/3BHWid5veMVrs3+XeI7JNZhZHv7Wr+jCA36dtfB2/UCYAWcEmB4L9RQa8BRQqfWMHDGvjpBP5I+Y3EWcrRwW/gDDSJ2NFWIGvh/D3xSBUsHZAxrZ7E3W7DVZnVlkovx397RmAMseX62P/VC5CzrUCnlS6S7TXUqYnegw4DI= 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.77 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> 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: imx@lists.linux.dev 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?q?xIYJ6Beo6rBjDp+dPPYBgR3s+LuGpP6?= =?utf-8?q?5nmmKeSzoakqPJsWiq1G5t23b+kxOhEKDJzMBlLytGzQIJ0l3aiGAhgP+eAg6WDO6?= =?utf-8?q?6nUJfFCBQHgjEDEXnbh1iEhmv/TMre3o2E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lj/eUyNL+rPJoGiKnyUuDFaM?= =?utf-8?q?D4Y/l6DpqGx+QReRCCOcFvkcJZGIHY75qNiey5L4wpl+pZYNHPYDSYj3q8TzUIaX2?= =?utf-8?q?DXFYEFGEbt0sRU/UBjJyqoTIb9zcBub9ywhOvvTTCrsy1UDDxQB5jBEZmcX8PBcaY?= =?utf-8?q?4mBd8VxYxazfVQoJ5hTTRDFzpqsE4eKgongLyM7RIGalYwapnMx7AsLBUqaAYROOq?= =?utf-8?q?KS+fcuuBJsgTl/IFroE2+VtXTUo9F0e820M4RNGAJ5UOgi9tiqX2I2XHl+CEvA7Go?= =?utf-8?q?8pDlR3KT7MWG9hZIrHLVANkdOvplzoeUspXNktxp3PeUO+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?q?SVLM2Uj5y5LjPnih8sqBZeg58Z2F?= =?utf-8?q?uJzvcIdSWRaaeGHYaGVbR6qiJW0WCsSDq/rQAaqh1HUAEcRq/obZTQyHX91fRfHOR?= =?utf-8?q?iRLNdb+sQHqxJiQM+l6ODg4smg7oLVjezqSIWBrtLM8RD9p4Ecd0zAwkGLmKc+UKA?= =?utf-8?q?S0vRv5+/VNc669o34/0FxKWFFVEgUyZGfza5/r7jZ/ukr4+aL20HU/UgQ2OmaVCSs?= =?utf-8?q?Tpnj+wcz6G59A0+4Oq1vn9zSH73vL47Ey4vv/xGT2vjx5wJQuLWlVvsOuN4uN8Z+z?= =?utf-8?q?pDTap4mpT9pAFJnA2xPqthqxqsTDLek8uTPYjApbGScqSrjAxwUeQvGSmDAy1q39R?= =?utf-8?q?NgRCQQZ9G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V79PFz3KwQ/QVnpTZc1+TwRMcfSxvndOR+JJ6UFn1C?= =?utf-8?q?sANt2qEuxpzDtRurXwqknk/liw+OT/tLSSt3EeUsguyzWe07iN/iClTQAxIt082b/?= =?utf-8?q?a/fUXSD4Y7DQRI78RauYYem+T6t7/kH7RqBagqGgbhtRwiWRj1v+348+PpPherUgm?= =?utf-8?q?BMSX8H/Cccb0k2u8Nmv8cF0LN67H5KWal5CaZFXTGTBqIn7qvRcI4Dvz53UeE3+57?= =?utf-8?q?gYuRLQPc5wEKb1BUUpN107zNxY6aZWl84WTojTtt73qq68FI7kjwKNUbCTuPmxW/u?= =?utf-8?q?9F58te5Ffjhjl1P+DC+xZ0PMv81/nAiXkg=3D=3D?= 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 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/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);