From patchwork Mon Feb 19 05:22:35 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13562167 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id CDB7EC5475B for ; Mon, 19 Feb 2024 05:14:50 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=TvR+6yWxBZYF/5tvYBUMteXxZLU6uamGlM1WgCUeBtc=; b=TFYIuDJ3aI8wMA 8jha+/7TW5bGoLq6lir0J21d/2oLBh/2uBk/nbTnQgMZPoOakaoeochpe6tXRT0uzoGyrAY/udaTk H/LKKQoKD73F48Yl1Fje1gpRjA6Uz0q0E9ZsBOyIi1jVFaaoujQc5AkZp1sdp3c3/5CsG8OMde20N Ujf6vOKFbpG92YoGb/JkPzxSbawj7dtJA9ofr5JIy69xDq3ZrDVQ4O0pSJ/yeydUKJ22+n0P+AgvL UDj3krdeNFSoFyzEg2kohdSdz5+00QRLq+vwJsUAERtKlUC2kx53Q0NS0ZTYF1lB1T7AF0kxFMSyE StZH9lUAaJBd0CA2/pJQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbvz8-000000097Av-3QFi; Mon, 19 Feb 2024 05:14:34 +0000 Received: from mail-he1eur01on0602.outbound.protection.outlook.com ([2a01:111:f400:fe1e::602] helo=EUR01-HE1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rbvz6-00000009794-1EDZ for linux-arm-kernel@lists.infradead.org; Mon, 19 Feb 2024 05:14:34 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=QqDFuWyZZLRsiZ42Sq5riY+p++6KUzYTy4kHfmyl66D/PioJRINsxRAZS2tw7zmq30cJN+fUDFRHyZPqRybyKflXrAfjCspVc8xpIF/1GCQo81KC2vGkSfZSBGN0N3SUBYuRnCtpWi5jOKeNWLPQza2C8F38jQXVxqhdEhY/pqibAvKZPAvMas9AKKOe//V4NV6G8dbgTMsIyRKcaxDT9yjPoLSA8JPmexVlYiHLGZImrUloqha0M+aWJDF2Om+oqPjVzObSs2EUosahmR5PioLozAm00qx3gCI3z35wTyaKtvP4w0pc7GPdR8l5E6T/kLD2aZd+mUbMpPDdz3vU5w== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; 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=UvKB+A5hMOF3DRA6aDHLPY41uexTzYoXFpenqLVMc48=; b=ADrQxflxNZUhqyDTWRnqmajY2gRmo1Al8CcgGUUig3wGnrOD9kS6/50uYytQU1zpFxey5c9fpnw7gCHW4//3clgpXwCT6MwnR83RTD/M2H+Oxy8F5DIoJwbhhSfYgbwzBcMGEGE2WUZbmCV83QWpXIpcNGnNzAFUO6uiqcBS7ApBcLyS7aCShpjuIEIKO1OnguZ2pGxWe2e4nJ4WpROAvEbyt4zqOAOEk2/ZsIEFBYrDpkoq1HyacGJ9hoqZbDK5kWP35jXEimKqIj9LPnV6bmCI/JNhAdsPKkhpaUbD1ZvIkgtHp5VfVu1VRiwXQo5eY7jaXNaJNS0tf2DiKJEyBw== 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=selector2-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=UvKB+A5hMOF3DRA6aDHLPY41uexTzYoXFpenqLVMc48=; b=RDyEAF5CQPT0tMurSK9Nrirrx/4nxz5A6zboCzGZfFuu5jxxLifGoaOWZ2wW7ccxx3MuReXUuUVf4J/8K+qkGh6AfHXy2XV6snHjqHswe4BMhygAss/987HNMRzmfM1GoGG47053YpyMWrdpcdZoRAQcRlFTtA+UW+XJQbAnRZs= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) by PR3PR04MB7228.eurprd04.prod.outlook.com (2603:10a6:102:8c::5) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7292.34; Mon, 19 Feb 2024 05:14:20 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::4ac3:3559:4200:38e1]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::4ac3:3559:4200:38e1%4]) with mapi id 15.20.7292.033; Mon, 19 Feb 2024 05:14:20 +0000 From: "Peng Fan (OSS)" Subject: [PATCH v8 0/5] mailbox: imx: support i.MX95 ELE/V2X MU Date: Mon, 19 Feb 2024 13:22:35 +0800 Message-Id: <20240219-imx-mailbox-v8-0-75535a87794e@nxp.com> X-B4-Tracking: v=1; b=H4sIAJvl0mUC/33OwW6DMAzG8Vepcl4mx44D9LT3qHYg4KyRBlQwI aqKd1/Sy8g07WhLv0//h1pkjrKo8+mhZlnjEqcxHfXLSXXXdvwQHft0KwS0YBB1HDY9tPHTT5t GS4CmNwgEKonbLCFuz7XLe7qvcfma5vtzfDX5+/fOajTo2lhDwTGjgbdxu71206Dyyor/SEyy8 tTVQES+wVLSUVIpKUnpG8LGsoAPpbRHyaW0uRbAC1NNHf6q5aN0peRcGwK11DMxNqV0PxLBlNJ l6YINxN4CSSmrgzR1KatcG7xzLNKKPdTu+/4NhrU6hAACAAA= To: Jassi Brar , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Dong Aisheng , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team Cc: linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Peng Fan , Conor Dooley X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1708320164; l=2405; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=zY6UXXKyBj0qqZ+nkF9V/M8wXac3nwd5osTeWH2petI=; b=EAw1mp6DJ+bU0/Cg4yrG7k079fMjpiyfyR3Kocm2FScGvkW65Pw4+WFoJZaZiwnU2EZGa2Tk2 rSclioxF1gqAFS7pMunSHKuC7hmrlI7WVmTX6q90PLfaKtxj6OblQFB X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR04CA0017.apcprd04.prod.outlook.com (2603:1096:4:197::15) To DU0PR04MB9417.eurprd04.prod.outlook.com (2603:10a6:10:358::11) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: DU0PR04MB9417:EE_|PR3PR04MB7228:EE_ X-MS-Office365-Filtering-Correlation-Id: 4176be90-2210-490c-5643-08dc3109a098 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: AyoGCKPaJpfoFKO4a8gmKo9r+dV4Wr/PyAMt7BQ8TFIf7Ky/aaAI0kXT55CntbBdhJ+H0b6PiqHgHOq4SdnA/j2XEAIWAk1TJgRJrDw8J81KPnPgFbpLAbJIbz0kk5r9zwuYq1u72N714KHJJFEVrDtCwzmCC34HwEdwINsPnsj2xxUdx4LkFb67c8NrGvGqFtrvszpknZW2JwwN7vewVKdcvf5+KiUsA7NRVvQ0aaLaCXGyklYSmq71ekNK608kEpx/bazg9FoYtdejuaG70hOx7YzwbHPt5gWdPljh+Axx9i5dXlGtbFtBErEz8HLnSc3O2gFubMCpDsNjhCnPlGxGLiTtcLTe/H8xawFpNIYhzvd6upbERosrnlyNiuN8wdJuuw6I7DTfj+SVPLTV0aO3adwnQanCfdWQRZiKT0N7p9S9Qgf3ZuHQVMxS8/fwneCzhTkrUzdhWY/XRn4uz9w3W4s8fX+/mDN7lpZtlCN3np/DZPvL5cW61s4tvrrc9Zwdg/KM1M2Am6mMy9C/3/U2UtyXqhd4c1cR40RF0+pc+PhKdwq56y1TlUAfgincJ3JIlI8PR8qaB3UZirzfTnqb0fwagfofiWLTbr86Ckh8BIE+lchWdDNB8PtPNntV X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:DU0PR04MB9417.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(346002)(376002)(396003)(136003)(366004)(39860400002)(230922051799003)(64100799003)(1800799012)(186009)(451199024)(41300700001)(8676002)(4326008)(2906002)(8936002)(66476007)(66946007)(7416002)(66556008)(38100700002)(5660300002)(15650500001)(86362001)(52116002)(6512007)(6666004)(316002)(36756003)(54906003)(6506007)(9686003)(6486002)(966005)(921011)(83380400001)(110136005)(478600001)(26005)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6CkM9u+Tiy6HDyEn2vMN5Y5VvCSq?= =?utf-8?q?0tJ6yBcoj6uQtpQim0EDyHxgg94tSyRJ0AqFmP5NpR2p5NsgfvQGxevFtymJwncqm?= =?utf-8?q?Xy7QpsYz1F/f1VLinuGiCRvywUgz2pHbzCvrtfBIC29QKiMSCTVf866elZx+E9SIH?= =?utf-8?q?LuGqO6vJ/8HLiFr4f33XHR9JFI4udglshvp0vQQ5IVRhVf0A78Xv3s8cGkUB4WOf7?= =?utf-8?q?6dub+i6Fq7/uqjR6LG3xNpwI//H8QobbnApdef/X+NgkqW2gFXqU43zQx+qrRvGKL?= =?utf-8?q?nTSTiu/qnZ/EZaWLxs3baoNsqw2XRyo7NnOAIeePaspXvJM+hUJtXiwnXrdZHvgl8?= =?utf-8?q?6hUKSE106V8huYtt0aelqlu4gik+idAXotSL3miBD2v4rw7gPIx9r53JfoDeWciFZ?= =?utf-8?q?XMxWWcWOT6lzs0/PdyxgougijcclGLpM826YDwyS4VugzmWRNEpLaMnPubanGbDMb?= =?utf-8?q?hkeMGzwShBcaX/pBPQMZ+TygIsUlQ3oth/fv8UqoRys620ElaOceKzJbjBZBqpxAN?= =?utf-8?q?oEMu478+X1o7hSVJa73AfAsEK9j+XFVamq2T909MI7H4w3xghyGAzeffw7gfGoqqt?= =?utf-8?q?13dqi/Ev2/mr3B9gpjMziq6clIGFXHXBOcCakpU06O11cnxLB/TR0YJy/4DtV3d96?= =?utf-8?q?GbcykqUZc6iCU3Cgq544sTCCj4DgtWM21KerQB7ztoSUSoG9cDWnnA2mST+5Gn7y9?= =?utf-8?q?U25FFL6Lq6Eq5zMMSAoNpdAu6KiAXy0ZzEMjw7SSBIcGTRZII8Urx7WaofQFTeqIx?= =?utf-8?q?j2WCKIK23+OV+Lg1iW3vgaejAMPbITohh6uxxlmVIwVtTBUnBiOIBi4U2A+qD+onh?= =?utf-8?q?vFwelXNGFJUyyiLzm7CvhsbXcvjEEgLNwY3v0ADU+V0fsMoao/Hm8/U3/xt52tqZy?= =?utf-8?q?S8onAE2imaKAtzsG+/woSndiRFQQ5QDqGjPon99iOgOdAFpi1sMPuE745EYi2lzqu?= =?utf-8?q?0j4/UAXuM3QY9bgszz9mH9YTctpgGGMtMmsOT5R9LsHDQ7uVDRvk9DpKNm0iw0r+8?= =?utf-8?q?mbCzJF8QCm7tQomENAxQbwxxqGsiXn2ogCf+QrDYl6KgeDKhWoBJvyzkAskOwBBnL?= =?utf-8?q?0jwqCJvdqzKcMMdETBV6c+fENvoQ9aJ5MOtI+q0q+3tQGJN07W3QVYQyGNBusMqrm?= =?utf-8?q?iBhXshBVeJNuk0vTJ5brG+dNPhlu+ROcHYxNgJV/XIKT6xZYC3QMj1iD8cf/g/+1E?= =?utf-8?q?MHcWBUJqCM4OCuOF8etgCmXzRkjRwFjPqndtjqa7AGqp3wxhsy+zxNQNkEjiDg7eo?= =?utf-8?q?j/LvzFROEEVGvMXw64lql53v9SFW4vGAJjWpTkUBR+C6Qps/IFF1zRVW6X5yW7Bq9?= =?utf-8?q?l0By/2FBjciSNEhTw1OZxpKRmz+2r8daHSiaSTVo2k48728C7UWRmRxEWeN4RgYgZ?= =?utf-8?q?Wg5/IEVYwtJx4kXKxnaIhCE+T0bK0ipFBWJqu9yX8hBNlOgmrT9H0jhyB9aveqA6G?= =?utf-8?q?K+kAILpilsszGItRhmF4LJGDKQ2fRW63zdYhcQPjhVydCQQ+rnkGt79txQ2hKa7tP?= =?utf-8?q?MfhlvZ2N1gXk?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4176be90-2210-490c-5643-08dc3109a098 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Feb 2024 05:14:20.1567 (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: 702ylhu0bFdx3GkoVj1+u78IcwF1h0/2zPOr1Jtk1CrqfO+Vf5Z6/FCBEyo2c3gbBM83iZdWBSxEUbUA0cInFg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7228 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240218_211432_387364_18CF3437 X-CRM114-Status: GOOD ( 10.80 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org - Add dt-bindings - i.MX95 ELE/V2X use same register layout as i.MX8ULP S4 MU, but the TR/RR num is different. To make code reusable and not add too much macros, add runtime detect number of TR and RR by reading PAR_OFF registers. - Add i.MX95 ELE/V2X MU entry in driver Signed-off-by: Peng Fan --- Changes in v8: - Drop [patch v7 4/6] which is wrongly included when doing cleanup. - Link to v7: https://lore.kernel.org/r/20240218-imx-mailbox-v7-0-8fb665eeae40@nxp.com Changes in v7: - Per Jassi, separate the patch to add of_platform_populate. - Link to v6: https://lore.kernel.org/r/20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com Changes in v6: - Drop node labels and add Conor's R-b - Link to v5: https://lore.kernel.org/r/20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com Changes in v5: - Per Conor, add restriction to sram property. - Since i.MX95 MU has SRAM, we may not see it is compatible with i.MX8ULP MU, so drop the fallback compatible - Add R-b for patch 2&3 - Link to v4: https://lore.kernel.org/r/20240125-imx-mailbox-v4-0-800be5383c20@nxp.com Changes in v4: - Address dt-binding comments in V2 from Krzysztof - Link to v3: https://lore.kernel.org/r/20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com Changes in v3: - Following dts coding style Per Krzysztof - Add return type for init function, patch 2 is new - Check return value when tr/rr is larger than 4 and return error. - Link to v2: https://lore.kernel.org/r/20240122-imx-mailbox-v2-0-7b3c80333b92@nxp.com Changes in v2: - Support sram property and add example - Populate the sram node in driver - Link to v1: https://lore.kernel.org/r/20240122-imx-mailbox-v1-0-81413f655210@nxp.com --- Peng Fan (5): dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible mailbox: imx: support return value of init mailbox: imx: get RR/TR registers num from Parameter register mailbox: imx: populate sub-nodes mailbox: imx: support i.MX95 Generic/ELE/V2X MU .../devicetree/bindings/mailbox/fsl,mu.yaml | 58 +++++++++++++- drivers/mailbox/imx-mailbox.c | 88 ++++++++++++++++------ 2 files changed, 123 insertions(+), 23 deletions(-) --- base-commit: ad5c60d66016e544c51ed98635a74073f761f45d change-id: 20240122-imx-mailbox-243021d12030 Best regards,