From patchwork Wed Jan 31 23:25:37 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: 13540471 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 A7C72C47DB3 for ; Wed, 31 Jan 2024 23:22:03 +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=ICrQr0BR3NZrnYKQ8XIInWlrhfWOklL69DdZtKhYUkE=; b=T6DytMsL4MVY9me5ylUNIW/k1b trxoSxt54MOg5QR/oU5I06TlUOT2gIKBYLjXO7JrRaDgG0HfpGQ/niGUd96icHySP7TL6Hp7XYGS1 Ws5MoPdXRb31Gw5ZAba6GehqtYOi/AnGeIV2tW3BuV3xf2/HOaClKz8fNPW11prcPRA9HSKKsIQnV Ajbzu2ZFXjB+D/FkyjCSGfzPTsQVKSAqUOs3wIvzoCR4qFdyERwMa9ogIO9irtWou76Oa+9Z2dD9C NJqVii6exEW3R3qN0Wi979uaQwTOWLiU9X2ITM22d8zdC42CNEQDOIK9m2tUHiv+n3wjCGlFvhIhz Y4XPSOlA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtw-00000005sYB-20yu; Wed, 31 Jan 2024 23:21:52 +0000 Received: from mail-db8eur05on20623.outbound.protection.outlook.com ([2a01:111:f400:7e1a::623] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtk-00000005sQl-2UJ4 for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 23:21:41 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y7I/S7iIr+SfLhoJ+iz5p32jJbMbJ9+MbWKtrZlnpC09SEEsUTPHqbDzYAcRJrhxIv8VxzqixSk5OKwCIUotpP4WHTE38jhp3xmU38wj9RsZ86sEScTIsJQYwLcIU71lfNpt7Mn5ej2nz2rVt3cTYFv89BEnVHRJynT8YZJ3n2UApKUP8Jj6nhQVRsnuYVvepVvVQeUNOJuyoNUTPquOWxOp7fLp3d2y9y1hvX0Jo+Uqqmz4R/PNJqWjYgLMTI5oVB41VZA4E40RMw4CO0HHdMWKRDMjaVVEfWvtD7P8jNWuBFsMXEgwuw9EcVpsKx8UcXEwmlejy+FjKTpTke71JA== 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=7KvOi/dUrQ1BiOs5m/DkXp9FaTqjukDIJmIW7LA79+g=; b=Cr9fXZHI20tRRbycD3OKkfxQXGFUh+ArpxTEIehxlJ9ZJQrakO40acLcpV7ASGiGo37JnJAZXYvsEEe685Z9pgzUvg0SQMWvpBCHM+TN22S9IzzKik9c6i88ZExm++1WDjGpNLK6dG0DiWdxIuiM2aRkmDH9VTCkZU/44mWcB3C7FzzjhBwRW5KYH6mqxPOJW1/4/EoBl2qRZVBdn5P7jRD6gUKo6VTBdCInLSLOF4VPaGCWPHADjjwuZoXTx9PS95h1zKz9U3qiSMnaDJ5vIwanlVDUyhUXtNH7TyMUy5CQdIUmVCI8JuF4l0R4YRtHHJ+48/AHfrRbWZiSE6NeiQ== 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=7KvOi/dUrQ1BiOs5m/DkXp9FaTqjukDIJmIW7LA79+g=; b=a+VYs2vAWcpzsxofriEgt0nDp7o2l2rQMhDF2/XCMfu0BE6X4bDZGOxnJacmnrNlkn4NSaYCe845QpWrT7EonOGor0FCLyKlnD7z2zUvWHFH17AyTtaAqYe7/UmblVbXZ7BgqIvQw7zxFIrirzpSIIexJ+fju86d5GyKRO2+Czo= 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 AM8PR04MB7396.eurprd04.prod.outlook.com (2603:10a6:20b:1da::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 23:21: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.7249.023; Wed, 31 Jan 2024 23:21:33 +0000 From: "Peng Fan (OSS)" Date: Thu, 01 Feb 2024 07:25:37 +0800 Subject: [PATCH v6 1/4] dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible Message-Id: <20240201-imx-mailbox-v6-1-76f4f35b403e@nxp.com> References: <20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com> In-Reply-To: <20240201-imx-mailbox-v6-0-76f4f35b403e@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 , Conor Dooley X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1706743555; l=2741; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=C56rjccJP8TyE3Eb4IvcogQQf1ZEIotnAVpBDSA+e98=; b=KLcThEvzo6Xy4sMKRqGkO7miDveme4FdkV8yn3+zdMIpf+UBI92n3tuPIsbCHhuge1aL9+tyF sxf9QNjK0bTAeq+mUwLanv+FnEZJbXtzwVGauq5RfyPnWi7XiSdNn4F X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) 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_|AM8PR04MB7396:EE_ X-MS-Office365-Filtering-Correlation-Id: 7691dbde-9938-4240-aab7-08dc22b35ca2 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: joId/7+XBwTv0xAgR1Lwry10FgQjB7VvLbKJDZCunJiDlJX8ipm7u3JONar2n0Jfp0HwVSPnsi54bRbSagNMAE9Hq+ENMT3/tFMCgxlv2jGLKySl7rdeYaKQov31CUf9mC/Pe2Y5jbSdYAUUqC160a9eDtwlKs5afo9zQe7JNUZtNmJ3flKSW4EQPnCe0Ut/C7bYxO2q/c7hBIZEFLLwSV7VjsNL9thkr27mDsPsKBAvRKOtUAyF61Uo7KhFUZK82rtHHPbTjYP59VdhcPwPUMD9rmN+SmxydRsgxvzinQRCRhp/u9+CZusbrp4GGn9ItpqHzt+yZ4hTezpcqvc/kBcNgQvO+6W/tGKZ/Nl3CIW0ve+Ntf3mq60r07CZpeUdIl58gdIQ/ZNN1kO+pW2HSQS8gLzTxAtOf5ctxjbZZCnLqWT/mMEkXBsDbfIZNyglJ+r0Rn4lRSvtCjYqqzIggNpp9R09FWN7+m7OURiXWgRG2ot+G/eLApk3aNADZaO9Zi9VpDgQjuKYZX45/s1h1yd8BcvRYBUQGBjYsr9PmpxNQXOPCcdf6lScosxI9ddQjEZP39FsRNufQQRkcB/CiBvsEJng1TIS1qXFz3cqJWKwQwj9ONwkmrS8oCvE8asJSw4EOOifIBMHxDwvjaboA3HtLv8PX+uj/vnnqSnlEDg= 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)(366004)(376002)(39860400002)(136003)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(921011)(26005)(41300700001)(54906003)(316002)(38350700005)(66556008)(478600001)(36756003)(6512007)(9686003)(6506007)(83380400001)(52116002)(6486002)(66476007)(38100700002)(66946007)(5660300002)(2906002)(8936002)(15650500001)(86362001)(8676002)(110136005)(4326008)(7416002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?dnr2nnu0XoO3cx7+5yKH3qhJ/iVn?= =?utf-8?q?VGG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M3ZVCujs3gbloWF43KyZz0AwjwMoR8jVDebO7bNhvHllrmf?= =?utf-8?q?S592UM/CBaUsJHhoN0ganvMmy2ygxXVUuelxJOUoR0TAqHfXIdT4n5cEFsmj8MPL2?= =?utf-8?q?ACit0/B9X4D1ct4rDFMZGse5jHsZjFdLcfLqiIKqPCjcCKE9rnPgXBOuIC/y9Abi5?= =?utf-8?q?L+GANVN5wSmmR8Rc0t7gNtWtCy5qGb97DnfUBxD4rp1LMM2RVjnk/VEQXz9ZfRJ4Y?= =?utf-8?q?sMc3I94bSdtihShh5ioCeJPGcr6pq4jIfFo8hNwQ+gZRm3Sw9/VsUYHN3I8K2eycE?= =?utf-8?q?nTRubqAHQUvhK8uYR/YNUS2Oimne8D6gDPuphuMNoQdr/ZlYreM4Dqc7pfr09hKrQ?= =?utf-8?q?6bng9AcaaZyxEwn5RbaT4mAZKH7KBL/T0dlZvP61DdTmM745Jmnn1BXPifSeDNHKX?= =?utf-8?q?Zad8WrLpPlg8dqA3sAimVgD7AZTYdIZbpQbu7v3TeiIcceoj/qg4NZX8IpLFEJ2cW?= =?utf-8?q?zGm9LSE7OfFqRVS4UK0gOSf9WkqcNGyAJAQRQlKhz5UcvGm1AG9Cq60yAgjbRPiPz?= =?utf-8?q?Dq7JBeGSXsvWtTRHgKJAPIzTltW0oRbFGBymw8YvjTiGICxRSQBVeunMeLwRwM8Xt?= =?utf-8?q?1vMRIa/pUcm7?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 7691dbde-9938-4240-aab7-08dc22b35ca2 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 23:21:33.0835 (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: 913uIOHxg4pQbhW2gEHbDzGTR81ygnPLVQub/KhuhkY5jpISMW415UQOfcunhMKLfjuRavQHoIQUXBvu2N2Hig== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7396 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_152140_680611_131A94B2 X-CRM114-Status: UNSURE ( 9.53 ) 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 the MUs in AONMIX has internal RAMs for SCMI shared buffer usage. Reviewed-by: Conor Dooley Signed-off-by: Peng Fan --- .../devicetree/bindings/mailbox/fsl,mu.yaml | 58 +++++++++++++++++++++- 1 file changed, 57 insertions(+), 1 deletion(-) diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml index 12e7a7d536a3..00631afcd51d 100644 --- a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml +++ b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml @@ -29,8 +29,11 @@ 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 + - const: fsl,imx95-mu-ele + - const: fsl,imx95-mu-v2x - items: - const: fsl,imx93-mu - const: fsl,imx8ulp-mu @@ -95,6 +98,19 @@ properties: power-domains: maxItems: 1 + ranges: true + + '#address-cells': + const: 1 + + '#size-cells': + const: 1 + +patternProperties: + "^sram@[a-f0-9]+": + $ref: /schemas/sram/sram.yaml# + unevaluatedProperties: false + required: - compatible - reg @@ -122,6 +138,15 @@ allOf: required: - interrupt-names + - if: + not: + properties: + compatible: + const: fsl,imx95-mu + then: + patternProperties: + "^sram@[a-f0-9]+": false + additionalProperties: false examples: @@ -134,3 +159,34 @@ examples: interrupts = ; #mbox-cells = <2>; }; + + - | + #include + + mailbox@445b0000 { + compatible = "fsl,imx95-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-sram-section@0 { + compatible = "arm,scmi-shmem"; + reg = <0x0 0x80>; + }; + + scmi-sram-section@80 { + compatible = "arm,scmi-shmem"; + reg = <0x80 0x80>; + }; + }; + }; From patchwork Wed Jan 31 23:25:38 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: 13540470 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 436FDC47258 for ; Wed, 31 Jan 2024 23:22:02 +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=QcWDNAxwnYYOEbbAA3c+5C+Ilxvfz+Y6fp8A/i0VXDU=; b=kMtaUv4tpC9GcucH4uC+oU8s7j cSxOYaZJQvolHy1p8H44kJ2TvrqvxHCzXOn3fc6MVleI+/IaW8WfhV5eGcJBjc7JyOsyGNh1nWCLH 6vot2mSd9lelrf+Z9+yr8nkN+YXrCFqw1wkXl6zzaB6z+1MaZUJBZUp/Ru6n51VMDBC3MGmZ0vZCG ng8iuYnnDvOoUxiB5keb0hu+18ACEsnSJXxfk/MGpeYRRB0AKnTcz8fbBjcz6Eys6q63rxm8lgE9r amP2dn5Y4qjuBzt+70BNxl3bCO9mn6A2nd+SQit27EUXFhv3A2thwcpNxXknWIlmUizbiwIjI4ELO 40nLtaxw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtx-00000005sYZ-0oah; Wed, 31 Jan 2024 23:21:53 +0000 Received: from mail-db8eur05on20623.outbound.protection.outlook.com ([2a01:111:f400:7e1a::623] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtm-00000005sQl-0svM for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 23:21:43 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Ytr8ofe3ts12bQiU7ebSXtHASkH9NSNZzGEY5ilCgXsIzQ6Mnpu15xWpr2EgAbxCyaCOEtDwGb9IdLHgIOOSaNPvakG5fb7UVmoNt430J+N+J0HT35oNtVZ9qaSU/JFp4hAgJCFg2qmVmtq7vHrPYY1S++oebt4/CAj3LYeKBl9Dcs4nQqKTjHejIVFYO5foZ0ArBRrQWqzjpXI/pyrdteLn/mbpR2G5OmmCscdzuk44jBPHobRc6kgvkvOj3Wli7H3cGxAPuOISAUMF91t8sRBqsPTyNxUNohaLzsyY9/89XFMsYIEYhLNMjMzCRq5Zjerhy3xcx7s06z685qTLxA== 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=yroYNvtM+ftxkBYnpAH09lTiB04eMcTiVCGoXVH7uV4=; b=KnJzDgIsUkS1eqGzn7yXliDTKYM14Q/8lkTPstjCyYAejspJOKdzaW3CVpE2CYW+/OJ2GcneEhqT4iWt6In9fidpquQGfD71XzgEtxZNuTSfTnEHi9BT4w3zWU8iiz6r8V44VQaHlKZ7bkC1f8psamLWdJdGV/xkdioPN0I0+MwdLSmTUncHQ8sXHPfxDbCogku0xwsVW7rd6LcMVcvmtKu/UqL54IYBvaR9kA9DdVxVV4wWKbSNDfK2yVxz019/DFp3vX28c2CS9IXaB2DdZnzl300PL5ZIhbv/Uvlm3P3w/zB+qARnS679dg+Aa47SiYlFdsaIGISPkDUA0a5YbQ== 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=yroYNvtM+ftxkBYnpAH09lTiB04eMcTiVCGoXVH7uV4=; b=QVuTRRe4NWgUwBdI7ZquVmzmA3GIiUoq0HPftqtp2lzC82/f5uJtwMU+VJmWoJjpU6u4z2/TOpe1iLglVKW77H30tUqeY1BWOafIX+pm5R3rn1LPGD/yYuJlCi5ItLLg2xXSZuGQC33XdniNnE/st0hruCmWYAMNPTtxAsfDlKY= 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 AM8PR04MB7396.eurprd04.prod.outlook.com (2603:10a6:20b:1da::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 23:21: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.7249.023; Wed, 31 Jan 2024 23:21:37 +0000 From: "Peng Fan (OSS)" Date: Thu, 01 Feb 2024 07:25:38 +0800 Subject: [PATCH v6 2/4] mailbox: imx: support return value of init Message-Id: <20240201-imx-mailbox-v6-2-76f4f35b403e@nxp.com> References: <20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com> In-Reply-To: <20240201-imx-mailbox-v6-0-76f4f35b403e@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=1706743555; l=3395; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=S0DKuiQSDcYtu53JqBC1+gV1zoHcWj4DjQyGEWhlcnk=; b=W5a6ZzLKxqmgK4UssaJWiqZtbRVbEUDCD8H7KWbWha1f+NbQ5XEjWrNPiUMtG+qlAKot4FgiU avdfd5odp4cDwUC8V7lCYB6bgabets7kNASm2B93Fs9hzB5Jd+BaD1e X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) 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_|AM8PR04MB7396:EE_ X-MS-Office365-Filtering-Correlation-Id: a483c66f-1bce-488d-3378-08dc22b35f39 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: 7vDJrZ/G+7VsuhnyRbGzQpIFe9vxOWIzAb2wQksiltLvl6UEOAqbF9lYFGbGAmnlA0/e8hMK5E/FhWcF/UrkullK0leGDmOVnQI3/bFRTcoMOZf96c0UBjczjLCLz/lU3Ccl56gHVeTXknECKo4yndZdsG0i/LNe66PQYjwV4teCADRli7F2VMNVcOr91b+Hkl08/akymob9GmsG36nVy47+csGSHt5H3BxvcId367P2xt/gYHk/mlBiOuJcUvGLBbn1FFHjNSL+tIer/ld6ZN5HCEnzyrImDApViSDXXK4YQsUwNdKLFF2II6gMsoacXyWdK76UldmhATaQDP+IBvr45Ztr6rtNG47CM6cytsKLG89rqYsEyF2Z9OfclbumUfRN2j0JEdznTQDDksE+Vxv9jh7Kl45Avu/dqPk4g4Fl/ZE6AA42eF+uYoUdI6vQwoBz8C8NcGSEQzhQH+NbAUJPUt0GcBDPRnfmQ3mVN3iqLSJS+MpJ857GS1Rq9p2y24VATaJFi5Q9sNyvTanTAcMiX7yKb0rj3GtA6OQB+sAgWSt48I+cSzjYONquHNYYe0qW3mbpWr7CX5rau4q6JGMH03QMIvC7ygrfuz7PJCSnHqj2ExApL9xMdUQq3sCW 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)(366004)(376002)(39860400002)(136003)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(921011)(26005)(41300700001)(316002)(38350700005)(66556008)(478600001)(36756003)(6512007)(9686003)(6506007)(83380400001)(52116002)(6486002)(66476007)(38100700002)(66946007)(5660300002)(2906002)(8936002)(15650500001)(86362001)(8676002)(110136005)(4326008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?S8phy3uJRDNFfpuzLfQ9X4+cYyv5?= =?utf-8?q?+kVBUbH+QPv+CasEGWXvPls2+DXGstwCxIONKxsKuxQD5ss+4LB6Sf2Jmezsi+386?= =?utf-8?q?3JmbevE5VJJpcPr01fnKvzbLSQQ+36CfyAfIe1agwr5Ty6zRV086l7PZvxfviOPKu?= =?utf-8?q?gxstzdRByX4r2AVs6AWlCEu/vyZpf12e5fpR5CB62dXYgmx3AuLBp/9ASbAJR/d91?= =?utf-8?q?PDkb/ikQZBkBmLNimMFEfuUpMG5XpXHeVPuojaKzyGDXoIZCN/Kck6Bz942RY2y3H?= =?utf-8?q?D0GNC+UAso+AEgKklbYWqR14LVGROQckiSQtGSY+wAHWAtc60AkF6hnfIQNWzLaeK?= =?utf-8?q?tWxLGQrWJOeSGAwt4CrmJkyvsfjin8ZgMgzNNvtxLnSA9t7Om4n+zqxehJ6X8YgXk?= =?utf-8?q?NmtsggNck1kzcT9PrtJbgUb3z+Nfr3ljW30kbSLRJrbzRhrYDkecdnW2z22OCQe9W?= =?utf-8?q?f4EFOKMJkf9hRZ8i6BVN6mGEe0qJrwwTcj9rd6DO6LDjJj50bIuhGCxCoeFYTbB55?= =?utf-8?q?iLFwT9WC/GcLB+OCfQWT5Yk8Fcvt2myUnKfcWCnfm2HrbNqPFdhTOkVu4U6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utf-8?q?0gTnoYW8Hu5pQnuENS96CJCeXqTXoaZ34PzEKw3mKiGhg2UHfqyoroUYNZv9jlDkq?= =?utf-8?q?EELjw3DgH4GC?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: a483c66f-1bce-488d-3378-08dc22b35f39 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 23:21:37.3568 (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: F2fzl64/L6/nebCaXxcNwMfobmB9uQOh5FUxkToluiGlCJdsttgaeiU3D/cOZnnmXtVqqy6g0JE4MjHuQIQq4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7396 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_152142_316792_84C8C7C9 X-CRM114-Status: GOOD ( 15.24 ) 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. Reviewed-by: Sascha Hauer 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 Wed Jan 31 23:25:39 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: 13540472 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 C28B0C47DB3 for ; Wed, 31 Jan 2024 23:22:05 +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=ogOjvFG3w5tO6nfreBmxhbGQATBOqoSX8fcu14Dk9GA=; b=NxS49BWrylha3/FJ80roXm3qFN SZzflTrFOxY0YaTomH774FNUL1deeZlwHeLDi+Nq/vxV5NMRakSgoE06xJePLwLYKM+NKEC6IEk/u d/U+KkimXDG4c2+YSzqFWwf/uvbiXNqNnyWz7hry3w4P5c4pRtqi6qPFTqO3tFasEvnwSWpuZei5C muXUjHy5+ADaHZbolouohRE/clTb+T4FUt6raXGPvhV7EOMESFRJWJ2d6MG13enljGBY9CpGpHi6L U0fM6YXW1SznagAXY8+UfVSJr5jlwj2nEsJvxjtwND2ZoqTDUvF/zuO1IqAR9lHJSI1Lpgd1e0EHK XbkrXdYA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJty-00000005sZL-0MEr; Wed, 31 Jan 2024 23:21:54 +0000 Received: from mail-db8eur05on20623.outbound.protection.outlook.com ([2a01:111:f400:7e1a::623] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtn-00000005sQl-3P0r for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 23:21:45 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=j3WwI53FJEmRfv4vREC2l7gEBaGFA6H7xrCffGpMlTjdKmVSJPyFpvOW/ufhFitnMLonR026JfrlOEk/m1KmF7HWe5xuwROVI9CnufeYI7fgzXlKRH9cVjU7SNqqrOT+RV0Epxkc3kdGr9mk6gYS5+uxQLAuc9y339q0otEs71X9qBj47aLg02+VTG63MsBa6ojKkoCkLCUx8EVGdzqqRiKPIgEpchmy/E/2bp3zcDBZ/Rbu+9AP60OYEUHNCSU/b9E9uVJkP3zpN0KuJhQXMzy1u7kKX/Hc1exnaqjLiNgbHee/1Q7nUXu7yb5O0llE/cZECm/dytnlVKc104JyxA== 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=XcXrRKBabQlOTHo50b7cbdxKf1Mnfm+dGC/o8m8tAJ8=; b=Tvkqr7kbmYSv97sCnkZhstFYWRIAFsx6QFR4t5/tuyRgLsDXTNruQwWRg6n6mL1bA9m3+SE2LQL8DGce0CICiWsLFOhKF1XgROxiv/IYedLQNIQTEu4OSv68fLbVOen68SEfj4hI97OT8+ng38GAUfGvmzHGogDsaHeEGOJ8AXnXn4uV5bZewO+HfCGNdWdcrglG+iVUFSf5o/+xtB8QaZsNJRMeUfkUfx0u+Ig9/DkXDm1ihQonn9isoZ5NlD9zJmY3e6chleJwc1N9gcf+P0lTgTIqQ/KZdhUPZJ++gD9fZYnCCiaVl4NOVhWDpsPO3fbRedyVJ10vH5A/TAI9oA== 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=XcXrRKBabQlOTHo50b7cbdxKf1Mnfm+dGC/o8m8tAJ8=; b=bDPvUAfb/yjQthPhlFgEW30LpGf6IdaQZPsEwxGv/ZKyNEYN4NbFq4/7EdLaBzOBqC2fIK/nlWsQGSBXKNWvDxdVNNmTf2qogQNnWsYr2mbUY460uHHL48bb4tJlpV9gM4q7rT0VzJ25nawovjbb+F5AxhdFCfagnh2TwAD6DG4= 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 AM8PR04MB7396.eurprd04.prod.outlook.com (2603:10a6:20b:1da::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 23:21: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.7249.023; Wed, 31 Jan 2024 23:21:41 +0000 From: "Peng Fan (OSS)" Date: Thu, 01 Feb 2024 07:25:39 +0800 Subject: [PATCH v6 3/4] mailbox: imx: get RR/TR registers num from Parameter register Message-Id: <20240201-imx-mailbox-v6-3-76f4f35b403e@nxp.com> References: <20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com> In-Reply-To: <20240201-imx-mailbox-v6-0-76f4f35b403e@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=1706743555; l=4351; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ZIPe1ShyvGcJ7GWp7Z6UAmZB3DJN28oXn0B1jjJz194=; b=jYPxB8fmyqs28ZGG+s4UND+7th+LqGwtnEzqRiWlVn1rZZbMDl2OKagX0jYZA3PRhBunBX23z fJIbkK5+esdARtoS+lXRhkZoPnTp06BKv4bFHcfTD2y1VkcxxKsyygY X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) 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_|AM8PR04MB7396:EE_ X-MS-Office365-Filtering-Correlation-Id: 309a02e0-e1f9-4947-d221-08dc22b361c9 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: YMS6nve3wbwdB/bXwWQEpav8dHQBYX6NO4i+7hURFIaO2xkg6DEgajTDuUkoe1QZ5aAbdqiKpCprYkSz9rbRL0jGPmsko2C6aVfEUH7ro+NAV/lvtGMCLQDezWPpZBa3YjFdAsl8yhR2nvmPeVFHeQX/SqLNLzdymx/FZe/Yr1QDfg7WIVZvx70bHUt9ggxVNx4nMYl1oCymq10FwqNVtMZwG8Dj9TbXzYbPJgz1Nj9nXplrindz+RFLujLpq/YAM8e9MBjN6iO7lZaBoSRdFYZ67MDXX/RH1lVBNJz3BWe1NngdmWuaxIfb/fbn35OoWxR8wTdZKZqqu7N5gtBBk2R9BSoA0oFZ0yYTJz74twkmseGi/8RqcaOJYmccMxs5eCzIdciphFuT1XeNNSkFZYPWZSJF6QyCJTTn2iUwa6tW8/UHt7z1wWL85g9lodvqhVci7NE2AzzJ+WuBmdX4h5xs+IafvmdhSmJdpb+YZ4sBmBraLmwKlC9kNTn6Zgf1Jy0GjBDVeQLuWy7NGmhs8JS3pfZRmdiRKjoBsJ125HpoDYCNRstCZ8FLrAmdw+xColDqYBukTaMo9C/1Fn1wmtzw3nq4hoojVBo9WGn/nFpauzflitBbDgWzVjpj7pKnBo1iT1sWiAuGlxxSPJ9PAA== 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)(366004)(376002)(39860400002)(136003)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(921011)(26005)(41300700001)(316002)(38350700005)(66556008)(478600001)(36756003)(6512007)(9686003)(6506007)(83380400001)(52116002)(6486002)(66476007)(38100700002)(66946007)(5660300002)(2906002)(8936002)(15650500001)(86362001)(8676002)(110136005)(4326008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AzIFY7eqb1sAqcGtcDAroz8baiPa?= =?utf-8?q?wO81JLfJ4e3WTMgpowUnBnPHmSWyLuI9qH1diP+QTLvOXmli9x6Fwvp12OAKo0y2f?= =?utf-8?q?xKBVCbi62AGazrBT83SrOvyjbyG0SiWV7YrmI42rcKFqWCkq6ADMV/sopsNQXIuTa?= =?utf-8?q?sDuScLRq5yQhqG7mWQjZtepc02AFYwbkTs3MjBoyu1MeM1AV1RWSjdpLFQYNP1prU?= =?utf-8?q?29lftWdUxqekTCbE6dOd5DrqGOr+W7dCd/SkVQ6jL1YbcgPpsT1VUmkI1cdooIX5W?= =?utf-8?q?so97OLNJH6Z2CPVxG2f70a22sIJvOYPGBCMfaIhwVEb/j/2uD2wWbbyiDGqcM6Dsr?= =?utf-8?q?d+MfjIPn3fZdU6VwGC+vNfhCKSFb/pz2BpB66oO6g88eJ10Uv0LwV14DmaoTb0CRS?= =?utf-8?q?DcLZGBAtKai251NXNkl4Ac5YCEgW4ww/LVw1MH41ukrPdcPHc57tbPlXM8lof4F8z?= =?utf-8?q?rx/0I/9L6qUeFwVS5m6Xw9wdYaIR7KdGmo0PgsVmtlx0pHqeIgOE3JnVQMcImdA59?= =?utf-8?q?a28qhN9pFUdkeA0+IvXbWZw07EzIAb0AozGbqgA4zVY6hVYaAxCxMVIuTRYV68JuM?= =?utf-8?q?bjSFforkl5yms6oRcJCohfIXMFxtW09aay5dsEdyabkVgpmkhWAunfK6PHD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iSuL2vEV?= =?utf-8?q?GyUcVfNMOEzd?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 309a02e0-e1f9-4947-d221-08dc22b361c9 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 23:21:41.5668 (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: buwUqna9tut/qGFOhsAfAwauE6g97PGnirT8plf4nTfzhgZCuGzl+KnDvRAWaAsB99+AEZ1dL/O1i3ahbUk/Pg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7396 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_152143_885840_EA77CC49 X-CRM114-Status: GOOD ( 19.01 ) 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. Reviewed-by: Sascha Hauer 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 Wed Jan 31 23:25:40 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: 13540473 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 91629C47258 for ; Wed, 31 Jan 2024 23:22:34 +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=TRBGazMG7Y9Ndmh1mbxDlzXxq6Qort61W15nXePTKco=; b=IcejYkzBBDCLMpRRsUop/Ae5/A Eco3cedJvPLZwVWyrGHoWCyMt78UMmtDcKV0fcvAIjx3ir39Il8ZoP07OPTo1oLSeKhy5iaNKBv7A lXWKqBTg/RZbwouu+QtiQ7X+NLDzr/nonDZKthwgsjL0NR9Tvb/qQoWjSSZTor+uiOQVFPvtRv87a ZjphcSA8p6LPAWXe3cg3y7r6uVzc3XSh7/mt37SNh6pRAAOEmpnBDOa8Zp7ZUcA7tIt3LM4NRwaSa SmNKmw9HQjWlw7Z9Luz+UqMACtL9K6UfVU7NWoyewCr0fGjOTjskP39v2cFj29EjQPOGb5MywhQ1y gwc7lQdg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJuP-00000005sms-1bT3; Wed, 31 Jan 2024 23:22:21 +0000 Received: from mail-db8eur05on20629.outbound.protection.outlook.com ([2a01:111:f400:7e1a::629] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rVJtw-00000005sWo-0R7q for linux-arm-kernel@lists.infradead.org; Wed, 31 Jan 2024 23:21:53 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=T6jHzL4aIjgUqzUC9iUk78VY+7e2R8UPyTR9uioJKksjVy8O5Ksx3LYtVwmMM05ZUSZmZgntEVp9Ly07SVKqLvRo5yd5W2o4RCJAu6M8suWbUu+xnv9EEg41CqSCuscsywTz2PipmBYMrW9U1yOLKOiOMxUP+7E6zcwi22d9aC1efd9hPEPY0JDFxRi6cEOMGeI1GH/jNAPsW2H0u8XR6qoYD3TBQfAmuMabiBAMq/WnuKFpJ4UdKMm6IGDu4GBreI7ShdsukChCv2d/AH5AxBLNbJ8fbkWEAojxs6EKvbP0kQTtcDuIzouN1z1o+UUYiWZIk/5vjLrgxa2N4fjipA== 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=xTdoC8q5FApmt4DLfehA123RyfVCBe5apC77EnASDLU=; b=QlFXhhi4fK+98Zg4CoRVBWBDovi46kXU5FYk3r5Ag4yAhKpTLvUmllF4RjW5a6RXWCbheO8l5Fa6ypDsUPQ48CTuIacsiFOmvieA4BIEprmb5l2qDMJBygAhQEpzIle8wtgsBHQMgqyv3tve6Gv/LHr152ksIR7OEjNE69msVEhyTsHe4s6akaHOBI+rE7K45CCAL8E1VUnK334bhUQlbA2s9g7w/xJFB0yooLeqIDzSpimQMpYSIJSUjT/4gCDFcjPnLEiKrv9w/bwsz0j3tYW2VgO2V0pBRSjJcIB4w6j34j/GMwW2jFcWFOWZVnxvH35lZwv4pW+qfGckOQ4nvg== 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=xTdoC8q5FApmt4DLfehA123RyfVCBe5apC77EnASDLU=; b=ONi+w8mTgf0elc6jQPHznl7GHN5+Mf9m/zy/nQ5yeLzTBfvLqxpp26kPrs7QeBM4hYZacWDUutSmNesZhcvTVICVWMsBVGLWJaSBWsMBrevv7ysQwr9E4cMtI1YHSwpdzTiCMSCXWLmsY4v6luhI0C22EkAGkLa0xHcRHkBOd/g= 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 AM8PR04MB7396.eurprd04.prod.outlook.com (2603:10a6:20b:1da::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7249.23; Wed, 31 Jan 2024 23:21:45 +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.7249.023; Wed, 31 Jan 2024 23:21:45 +0000 From: "Peng Fan (OSS)" Date: Thu, 01 Feb 2024 07:25:40 +0800 Subject: [PATCH v6 4/4] mailbox: imx: support i.MX95 ELE/V2X MU Message-Id: <20240201-imx-mailbox-v6-4-76f4f35b403e@nxp.com> References: <20240201-imx-mailbox-v6-0-76f4f35b403e@nxp.com> In-Reply-To: <20240201-imx-mailbox-v6-0-76f4f35b403e@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=1706743555; l=2040; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lL3X7pJ74yWEAfSciMF66PVspSe1EXpJ2ahQLd5ain4=; b=i6/lCiQ2umyZUmJMNhniuiwQy9mXJA8EaTH/+NNH5USx8c/0JSX8+Imv3Dimnkj/lhrvZSfnK cvNEs+nZJn1DrkCJryn9eXr9vBuht1h7hhHcZk1aAmPGXBRU9K4rWD0 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) 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_|AM8PR04MB7396:EE_ X-MS-Office365-Filtering-Correlation-Id: 744534cd-7f89-4a75-b66e-08dc22b36442 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: zYO1/mHZLzc/9npkzLlRh+unuZm6Iz3sxBm+y5od/QUOrvoZrf6KDTlpOz78pRMESWxzJSfG7Ss/M3lave47ZNWjO+NgO0tV/JNiKO/hOXQzlqkIZTW2UAyeuOfq9HipWJld46jlC8vtk52KNpQEz+6G7H5MEqCfxMphNgf2rtRkoRApCpQMAnPZ01qcQOgvMWCwYiw1aRaSj/ql4dSbAIo0FbPpUtmcqTc9F6jcOQpN0rmbOqlkDuj1csF1FKjQJZp5yhqz0T5vgrrnizibVh3M2GHaDwuTGECSp4eI5fXZQjCA46ub3lnqBJdMtz9h8xCvOgQ1TL+qWf5dvBHeBVGj4JVgCaSpCPXb/R9lJ7VgPePeysQ/iVGFdf3UgLfEYU4fEWObYIicxdYJ739/EQWCGjicxpW52dosm1wlBJGK7bBIp/SuHVLomedXeud9QiIKfcI1WoUg9nkKfKqM0dqvS9Vbzawe/lqaIAW6sZ8jUatgcHSyyn33LsMQhLxs2l6Jff+EDSbnC8ATN2nkH8JyBRfscqAz8WAjvUsh8Dsj2qvCUfUJTU8ADi0pkiBW2JXc5D29RT+ydvgR3batydoPiz82cksyAbXzEF6N4/5n6XrOxyQOfcAmPF7NMAMrnrPXUh0PMUYlCzT/F0HlwA== 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)(366004)(376002)(39860400002)(136003)(396003)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(921011)(26005)(41300700001)(316002)(38350700005)(66556008)(478600001)(36756003)(6512007)(9686003)(6506007)(83380400001)(52116002)(6486002)(6666004)(66476007)(38100700002)(66946007)(5660300002)(2906002)(8936002)(15650500001)(86362001)(8676002)(110136005)(4326008)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?KZJPWMzn+qA5oNvT6rTLCgfzQvKL?= =?utf-8?q?aJDeAm6HfoUQlO2MJVBzCG/oFjEN2tg+Q6Our4YTsdqrYSCz0dZKrJMAjAymtJaog?= =?utf-8?q?CUpxcTAVY7TW7XZFK3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CuR5nxF0W9bAXRBvnb19GLAJElqXB8+Tkio75nX0E?= =?utf-8?q?azaL5w1fAp2JGv4IFBnLqhz39xCp/W40Jz/MBNZMA/wGorxouXhiUAj/1+CGAVBOh?= =?utf-8?q?xegBolicX1I3D69kebExQPIUI5yvZTxBsDMHALUPK2Cz0wrFmkXdhwqVVt3qg68JA?= =?utf-8?q?jVC/bBjkvmBBE6BHJsux+h5TIzrTco+7czzvv6G9ZTS/q97SKHpMi8kdiPsoJCB4R?= =?utf-8?q?x8QISIK71PC1HxNS6Goj8RLainmCHAHE8BnmpnQ4yhobKrlrV5eQyNUv9pgfbIhaT?= =?utf-8?q?55r52LF/8jkQmtC8Tx3lWSll1Q6G5GbvromeD7kPWJ+f6oworqVX4toP/7bXuP0Wr?= =?utf-8?q?6cKISCnoWWysyGtKj3nPyMy7OlJeilV763XIjgyEP78mgfKRunN5RqH5JdKQ5p+3n?= =?utf-8?q?mUKjlwzeUwm92onr7elpS5pzXXgUUxm7ycoHq0NC+EmArOUciyt1e3AhziAht8y4q?= =?utf-8?q?NPkTMT2JekU0Vg9jCoQE/xCRDfye+vGuKo9ymtOCDTLj1MThYjFwSNiOdJ92X22JI?= =?utf-8?q?DRIVC4sy57Cv?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 744534cd-7f89-4a75-b66e-08dc22b36442 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 31 Jan 2024 23:21:45.7255 (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: Z2N9FEcRRNx42LO6D2fXV0v+29ahHb0/MoGLV77TLEYHnPXz56OanDZganphXBHIAOV7n2Cg6j2L8g6arltuIg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM8PR04MB7396 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240131_152152_199140_CD2819CE X-CRM114-Status: GOOD ( 14.12 ) 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 | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index 9e89f773d2f9..5c1d09cad761 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,9 @@ 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", .data = &imx_mu_cfg_imx8ulp }, + { .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 }, { },