From patchwork Tue Jan 23 14:38:42 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: 13527511 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 88ABCC47258 for ; Tue, 23 Jan 2024 14:35:07 +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:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ZTuTAL4CzDIhOze5VDUeqBePWYb8jIIePop3jDdQV1o=; b=z+yTq6bvlonRt6h/KPF9IRUs2x qD/Ud9RZwPKYGe0PwY86mE9MRO1nV4gweWVLxgHedFUrnV4p56Z1TVNXEDP9VGU142VsUTpCIMb++ WAeW5MLj+Ym4YWOjI2eT/f45sMwbFgUueXUg7Z/YB5wC3Vcdft9v9RJe5iR0lcqlEQymkK/EA2hgF l64dY0KECPidxNAqcyMn+XFzCSzzsC/sfJWPzBc8+d+TgM7LjHn7Ut5S17CELA6WW21H2Bp0vPHG5 jRYgDdY1my0uJuAXYACw/xyIBilBqwTjSj7LK2NZAY5tO0imc+HdAHL7s9JjFEmYHx+UzG1+waXoh M3INR9TA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrM-00GpTy-0x; Tue, 23 Jan 2024 14:34:40 +0000 Received: from mail-am7eur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260e::601] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrJ-00GpSZ-37 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 14:34:39 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=ZpBXhKvfI3enPvHp3/vqt/siMpWZfs1l4bkSuYuXXUjgu6IL4uGFNMRyQnUlVLeFKyudXwey34hdYslsco3rVv/HIexTuk1je6QMFxOq4u4st82jDP0hE1buZjRaq5bvJjNNQTgSwpSDpRzKrJdrEl4XR7nJ08FvDA0BeuH0NJD9SD7YrzGgybQS+pK0qlxmy+/7AP8XmE5R96goVLU6A67fd6vnyGIMtWY1fk7KsxGwS2uCVk8J0vbFRTUUJ6v+qmrSPS4P6XjTxM8XvSFY3DC3ivWjXh04u5n54Ve4gx11KgHIIWrR8AsQBWOm+f6aRw8+RfSRCRpwAoJHyFKuLQ== 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=r3XHHpStksUO4GcHGUVcQ9dgS7D7luR0kd4G1utidJ0=; b=b6KG4G4DXVCx6FwuYs521qO78rFXJXLnUSFJ33Yf/DiOr8OHVl65+YCWglJ40xx45tV0X/S3mXQgb56A0osMU7ISXxStHukmEvpViYdWwgxAVPckRNUSOAcv3Ej3iRDE1WkTEoM57q4BNtZdu6dyLz/9tgBpXygMJhmyr5qOOsnt2MHPEciANho8oXIa/dPZeNzvRdJ1rqCGGyKHtIgDtKOEcqJ9rr8TVS4AioHU5g591kpJ6zQxEzZzQxrcfX0yogKoOEGpUsWajQEZFmjpFm9GmNy17oKnUmbHcF9uEzz2XfQlbTWfpIMi/zQKJnWjGcZtDkwP8lwWUymqNldabg== 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=r3XHHpStksUO4GcHGUVcQ9dgS7D7luR0kd4G1utidJ0=; b=JZQvuka+OS6htvbrQgUjwxcQU2mPST1h4fd4eMHOLa49ryUh6se6MtmXVrFpUt/B3LxqEyZ2c/wS6VWuFKYw1s4xA8+YOcxTy5GkmKHsmEaf1vXrsw4xDLI2QJPKNv9NuqM0xB7iSPm8/NHxgEO5FPOImH8sbYzjpg8ciDVxHS0= 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 DBAPR04MB7304.eurprd04.prod.outlook.com (2603:10a6:10:1ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.36; Tue, 23 Jan 2024 14:34:29 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 14:34:29 +0000 From: "Peng Fan (OSS)" Date: Tue, 23 Jan 2024 22:38:42 +0800 Subject: [PATCH v3 1/4] dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible Message-Id: <20240123-imx-mailbox-v3-1-ed932945e0bf@nxp.com> References: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> In-Reply-To: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> 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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706020734; l=2485; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=WhIUeH5L6Tjf2c1SPOoBHhGiEQ/e6lVAYjkS8AaH3kk=; b=8D0rE/JC8HyIfQqoDriZ2LdyTXRoxX9/396kquwdLZ3tLcRWXOWWe8ruhjRB1ffVkVjdbYZ1w 9RxmNH532OyAG9L0pDrOofamFjE3p5nKNZLwlQfNIo/OrjXIba+d/AV X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0125.apcprd02.prod.outlook.com (2603:1096:4:188::13) 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_|DBAPR04MB7304:EE_ X-MS-Office365-Filtering-Correlation-Id: 4ee0c847-216f-4b3f-fe5e-08dc1c2067fc 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: xnbsR9SlT9SuZf47sG8ujXqDkf/N3ZbwGyuHLp0alL7C/1/sZ+wGpi3F56A+ka/rlUjqCqew4uYFgOY0EnsXnHNrnw+bi5mhc9oc+pekP3+EXejaG97b/jwP5flSntvVr6DojMNwy3+Kj3tOalNS5fzlIQWjc/1jbhfdxOlgdO6THe8CoHYhkDNTfNbN0YnG6FqCjJY1eq7I8Pm5RtiMcERQabgBmb2nwDGtItZohuDtLadoeLf2HVxYW+gfY+tKc1WwscsOAus1p0gbTaYEHI/qvL63+rqTbdPMnoT6CQXN3m73XS7iHp3vuVK+3ccKSNK4nk59Ero7+MWZk9xhBfzbRGpigy1kVDVRbRBk1q92TV8pIeDkIxHVpbeQwFTOjs1rb3X17PNaWIMZBqFMIIrCQJwMkwTkAR987/FHGBLE1fkuehY8S2b7sVC0HRP1N7tBrLjmiwPzSK/qOL2a06c3erW4sAcjeeyuC0TSghata+jE8lpDu5utTyqQSPsifJ+0IausUzb89+BDpItF9/Ylh8p8b6ZTEuZ2dWgtH7koJm7VvsPc2WeaVNrM8X5OBqEmeKiTrOBvAD+WduWf/aeIxeufZ1ZccF58LsN4lqNcFz1JEAiGxSh86kh1W/HdwD8CWfo/rEZF3cC45+7SZHVxfqCfvY+m9RGiF4Mq1WM= 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)(376002)(396003)(366004)(346002)(39860400002)(136003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(5660300002)(66946007)(66476007)(66556008)(110136005)(316002)(26005)(6486002)(6512007)(6506007)(6666004)(9686003)(52116002)(478600001)(83380400001)(4326008)(2906002)(36756003)(86362001)(38100700002)(41300700001)(15650500001)(38350700005)(8936002)(8676002)(921011)(7416002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RigLF6aaMIJ7DX0A4Wv9j+enWIxh?= =?utf-8?q?rgoCGaWlxfbPGA1VbBx6jvwpxb0g4z6AwDmkbJ5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ujKj4TzJirJSqZ/nI71uTzEz?= =?utf-8?q?HqEGgc1GV8Ns6AXOkdz5GkfpT9TtrGvTlhsMpKpjJ3jMQUcz155dl0+yF3R0I1o3C?= =?utf-8?q?TiEI3jboAfmqM7Kx/9/PIzbFuDhCq5AwStBUgzUQWKIe+gk84kpz+UM2qEMon3R/e?= =?utf-8?q?yW8pB4YVyolDLbvHckRqUaj6JFO6tVCRUtHRzlXLRIiDlXUc1u24qih9BR2AJwkMD?= =?utf-8?q?0uYl5UVxACIZOJ0YTd748Q0N8uc6MzEk355qszZ6L4to+8p3/vBmbxtq3QYDfUgQG?= =?utf-8?q?XGEYBGA2gzVn60BO1cKOIequGJxCrBML4+CvD8ihpeS3QVeG0sxdtcVbH1Tg7qyfS?= =?utf-8?q?M5QlATH2uBBaDfcCY/bfsM0YxCxcW/qTlWFkWRUWggquuLdH6ZOGx74Yyp4JQM5wt?= =?utf-8?q?hAZNjrRww1MyGWYP3g77myF37j1QT3rcLtN1fNPdiFR2FAqSXwGg08k4Ux6A2U8rt?= =?utf-8?q?444oea3hXsYcRApPSUrYRbTGG415Bfrkz5N61uLDAqAjDkbK7fsC1GA6MRximOvAM?= =?utf-8?q?BycBR1VnZKmzNhuQy2pYYcpNNpZ74L+CZ68lDQhKAEtALmTho756xdOwz5qiNYBED?= =?utf-8?q?m5u5vD4VSAsd?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4ee0c847-216f-4b3f-fe5e-08dc1c2067fc X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 14:34:29.0116 (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: crBhhd9uTRB6h8tdpj9Oh3VYJpNc9EpnnfIH/VJg1avti0IoHH1OctEkWq24WixmWnqG+Tm5mfdBgBZw/2hVDQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_063438_005858_1647B6E7 X-CRM114-Status: UNSURE ( 9.24 ) X-CRM114-Notice: Please train this message. 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 From: Peng Fan Add i.MX95 Generic, Secure Enclave and V2X Message Unit compatible string. And some MUs has internal RAMs for SCMI shared buffer usage. Signed-off-by: Peng Fan --- .../devicetree/bindings/mailbox/fsl,mu.yaml | 50 +++++++++++++++++++++- 1 file changed, 48 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml index 12e7a7d536a3..569fabc5285c 100644 --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml @@ -29,10 +29,14 @@ properties: - const: fsl,imx8ulp-mu - const: fsl,imx8-mu-scu - const: fsl,imx8-mu-seco - - const: fsl,imx93-mu-s4 - const: fsl,imx8ulp-mu-s4 + - const: fsl,imx93-mu-s4 + - const: fsl,imx95-mu-ele + - const: fsl,imx95-mu-v2x - items: - - const: fsl,imx93-mu + - enum: + - fsl,imx93-mu + - fsl,imx95-mu - const: fsl,imx8ulp-mu - items: - enum: @@ -95,6 +99,17 @@ properties: power-domains: maxItems: 1 + ranges: true + + "#address-cells": true + + "#size-cells": true + +patternProperties: + "^sram@[a-z0-9]+": + $ref: /schemas/sram/sram.yaml# + unevaluatedProperties: false + required: - compatible - reg @@ -134,3 +149,34 @@ examples: interrupts = ; #mbox-cells = <2>; }; + + - | + #include + + mu2: mailbox@445b0000 { + compatible = "fsl,imx95-mu", "fsl,imx8ulp-mu"; + reg = <0x445b0000 0x10000>; + ranges; + interrupts = ; + #address-cells = <1>; + #size-cells = <1>; + #mbox-cells = <2>; + + sram@445b1000 { + compatible = "mmio-sram"; + reg = <0x445b1000 0x400>; + ranges = <0x0 0x445b1000 0x400>; + #address-cells = <1>; + #size-cells = <1>; + + scmi_buf0: scmi-sram-section@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x80>; + }; + + scmi_buf1: scmi-sram-section@80 { + compatible = "arm,scmi-shmem"; + reg = <0x80 0x80>; + }; + }; + }; From patchwork Tue Jan 23 14:38:43 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: 13527512 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 1FB76C47258 for ; Tue, 23 Jan 2024 14:35:11 +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:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=8QLhhSn909PSemIUm10iLpSFyMNmQoOJNJs0EywKrdE=; b=w5QCw90TGOIUNbxpQG/B3kdcXm fSO3eh7bBShgnDe5EZHB8dYXDD6W7h4Abniti3FPU+uGqSkVZxCt9rJp4+Df38jGijBlYqXJ2x2sd 5uLxikxz+gMhqc7vIskbtdLbZPp7qVTULcBE0unwYSU0Jqiz7WVM7PAepelsGW8zO54wh53M7CvrV HxPjyU8emrUegSwxJWDL5WSgZ5T/t8u37SFqX7WB7cbMeZU9HAHRfcEIBnXiVmGMhTBG1vj+3ZjMd F7e73HQpUPyJlh3APawjL1UhZQ9YygObdpQSIMkGPWztLNjCS+cy88MPk5VD7SxUyAw1v5rgSb2PS rx9VrqUg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrS-00GpWK-25; Tue, 23 Jan 2024 14:34:46 +0000 Received: from mail-am7eur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260e::601] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrL-00GpSZ-25 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 14:34:40 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=c/XEoqfJ4K8CgowLuLA6flobOamrpudz8zNDmmdjuAmIh2F/O1HfTM5+HsUTlMSCS96T35Evqy6WpJ9VegmPzgrmYjvMLt2PA6N8XhJSzwsZazi+2J+bh/zG6a1h6o8ngAe9BKI4fQLDK9lf0vLmzEjMkndk8jENOrI4MB+nQ0J2r1ZCaMKzZ1O9Rehrwj9VcM0RRSWOhr8I3wsdfjjy9v6/o9Hk3e7CW9D1u9AaZAryhiD6Kp6B1VDOcGU+YoQKv5+OYGrgXzXvbuHcmJMR9STZpnRrFpdOGE4xeDBpFPBQXI1Iu44WtiW6gLM7jy2EoRuUSKhjVHYYjkRq8CAx2w== 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=lVF+lIifocnKZkWBqalKhcjKGKvD/NfO5sSqA4z8S+g=; b=HeK0JFWxlehyat8N6Eati3Qn65pGs72ONPxg4TXV0LYJ7mPUjJUdeV0h21RwCPhP9skToeHb2qJTwu7WZp1CYOQrLTlKWEKcAahKbjdNj9CtY2qCaaU3Aq4T5r7p6KZzZ1Qm6uZvkKfZZJ0UU98oUWJ7wynvVbvku0oiCWk9ESimJFvwJN4cBP033ZE8R7mxRQKU2mu2EBOciTxU1zChrrueOOSsRJ8GlLfUe7x5O+SOYj9oQQ7Z7UhfhqGXZAo1RdSJAlCO9m1hzBRh0Yz/c4ZNUzz2xTplqgSOquJBi8exDVMXGXAPfFH/iW9mBqjWGL8j0XEP1UzsHaj1QCeVWg== 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=lVF+lIifocnKZkWBqalKhcjKGKvD/NfO5sSqA4z8S+g=; b=R8lLILfqPqT1SFKxgfCxRIcZ/Ug7XZ6utrM0t/S8dgBs3UgtRvdExuEQBx6wYaqQpRMspLOJ/yNYSD1oxHe7mpC8CG/C7riBjkKZYuOa2gkhHrrbpw036DghzISK7fhrsttef22m38SLBvJZ2RJikWRlUH+B0WW4KQEmupLh/Kc= 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 DBAPR04MB7304.eurprd04.prod.outlook.com (2603:10a6:10:1ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.36; Tue, 23 Jan 2024 14:34:33 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 14:34:33 +0000 From: "Peng Fan (OSS)" Date: Tue, 23 Jan 2024 22:38:43 +0800 Subject: [PATCH v3 2/4] mailbox: imx: support return value of init Message-Id: <20240123-imx-mailbox-v3-2-ed932945e0bf@nxp.com> References: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> In-Reply-To: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> 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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706020734; l=3343; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=+Gd+/hMaY4KbnLg+mAxCKcpz6HM1MVsMqwBCKUxGXc0=; b=5O3LBUBookNT8VKge0bq0I+VPLg6GIEYtk4VRy9cu9QXhIqyVEPaLkgYaCoa4B+5wEULmof2T liTlsjuu8pgBynhMx+EbuWxO2p/PBTnjf1U3jZ+1wTZsWQiSf6RaXt2 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0125.apcprd02.prod.outlook.com (2603:1096:4:188::13) 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_|DBAPR04MB7304:EE_ X-MS-Office365-Filtering-Correlation-Id: b029d009-942a-465b-77a4-08dc1c206a88 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: LxlJl92cpFpU6b5kcWcYp1mzc+mN++YuCquE7CHSNRcJkonVFk5wAei5otaS2nzqpa213hQRVYtlCVMxUWJxrdFJpO4h9zcwnykXPv93Mo+ek5+p5J7Xz2OcHYrKy13BjJcsS6VQfcG4ukmwr3an0KJzLX3Hg3m5T6frHnnB5ZiXD27909BBqc4EUhbpA2rIFfJsd/A511FK6rkBWcMUSqQ6LDVcLFn5++xhgJWoboW4ASsxVflF0SQmBNYswpxmC3K4fSFWZjjb0AanFvW4BVO7w4+FQC/UKxhxq91BmYhFQ5y8LkIcIugab0fiQ7clR2vf+h1lmkgh92QIEf3WQLESwizVl369HSY5avTTc6LnzW2QmYhJxFw1j11L7J0BAnVDAn78N+XYnOFihgAVKq2gVm7qC68Cj/w0kAQ6MFTWlFcTBNrgTjO9wbClSrsbCVNGlWMwbMpj5VtPV2hVWih+uacn3jpMQWa1XyqDPLLP2KZtnSR4DrZr8fpP63hk3OslZtM1cPNW8jtmFQnwOZ8f3hUxod+FFuoel8X0HPLdn3ta4SMOxrxxOxSzLCgemeYbQeD5ZlNMY1yILEr2kxQOimlM+a/c7E7om5nXh1iKhiLAv6tnN10/4eFC+kcm 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)(376002)(396003)(366004)(346002)(39860400002)(136003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(5660300002)(66946007)(66476007)(66556008)(110136005)(316002)(26005)(6486002)(6512007)(6506007)(6666004)(9686003)(52116002)(478600001)(83380400001)(4326008)(2906002)(36756003)(86362001)(38100700002)(41300700001)(15650500001)(38350700005)(8936002)(8676002)(921011)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?6edQka++5Q0OJX/w6Xo96bqUYguu?= =?utf-8?q?zY5phKyxxaS9Ux+nsFkKaCx9z/EoFXirCS3D+UapINRhsPDfeE2+nkWdX0QgjpRiJ?= =?utf-8?q?rI005WpWWIvcNDqNkR7NVRBD2w3WH/Mlh9DQbh+aG4FWQW/uCxVgoOaVqgQSL+jK4?= =?utf-8?q?mqYR8oaFJc+ylJX3UtekVkYcvqXcDSprRq3FN3bpXG5uhEl+QxS7iTrxpgkLVdLzf?= =?utf-8?q?AThhv3sjIf4OaY1kByy/hASFxv2SFMSgRtHHpo8EB34lPW8gwPpBv/dLUUwd1WjcV?= =?utf-8?q?egxVbcL+7TPjNQFJjGXrrYQCM3Mo+M2T90pnozkv4BYmOryA6QxAiUvG3f+20X5/d?= =?utf-8?q?7VG/ZI/TNseNOpdzTsn/IGmNSKRvDr4Ck0+ZyvFpPy8ooHzB4PZX1pFDDtpa8VKGO?= =?utf-8?q?jitEzxkr4xf0SuW4Y9rS1lyeJOGGVjGATUzRD1o2G/bC6rEuDUSA2hiNKsNYTNBFw?= =?utf-8?q?lmyb5KXGWQcukLa+79epqGx8ml6/cj4ctq7t8/Tgux8wk2Nt0QZwI0BD2AgBJ5s8A?= =?utf-8?q?VSf5JEV0IGDxMXJoiwuA4U5WG+ZUV1+tEr40j9meY0wR2hg1QX9QXEOy2l51fOjIn?= =?utf-8?q?DgxazrFJ/OkwdAnNa/HtuwVvPk1i/ETMZniqC2uspsDUjOxMRYXyV+OWvnqfnm6In?= =?ut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/QvaKo8/?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: b029d009-942a-465b-77a4-08dc1c206a88 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 14:34:33.2903 (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: umuEQoWJ9Ef/0q8LbmvLze1mRa1FwXnHhbAzEUZg0UfRmArLoHWytncbdTXZUk6sdeLrHlcvvbUD7AxHyEGLFQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_063439_685760_6CB836BD X-CRM114-Status: GOOD ( 15.31 ) 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 From: Peng Fan There will be changes that init may fail, so adding return value for init function. Signed-off-by: Peng Fan --- drivers/mailbox/imx-mailbox.c | 35 ++++++++++++++++++++++++----------- 1 file changed, 24 insertions(+), 11 deletions(-) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 656171362fe9..dced4614065f 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -110,7 +110,7 @@ struct imx_mu_dcfg { int (*tx)(struct imx_mu_priv *priv, struct imx_mu_con_priv *cp, void *data); int (*rx)(struct imx_mu_priv *priv, struct imx_mu_con_priv *cp); int (*rxdb)(struct imx_mu_priv *priv, struct imx_mu_con_priv *cp); - void (*init)(struct imx_mu_priv *priv); + int (*init)(struct imx_mu_priv *priv); enum imx_mu_type type; u32 xTR; /* Transmit Register0 */ u32 xRR; /* Receive Register0 */ @@ -737,7 +737,7 @@ static struct mbox_chan *imx_mu_seco_xlate(struct mbox_controller *mbox, return imx_mu_xlate(mbox, sp); } -static void imx_mu_init_generic(struct imx_mu_priv *priv) +static int imx_mu_init_generic(struct imx_mu_priv *priv) { unsigned int i; unsigned int val; @@ -757,7 +757,7 @@ static void imx_mu_init_generic(struct imx_mu_priv *priv) priv->mbox.of_xlate = imx_mu_xlate; if (priv->side_b) - return; + return 0; /* Set default MU configuration */ for (i = 0; i < IMX_MU_xCR_MAX; i++) @@ -770,9 +770,11 @@ static void imx_mu_init_generic(struct imx_mu_priv *priv) /* Clear any pending RSR */ for (i = 0; i < IMX_MU_NUM_RR; i++) imx_mu_read(priv, priv->dcfg->xRR + (i % 4) * 4); + + return 0; } -static void imx_mu_init_specific(struct imx_mu_priv *priv) +static int imx_mu_init_specific(struct imx_mu_priv *priv) { unsigned int i; int num_chans = priv->dcfg->type & IMX_MU_V2_S4 ? IMX_MU_S4_CHANS : IMX_MU_SCU_CHANS; @@ -794,12 +796,20 @@ static void imx_mu_init_specific(struct imx_mu_priv *priv) /* Set default MU configuration */ for (i = 0; i < IMX_MU_xCR_MAX; i++) imx_mu_write(priv, 0, priv->dcfg->xCR[i]); + + return 0; } -static void imx_mu_init_seco(struct imx_mu_priv *priv) +static int imx_mu_init_seco(struct imx_mu_priv *priv) { - imx_mu_init_generic(priv); + int ret; + + ret = imx_mu_init_generic(priv); + if (ret) + return ret; priv->mbox.of_xlate = imx_mu_seco_xlate; + + return 0; } static int imx_mu_probe(struct platform_device *pdev) @@ -866,7 +876,11 @@ static int imx_mu_probe(struct platform_device *pdev) priv->side_b = of_property_read_bool(np, "fsl,mu-side-b"); - priv->dcfg->init(priv); + ret = priv->dcfg->init(priv); + if (ret) { + dev_err(dev, "Failed to init MU\n"); + goto disable_clk; + } spin_lock_init(&priv->xcr_lock); @@ -878,10 +892,8 @@ static int imx_mu_probe(struct platform_device *pdev) platform_set_drvdata(pdev, priv); ret = devm_mbox_controller_register(dev, &priv->mbox); - if (ret) { - clk_disable_unprepare(priv->clk); - return ret; - } + if (ret) + goto disable_clk; pm_runtime_enable(dev); @@ -899,6 +911,7 @@ static int imx_mu_probe(struct platform_device *pdev) disable_runtime_pm: pm_runtime_disable(dev); +disable_clk: clk_disable_unprepare(priv->clk); return ret; } From patchwork Tue Jan 23 14:38:44 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: 13527513 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 D635CC47DDB for ; Tue, 23 Jan 2024 14:35:16 +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:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=ALEYUvi6kxkXtbqXAOFtlvql1LoaRkx4i3oW3SAYhCA=; b=wK9f8IFEgnbx+ZYfxtBzh8PloN i/4gvCEto6Tcdnj4jH7fKxPCvGn8zT0jkmYqNPHb0qQDX2cbNQM8ziEmhz/14v++NRtjk2Twq0A7P 5zhtCbxK/rBy1QShqJ4a4x/vlwSibFEeCs1HIve7niKUowEpc+YjWeVQH53QmOy9FgZd7yfKvUftA cyyAQoI8NQCUXZsBq5sgiytOAMwGLjHKZHlbXWB2iu205GOotvT/i/7apwolGzNWoDe/aOKizXn7f Z1i1xY40EUTyzdiCX6CAyWKQhrolBxADu1cjMLvHcbo70CyYutD7/R5Un13bXnuCTfFB7mzEOXX95 Ibut+IhA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrT-00GpWe-0i; Tue, 23 Jan 2024 14:34:47 +0000 Received: from mail-am7eur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260e::601] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrN-00GpSZ-19 for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 14:34:42 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=iCDXee2RzRF3616cVR3D8Vmn4/qjFWjnALy0OmLCqVNdCAr6tMCuDOKQQcqJHVcV+Y1AWy9FhxucAfGDw6kYw9aTQap+p/CvsO3ivHaEJnos738T+AGaen1cqyrIQC6jmfNA7NkxN8FVHoD4SpsLEmfjw4ENza1Vhq8dbPPMxugiF6viFiHQcb1BWR6cs9o+9fmzel7n2Ggupgd1wAF+yj0nZ2eM+G9mvIE9hfSUdqJRIYc059OG+EYubZJIA0wcfiOaeL0//R2ZNp4ZUBwDFa3VD9ixlZtLFf4+u9oKIg9YyvKh+VoWIPBBJXP14pSze/GTYUghpBv5pSM5aAZOHQ== 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=LjHoK34g7+uBu3xT/B+UpWr/KWX8YJRjxsgH0FR0FB4=; b=EL+CRCfqs6CNZ22Ajl+CrRkD65wlprgvxRBauD1IrFuMrHERoujv5ci3jVftqMr2G7dzL2zz5ixqBN/+ANdaJcOAyLBFZ9CzzmIg8Btbndag5mr03875FIPiT2ZuonqYZZKysq5IPKPy0SK5svoMAl0n3XiI3hiqUOatNVNgYAkSwRM1WfUj4imJGTRc/z9o0Nd0cgP6Tz0LtEGlJGKNmJJJ1DDtQsYPtel4u31IjCUfThI7Xa/Kyi7zEMMjEuWPQk61x5d13mQZbYd9H+jRsG2McNlkML6cMQHIopSyTw9O/aVqeCf8yohBsc4oX5AY1YCBQJ3NzpaHo8Zwaonsrg== 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=LjHoK34g7+uBu3xT/B+UpWr/KWX8YJRjxsgH0FR0FB4=; b=HqEOny0L73W2HogCyeuC4KXN8MnQ6HQ9956Ee0M790eKR6O5ydKemxI0WUNOeLPJxZvyswwXV9xn9y/B4IR+DYiyUZlwAGC9gw79qukQppTYEIvlOwWqtEEhiAEst1MscheJg5eRVin+/+yof0hEsx3mEdtKxjzShD/Z6urmLvQ= 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 DBAPR04MB7304.eurprd04.prod.outlook.com (2603:10a6:10:1ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.36; Tue, 23 Jan 2024 14:34:37 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 14:34:37 +0000 From: "Peng Fan (OSS)" Date: Tue, 23 Jan 2024 22:38:44 +0800 Subject: [PATCH v3 3/4] mailbox: imx: get RR/TR registers num from Parameter register Message-Id: <20240123-imx-mailbox-v3-3-ed932945e0bf@nxp.com> References: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> In-Reply-To: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> 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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706020734; l=4299; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=SGrBffeqt2EmFannia/RLKGbk1G3zr8UaibaUsZBgP0=; b=Brgp/Gq4wbV6wFyz5OItN1mh7PRxzj91PGDVVJ/MbzF50cNQyV8jHIDW+O9hNpF7JTaFMmvqQ puu6+hyqw5PAzn1GlYbLj1SYSzpoIYOXKUtfOTLCqqJDnX7FB4jpuy5 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0125.apcprd02.prod.outlook.com (2603:1096:4:188::13) 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_|DBAPR04MB7304:EE_ X-MS-Office365-Filtering-Correlation-Id: 2aedb9b6-8e35-4142-6903-08dc1c206d12 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: 6J2dsXWvIIYGl1cG4c6O+ldCPZYY3lXdR0C7rQ2B+T6punRaOisdQfJ7x7bpJnDy3VN7ZfkphSjIiPWZQE3Cw7XX1HFWQ6ZbdodFgBreRfzjJ92tIOXMlr46IjqSGiuYE4MQsyAbNF/Q5vopBRDvt4FqRRkrhcXaAQLK9tgsPuvx5/mzqj+aTR3Ay6+xWHX64G2s6qMT0SRPQ45jBQGgOSGWhJXJijR0YSRbS1ErGrucg1nkeb8Q3MBCKmBSugfXq16lTEgybzfPP7ZUvMd0N/3TeRCbMgTfrmykPSUwmWHwVtUNOCe0s0ZuH0ZgHcWhSu6ocoYqRVwEB5YK2fF7MrrBXLxDp3l5TiIK1csqnmpEKhxylTclgDc/m/1PjA1mCg45UVgC/mvwj1pLtURyfN4ZNDIfAWjl2XbjLg6CA5zjzOqKqaSwrxlDZNEq/DCn+e3C2E6pMZt6ezLv7mE75RGpYQbd4TwoNERQ3o/C4fTJJ+1g7Hzdzy/oDyinp6kZxm0woDulCmXm18VP8lfF+Qk9RkWc0RGqSPa+BD8Kb++ql8N+4D4MDOcXE8PlbznpYGE/PXsUU8+Q6VxpJEQbkwXxO4A1TsM1aVFaCf72/RMwJoiSFY65bBAa9XM9tDpG7Q4Oe+a87kev8Kz4boJRuQ== 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)(376002)(396003)(366004)(346002)(39860400002)(136003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(5660300002)(66946007)(66476007)(66556008)(110136005)(316002)(26005)(6486002)(6512007)(6506007)(6666004)(9686003)(52116002)(478600001)(83380400001)(4326008)(2906002)(36756003)(86362001)(38100700002)(41300700001)(15650500001)(38350700005)(8936002)(8676002)(921011)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?iJao2TZbdHHNF3gSQvmeEYkdY7i9?= =?utf-8?q?ZVpj7f6CbR580fJzeB2/DkNJcHLG4nkpDcgFv6PWOTp0EIITvXGv+HnN0g9QnZhMD?= =?utf-8?q?4f51v1TsBvb0QNNwt+Ak3Z4medZVngRBHwdGgv12hJkdQ56Up9GETDqsN6I36dQGR?= =?utf-8?q?5iyy1+jNto2KCGTGJzrJq2ipUyGgB7ak7rO7P/tHGSIiqv/ZOwFpsUM9VBLarJlLK?= =?utf-8?q?h/SP6C0mqltBoTjALJYZi5ugi1TVqTI6huVHNDybgLrpOOcKUXNyfYThoJTV0yx3V?= =?utf-8?q?CkdhZkt7B/z+mKQEPjxb3DBdAFBRyNq64BoWThgU+irr3DlarOwdAn3XYr2UDIJRh?= =?utf-8?q?33QJcerr2zHVp5Uspc0j4jjkuPq01qQaFQiujfhOEmveTq4PnUAS/sIXvGvghJETx?= =?utf-8?q?oYrFpsgDlQAd7Brjs5wjFNDHp66WEqUPsyF0wRKqRgtn6RONFRbIPbReb5JzTNpIe?= =?utf-8?q?O2ON9/JIIjpSQVi4rVByZp/nl8BWjOy74GHbjUMaNPTqC7pa5e2oIA+h3IP0KFOLG?= =?utf-8?q?WT+qEC49/HegSBKYD1ak9pFY0bBswUbm32kHdK1TSPVmWbS9DLzBvPeOjBgqahzIQ?= =?utf-8?q?ZB4HoeL6ulkGxTTugxyq0NQOYqhMDq+p3YOvHLmXpiL4RGyZ6hz9X6pXa+amd2Ome?= =?utf-8?q?NKnzOtUFY+LZVyfwhLHnijz0BdRBEmzGulQgOQiJr4lSMzECAf6+huQrPObTtWkaE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message-Id: 2aedb9b6-8e35-4142-6903-08dc1c206d12 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 14:34:37.5351 (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: Koplx3x0BL+QiqNrb3t9mvqA2draFY/MG5VmE5Vx57CGwK4FMcmuXScBISBMUUM2GbgMppVK2m7pPgHnV9neWQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_063441_393806_E90D909A X-CRM114-Status: GOOD ( 18.87 ) 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 From: Peng Fan i.MX8ULP, i.MX93 MU has a Parameter register encoded as below: BIT: 15 --- 8 | 7 --- 0 RR_NUM TR_NUM So to make driver easy to support more variants, get the RR/TR registers number from Parameter register. The patch only adds support the specific MU, such as ELE MU. For generic MU, not add support for number larger than 4. Signed-off-by: Peng Fan --- drivers/mailbox/imx-mailbox.c | 46 ++++++++++++++++++++++++++++++++----------- 1 file changed, 35 insertions(+), 11 deletions(-) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index dced4614065f..9e89f773d2f9 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -29,7 +29,9 @@ #define IMX_MU_S4_CHANS 2 #define IMX_MU_CHAN_NAME_SIZE 20 -#define IMX_MU_NUM_RR 4 +#define IMX_MU_V2_PAR_OFF 0x4 +#define IMX_MU_V2_TR_MASK GENMASK(7, 0) +#define IMX_MU_V2_RR_MASK GENMASK(15, 8) #define IMX_MU_SECO_TX_TOUT (msecs_to_jiffies(3000)) #define IMX_MU_SECO_RX_TOUT (msecs_to_jiffies(3000)) @@ -93,10 +95,11 @@ struct imx_mu_priv { struct clk *clk; int irq[IMX_MU_CHANS]; bool suspend; - - u32 xcr[IMX_MU_xCR_MAX]; - bool side_b; + + u32 xcr[IMX_MU_xCR_MAX]; + u32 num_tr; + u32 num_rr; }; enum imx_mu_type { @@ -264,18 +267,17 @@ static int imx_mu_generic_rxdb(struct imx_mu_priv *priv, static int imx_mu_specific_tx(struct imx_mu_priv *priv, struct imx_mu_con_priv *cp, void *data) { u32 *arg = data; + u32 num_tr = priv->num_tr; int i, ret; u32 xsr; - u32 size, max_size, num_tr; + u32 size, max_size; if (priv->dcfg->type & IMX_MU_V2_S4) { size = ((struct imx_s4_rpc_msg_max *)data)->hdr.size; max_size = sizeof(struct imx_s4_rpc_msg_max); - num_tr = 8; } else { size = ((struct imx_sc_rpc_msg_max *)data)->hdr.size; max_size = sizeof(struct imx_sc_rpc_msg_max); - num_tr = 4; } switch (cp->type) { @@ -324,6 +326,7 @@ static int imx_mu_specific_rx(struct imx_mu_priv *priv, struct imx_mu_con_priv * int i, ret; u32 xsr; u32 size, max_size; + u32 num_rr = priv->num_rr; data = (u32 *)priv->msg; @@ -345,13 +348,13 @@ static int imx_mu_specific_rx(struct imx_mu_priv *priv, struct imx_mu_con_priv * for (i = 1; i < size; i++) { ret = readl_poll_timeout(priv->base + priv->dcfg->xSR[IMX_MU_RSR], xsr, - xsr & IMX_MU_xSR_RFn(priv->dcfg->type, i % 4), 0, + xsr & IMX_MU_xSR_RFn(priv->dcfg->type, i % num_rr), 0, 5 * USEC_PER_SEC); if (ret) { dev_err(priv->dev, "timeout read idx %d\n", i); return ret; } - *data++ = imx_mu_read(priv, priv->dcfg->xRR + (i % 4) * 4); + *data++ = imx_mu_read(priv, priv->dcfg->xRR + (i % num_rr) * 4); } imx_mu_xcr_rmw(priv, IMX_MU_RCR, IMX_MU_xCR_RIEn(priv->dcfg->type, 0), 0); @@ -737,11 +740,30 @@ static struct mbox_chan *imx_mu_seco_xlate(struct mbox_controller *mbox, return imx_mu_xlate(mbox, sp); } +static void imx_mu_get_tr_rr(struct imx_mu_priv *priv) +{ + u32 val; + + if (priv->dcfg->type & IMX_MU_V2) { + val = imx_mu_read(priv, IMX_MU_V2_PAR_OFF); + priv->num_tr = FIELD_GET(IMX_MU_V2_TR_MASK, val); + priv->num_rr = FIELD_GET(IMX_MU_V2_RR_MASK, val); + } else { + priv->num_tr = 4; + priv->num_rr = 4; + } +} + static int imx_mu_init_generic(struct imx_mu_priv *priv) { unsigned int i; unsigned int val; + if (priv->num_rr > 4 || priv->num_tr > 4) { + WARN_ONCE(true, "%s not support TR/RR larger than 4\n", __func__); + return -EOPNOTSUPP; + } + for (i = 0; i < IMX_MU_CHANS; i++) { struct imx_mu_con_priv *cp = &priv->con_priv[i]; @@ -768,8 +790,8 @@ static int imx_mu_init_generic(struct imx_mu_priv *priv) imx_mu_write(priv, val, priv->dcfg->xSR[IMX_MU_GSR]); /* Clear any pending RSR */ - for (i = 0; i < IMX_MU_NUM_RR; i++) - imx_mu_read(priv, priv->dcfg->xRR + (i % 4) * 4); + for (i = 0; i < priv->num_rr; i++) + imx_mu_read(priv, priv->dcfg->xRR + i * 4); return 0; } @@ -874,6 +896,8 @@ static int imx_mu_probe(struct platform_device *pdev) return ret; } + imx_mu_get_tr_rr(priv); + priv->side_b = of_property_read_bool(np, "fsl,mu-side-b"); ret = priv->dcfg->init(priv); From patchwork Tue Jan 23 14:38:45 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: 13527514 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 E1D2CC47258 for ; Tue, 23 Jan 2024 14:35:21 +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:In-Reply-To: References:Message-Id:Subject:Date:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=U/i/Lq4tVhIlVO8iOmXk6ypXTVrY19KNBzVAkLMob7w=; b=3hp3gGhzqngZmnV+4xSYtjOI6S 4xaSLYIiAet+MEtaZNZgwO/c74MhvEC245cMK0OoCtlT7jYXv9zXFO6YjAJp8GgWG+AgNkVyybSmi ltxhZufp1iapsaSm6DFq0jxZXeI6l4lllALsOLDz5G+sQspG2Fdy20vlnCItNSvu/+Lg25WSGx4DB t/VPPNdzigv/n7UG/X48Q6c7hFAcp9jjrA9CfvHPbKbOJJrcJ71Xyg2gy7OX/DjUjfwnZ7S4Xlh5+ Z7aksOjSuy7woLaWFDDXlGNhdWNe7nOMWarwpuwSU5bAV8Fw/qu4ae15e7PVyTt2XwEbdJW1ajIj3 tozvihHQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSHre-00Gpaj-0N; Tue, 23 Jan 2024 14:34:58 +0000 Received: from mail-vi1eur04on061b.outbound.protection.outlook.com ([2a01:111:f400:fe0e::61b] helo=EUR04-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSHrW-00GpVa-1C for linux-arm-kernel@lists.infradead.org; Tue, 23 Jan 2024 14:34:51 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=RA1exWQImthHdxV1CqUcpb/cN0QecEYP/kwTfgeEaeAMSpwx4fhtGcbN3ToK1CQZkl8UltwdupOSbq21n4QDaIFAHk8Gec4f+LPitZm22s7bWMB7cwExqKgcdg+XLOqopwUqV9/eYrWJzP+oGhINNs5vwXU2s8H4TU8HhrnUpyjPYe7lrKj6e/O+byrDeJs6MPXtMGwGpP6gfmUVz//UZSSHbJantjy7v2KadYR2dP3r6yfkBcVaXZfs0522BFLuQV8oV7tFxwAAR60hFPIW2piUYTMdn8GpzVYBBUuJByYl2X8p0QJ1kq1MUDPhwqx4UBEzmNsx5tORAa26hd54rA== 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=E4/oDx+cC2vKsvoZaiTqgZpD/H+Cdwy5IDIRZoQ1eUY=; b=Q4Zr8VLlbuaN07YW78cGvDGZaaESJdZuW8nnv194+n/C8drv3CrILTrXlaatBVbNhjNzUpWYTsOArcLfpgGEeaQm0fYepa84WgBtp0rsSVVWtSi4/hzRml6K12hwkYmSP8i87bmreyS2ip2Tr641FIFzkER5oJGp2G7/ET1GjxOkTL7ACst8nC439FTHQrCdz/Qr359LhG8wo+aBjIhGDOU5F6+qasIKyj0TlvMcRRPYlhw5l65jb+41rRauvUVYg5WH1KWkBYZR75GcbuVeXTyRAd5EZVfdBxkndjoySjx3QaS/laZxAmCiHQKd2g3m1ATYRU4KY3hdPGSSZCqnfw== 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=E4/oDx+cC2vKsvoZaiTqgZpD/H+Cdwy5IDIRZoQ1eUY=; b=GCljrsWvhtPMQP3tPR4KQ39DvZWK5rp0nFDYSDp8jEY/cHpO23tYRKb8mYaqFUV0KfI1ihLhiHPYhJ7E3hIFd1nsvxbvMu4gisEt4JUJZFmedQhjxpVRYqD8VB6hVK+lYLSSKjDu63v8lDL/hAgYOS3FYA/tgFKTPK+QVBIttnU= 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 DBAPR04MB7304.eurprd04.prod.outlook.com (2603:10a6:10:1ab::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.36; Tue, 23 Jan 2024 14:34:41 +0000 Received: from DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6]) by DU0PR04MB9417.eurprd04.prod.outlook.com ([fe80::c499:8cef:9bb1:ced6%3]) with mapi id 15.20.7202.031; Tue, 23 Jan 2024 14:34:41 +0000 From: "Peng Fan (OSS)" Date: Tue, 23 Jan 2024 22:38:45 +0800 Subject: [PATCH v3 4/4] mailbox: imx: support i.MX95 ELE/V2X MU Message-Id: <20240123-imx-mailbox-v3-4-ed932945e0bf@nxp.com> References: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> In-Reply-To: <20240123-imx-mailbox-v3-0-ed932945e0bf@nxp.com> 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 X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706020734; l=1973; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lkPMpPy6UalcvetyTqhwBLnqDq8ONTaWTu9sur2v8yE=; b=iXhc8qJsSBjYUXXxziD+NU7sIZe5ZiIbff886vIYen1jwF7owmo8kpCizkGGNgWPMoPp8SNMX tDbmnFbFeV9CAg3VrPPkw/Ba1rvz0GhjsI4guZFUStZQqZEP6eolTtd X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR02CA0125.apcprd02.prod.outlook.com (2603:1096:4:188::13) 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_|DBAPR04MB7304:EE_ X-MS-Office365-Filtering-Correlation-Id: 1ab2c8db-fb4e-4dc5-9af3-08dc1c206f95 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: xqmwJpny/S/mR5Ch2G34PtprpVHuUucNJE1L9L/umg02bU8ecF9kSlm8QWFU2mczNudno3MqNItAd2PfgovGHMBccV7Uav3R//vzy8MvizSGos64//tHbkkR9h1Z5qMVp0Bd4t2SMaSb7vwxkAxhBUvIqFFDCRqYEhVWEoIzmAC4lsX3PxGvmSX3FK6l0pN41HyBhsuMcDzYYwHCZoJXU9KTmmx2S4tqC+0A4g2CJd7T2tflzKARGoi9XcsrLCDccQNwj4owXRJmeSY78dQVVV6HE+VVGasEjdrSG48shZM99nbONG4hNVkK4cm4bRqtq12XtHvONHX4NQPaftwMNUJ3IX23+d9V9wWi8NrHfI1NeIf/N9R1oukcENr2IlpH/TjBn+QBRewbhQLzXiS6Zz17Ga6RYb2frdfjxiElJZ19WvN7NX6HoO7n9456iQ6ofRv9h+/Wi1M+Vp+TbunXivLYJM8NScwASZrBiPziWpa1yBQipuoZyHj/EYubSEJIjQm9d996+MF3l/GOU2SsdfVWiOdhdZcAr5v1qkpYwfTc79eLF9MWCxMZLb9tAAeEtfK7DOz2wbT0CdfUqdBjCYviwnUikSst/u/YJlnVsxHRhQPFMn4TApSGZblBVk0JT94u944CEliMOw/AtGxhPg== 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)(376002)(396003)(366004)(346002)(39860400002)(136003)(230922051799003)(1800799012)(64100799003)(186009)(451199024)(5660300002)(66946007)(66476007)(66556008)(110136005)(316002)(26005)(6486002)(6512007)(6506007)(9686003)(52116002)(478600001)(83380400001)(4326008)(2906002)(36756003)(86362001)(38100700002)(41300700001)(15650500001)(38350700005)(8936002)(8676002)(921011)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?F8Z5s+VODhoHwpT0gL0PB/mu9LAi?= =?utf-8?q?WBepgODiRuvGr4gqqZCTZHzinAaNSfrM1MrqRrT6OKVarHeyVU90vd1ILUyMOhFor?= =?utf-8?q?QmsMGP3WUj/KHNEKhiG13gMxdr4BWb6qUIoCyrhTxhCvgC/fAiugj3qRkThrt/RWZ?= =?utf-8?q?+z7V0F4Tc5zamTBq47SEfNkXuk0W6BEU3i6cGubgE2bHGBwhHDiyaL+Xygt90HVV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6X?= =?utf-8?q?YalpRILcL3koa4OMD/bR3VIlwBYO4JXB+b5uBnJB5GnkSqzj1h5lFeofk/AxjQf2Z?= =?utf-8?q?mH6m1dz5Dk5feZONd4tyzY49eWM4Q/lnCEm7W+kD6MLrjKwnCkkH5jMieQ4VTDDP9?= =?utf-8?q?FBn3snr1bdPC+lkbjaiXV2OIn79oGeDtCtRi/7r3NUiJLGUGldZ+KG6+eVhTVLlCb?= =?utf-8?q?dS4zLj17bY3tBZOOW3/4G0wTd4p6yccemMwQO5hS9E0C8s1B0PaFlTAYiBzv/Fr1W?= =?utf-8?q?PujU8j5mRYJTWKt/T6hoS8aij8zHzimxqo6YxMsAl4E8IlslQIRxaXyh+h6Rb6sSu?= =?utf-8?q?pQaf2UNxCb7lgX0sQZYtRkK8eSf9vjOKdmS6ZRMh1aJRYmva9L0Uvoi2bjBWwEDh4?= =?utf-8?q?2AoFqPjSwqfeJscBSSRUn1JFSh9FFkDznTkh72wIxByKqz5vwKdennzY4rxwZITfh?= =?utf-8?q?wvHFVHm7DuZN?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 1ab2c8db-fb4e-4dc5-9af3-08dc1c206f95 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 23 Jan 2024 14:34:41.7625 (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: Fqxn8DCdYw5+sZdSnbPci0Zmky1cIkYVDWr22F7IqLASHz7wW3LV6qACIrR3AOhYVmaCwI9Opggg38kGZvtjXw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DBAPR04MB7304 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240123_063450_410966_4DA35131 X-CRM114-Status: GOOD ( 14.34 ) 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 From: Peng Fan Add i.MX95 ELE/V2X MU support, its register layout is same as i.MX8ULP, but the Parameter registers would show different TR/RR. Since the driver already supports get TR/RR from Parameter registers, not hardcoding the number, this patch just add the compatible entry to reuse i.MX8ULP S4 cfg data. To use the internal SRAM, need populate its sub-nodes. Signed-off-by: Peng Fan --- drivers/mailbox/imx-mailbox.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 9e89f773d2f9..fff891d40f2f 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -4,6 +4,7 @@ * Copyright 2022 NXP, Peng Fan */ +#include #include #include #include @@ -15,6 +16,7 @@ #include #include #include +#include #include #include #include @@ -919,6 +921,8 @@ static int imx_mu_probe(struct platform_device *pdev) if (ret) goto disable_clk; + of_platform_populate(dev->of_node, NULL, NULL, dev); + pm_runtime_enable(dev); ret = pm_runtime_resume_and_get(dev); @@ -1031,6 +1035,8 @@ static const struct of_device_id imx_mu_dt_ids[] = { { .compatible = "fsl,imx8ulp-mu", .data = &imx_mu_cfg_imx8ulp }, { .compatible = "fsl,imx8ulp-mu-s4", .data = &imx_mu_cfg_imx8ulp_s4 }, { .compatible = "fsl,imx93-mu-s4", .data = &imx_mu_cfg_imx93_s4 }, + { .compatible = "fsl,imx95-mu-ele", .data = &imx_mu_cfg_imx8ulp_s4 }, + { .compatible = "fsl,imx95-mu-v2x", .data = &imx_mu_cfg_imx8ulp_s4 }, { .compatible = "fsl,imx8-mu-scu", .data = &imx_mu_cfg_imx8_scu }, { .compatible = "fsl,imx8-mu-seco", .data = &imx_mu_cfg_imx8_seco }, { },