From patchwork Fri Nov 29 14:25:32 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ciprian Costea X-Patchwork-Id: 13888727 Received: from EUR05-VI1-obe.outbound.protection.outlook.com (mail-vi1eur05on2079.outbound.protection.outlook.com [40.107.21.79]) (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 809191C2BD for ; Fri, 29 Nov 2024 14:25:52 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=40.107.21.79 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732890354; cv=fail; b=ksMFtuRbIgikgXM5TdmwyMbxxD5r0loK8SgDjiknrLW/F6OK3sr38enCGpGyqpmgDJpq/d6sMxNK1hXuR/xNx7lmB3j2bUYecs+Skv08ZecO9axwpwWbH+2lyjKk/54zsezGSWuCImNxqJ8m21pFq7YbLttpxa3sK2xFJjtxn+c= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1732890354; c=relaxed/simple; bh=edFd+inA9dcicpBf664xI6coZ274eru4iAfozGXpGew=; h=From:To:Cc:Subject:Date:Message-ID:Content-Type:MIME-Version; b=ffhDPRxPJS/iJhA/LRWvGsJEcupGfgTPOudZVNhnmbNse/Oh+N2jNgRJVBCpdxIr8mB4P/LQMD/bJggljKFOUYpZX+7a2K8w6mmm7HRBubRhQ3lrMGVXOYLzC7wjjSLB61LSA0/M7XgIcjNfVjl/DWXyw7KXWCqi2kmiNyTjvJY= 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=snrWNQ97; arc=fail smtp.client-ip=40.107.21.79 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="snrWNQ97" ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=Pe8qtTtZTHv+icx+YvW6T54/tye4kEIIQdDKZAx+U0Ner0unWPPHG/jMVtFeKbNt6tD0efVXLWFIaOJeMMKKIIrA+nWSNIjSGsdIttATtyaMWi8WIRK4YQkPI1ahEySO5TkjF+ODD/U+cYZLE/hv1TD0mGDF2ezTgVJTLmZ0APLtpLHNzsLHaLvS04zDLSNlhbEkWO5q4ZUIh+NqR91pxPyPUve/d2XEvjYMXc4egLA/ryVLvJuOuOs3cKleKaPxkGTLAZ+kKTXIyZCsVf/zKMM3+xGKLy3rHD4lGB5BTXhoeX4hQDKfqcBvWOhL9wHFb5gvNMbdA2Di6CxQGdy5gg== 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=qfK7MOBypUQRjC5Mph936WPO5FksmWIk+RONz9vihjw=; b=p9XuOWysl5Vcntrzb4Qh51bfNzSRNeL0o0wfv4VVz4uUvoUEE1db43UOujIXU9dwLueOAd6+15hCZ78qrZm4C0OIhzp/0Ek7EN9zt0NSXu7NLJDLGu7hxk7jdH9nHVHhyiOeXhwuMMhVTP5bzhBZ+DqnCWKLQPRkNr4cRsaYWdobIlKCZo5Dm0V22h2ebB2mOHpw8kBfmgVxthc+iAAMZ/3xh7t73c+2uNQOLS7L5oroFz9Mv6+TbwrzQWXftDO0Tz8voHvhQ4/4M6gRO09EyKGRyvdrN75qGHB/158Tg9jm51D1uFXV8UK9cajlmIrzVoP1XlvUUKHYBAwi7/lXKQ== 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=qfK7MOBypUQRjC5Mph936WPO5FksmWIk+RONz9vihjw=; b=snrWNQ9748aqxnykBaiJw+poVeEh0htF81uHVeaFkDic0WNH48RtFsJ6QSDS0uqf9IAeHjJCysW4qtqKK8OY+NHWUS0hgHEL2EyMG+deRLQ5ZJMxKEk3QFHb1YrOt2pHC3cuah4BnGTe1ZHR38wiitgbyFk1DYeu1TN2xoOno6CuPAJ+meOCI9HPxbbTk6Q7KNiggo6SHYkoXnVstzMu1WLy4bGr+rOU7/V4HlyT6zPTdeB2WNkJlKmEqRqOK6g5J24eEIthE1N/M3Cd98XERdZzRPOhh8YLAQt7lMPK9eLUtapZ4dqXdqJxmndpfbkPusUPDO0M/XIzpdHI/JtYKA== 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 AM9PR04MB8810.eurprd04.prod.outlook.com (2603:10a6:20b:409::14) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8207.13; Fri, 29 Nov 2024 14:25:48 +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.8207.010; Fri, 29 Nov 2024 14:25:48 +0000 From: Ciprian Costea To: Marc Kleine-Budde , Vincent Mailhol , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: linux-can@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, NXP S32 Linux , imx@lists.linux.dev, Christophe Lizzi , Alberto Ruiz , Enric Balletbo , Ciprian Marian Costea Subject: [PATCH v3 0/3] add FlexCAN support for S32G2/S32G3 SoCs Date: Fri, 29 Nov 2024 16:25:32 +0200 Message-ID: <20241129142535.1171249-1-ciprianmarian.costea@oss.nxp.com> X-Mailer: git-send-email 2.45.2 X-ClientProxiedBy: AS4P189CA0025.EURP189.PROD.OUTLOOK.COM (2603:10a6:20b:5db::15) 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_|AM9PR04MB8810:EE_ X-MS-Office365-Filtering-Correlation-Id: c0687aab-1ad0-40b3-b95e-08dd1081b841 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|366016|7416014|376014|1800799024; X-Microsoft-Antispam-Message-Info: =?utf-8?q?0zoa+easd2IbBbfYTTXkzxFXOlPhvFn?= =?utf-8?q?SZBFdGhok7DPDjYv0TQ5k2wQf0xZ/d1+El5dMIu+RYH6eE9p+2HFi2U9w/9UczeWz?= =?utf-8?q?G3l+2LdMB2tJA/ceozT18LZ3ThOfX6xQmGRIi5ik7mHcpwfiYOwWwgek79wQmJtZT?= =?utf-8?q?EDHw7tMjAvslcNOpPHDiedk8G9W1Ka2oKcJykYKqOAO2spisqB/yrWQsDWV0iQkOU?= =?utf-8?q?XkPIRKtmP224bBA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jYyBfGDEN91T3mm4gSk0tailfGZ2xzhEsrsPSI?= =?utf-8?q?AsZBLkA8TcuTZUxBmCgAlQjc38vD8l0tUK7Xxao2Rxp3jBprs8Q2ZfGc/6D44wr0s?= =?utf-8?q?+/dsxFe86Yr9n1GcfCLsfVocv8BYUL8n77KS09/VClbBxa43RQXzx9HKbrrEQ5cul?= =?utf-8?q?wm6/Xsg4qsh84Zxop8AII5UDjQW+W0iAC/Q=3D=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)(366016)(7416014)(376014)(1800799024);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?JumgHHepP3fl8dgnqaXq3RrdAXEe?= =?utf-8?q?zH0MBdZQhWehHKe+NkUBhoJNxTi/nGo0ssi5cFuWMK81hUvnJnxOvpaw5hDJ7KKd1?= =?utf-8?q?iMZOskbCKlyiLOhEmufQQqRmuogP40qxKEZyeMv/5DBbS2YIOpVm2U8wfIL7ka9ae?= =?utf-8?q?MFC3XBeM6SwIGnwTwTOsc1I7ieGdY9nBKeUKw6SYPmvKSo4L/xjnkeiyCC15adlG3?= =?utf-8?q?7fY0Sa2SS1hyMiZvFmqgl2p6b40uIAIdWwiauUJWHg1pssaTL6+iarXQgaQctJ+sc?= =?utf-8?q?RSJUmigkM4bmdeH9NDjgBTfpEtTKRolVWYMieU/06TgXCSomULouMBRELOyToHPd5?= =?utf-8?q?vcUwilourqezsbwpPcQ8x7tDfikjWBGO2wchi8DoXidou87ubuVFrbqjenmlz1NMe?= =?utf-8?q?wNgzo+m93VkjlkCfX9tPTPTw57NLiBubP1Ix+gtfpNT7Mqhl52si5ERA3Cv97RY4q?= =?utf-8?q?DChsu1WOLe/fCqpm53iiRxS6uLZ1gcW22Rl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/dKP2h6UQ8qRE23wal1sEmmrr?= =?utf-8?q?A6Z8HY6jq9edi/yzn7U5W4LLFCj7Vq/H4j9w3hlju0iNMAuvaEVLMkgmKKDitMeg9?= =?utf-8?q?CJyfWIBPa8AfEHx3I1g3gD7ya7FUuJdyIsalkv05w6p/qDIL19eumlIvcpjaUn5KO?= =?utf-8?q?vA9F/d0Y9mQ80uQmmABKZi/EIQRbBLBZjg=3D=3D?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: c0687aab-1ad0-40b3-b95e-08dd1081b841 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9251.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 29 Nov 2024 14:25:48.6524 (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: UBc5O/JAFJyEoTc1WsBX6tdqKHJEfm4iZxMxLg/nYCcXvWuwAYuAihGHIPzLVmbkFjNzpap+VkTXvAlNoAdxjTOGi2TUycCLs+xhR1/IEVM= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8810 From: Ciprian Marian Costea S32G2 and S32G3 SoCs share the FlexCAN module with i.MX SoCs, with some hardware integration particularities. Main difference covered by this patchset relates to interrupt management. On S32G2/S32G3 SoC, there are separate interrupts for state change, bus errors, MBs 0-7 and MBs 8-127 respectively. Changes in V3: - Added Vincent Mailhol's Reviewed-by tag on the second patch - Changed to 'platform_get_irq_byname' for second range of mailboxes - Made several rephasing in bindings doc - Removed Frank Li's Reviewed-by tags since changes were made afterwards. Changes in V2: - Separated 'FLEXCAN_QUIRK_NR_IRQ_3' quirk addition from S32G SoC Flexcan support. - Provided more information in dt-bindings documentation with respect to FlexCAN module integration on S32G SoCs. - Fixed and irq resource freeing management issue. Ciprian Marian Costea (3): dt-bindings: can: fsl,flexcan: add S32G2/S32G3 SoC support can: flexcan: Add quirk to handle separate interrupt lines for mailboxes can: flexcan: add NXP S32G2/S32G3 SoC support .../bindings/net/can/fsl,flexcan.yaml | 46 +++++++++++++++++-- drivers/net/can/flexcan/flexcan-core.c | 35 +++++++++++++- drivers/net/can/flexcan/flexcan.h | 5 ++ 3 files changed, 81 insertions(+), 5 deletions(-)