From patchwork Mon Jan 22 06:19:23 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: 13524832 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 6DCE0C47DD3 for ; Mon, 22 Jan 2024 06:15:45 +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=2zZSSeXEzn1cnCB8F2EhadwQyscvHwTCS8vy1TatXps=; b=4Xn2lCReKwOikAN4rh2+6sy7vM HtjFvnfAUL4cjtINBzs/2Zvg367c9KvZ3GYhyvuW8oTG95GCJY4AmCY8n6p5oZhjfB04OcVzP7UHw 5+eXYMUrQ+WtbLEJ50tzvK/J64Ldqga1w5D9wHvkD0g8t45D4D1Y0b+o6OfnANqAoQpodMKabVwfB Ij6zB1SXCQDYybPKO55R1JlXiOAIyTxRTY2pX9t+a8+jeB23i35iWq6ISW7Vkppr2yirrWl3G5hPE hmscAjBsiREVasYOAGDjm8u6n2Qu5mexTzvvyoNF4xwVEJ45cQcDKxgP+pi7e+NTqbZRqXDCP83Kw i7vIYM7g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRnaX-00Ahia-38; Mon, 22 Jan 2024 06:15:17 +0000 Received: from mail-dbaeur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260d::601] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRnaS-00Ahgm-25 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 06:15:13 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WCvwU1NCIRkpCw2lBqoPDdbvE4Ha1OvS0w/2Xhb5U3wN/cCPQTKHZKomu6Qj3BgRdnnDzHRtM0Iatj1QD30rUSwd5Jl6UrMHKqgkthCsqsn9q34kmsKDvNjCn7l3pFGGuZzoQDzQrZpqnxnjXVKGcy3Bi9eatZoA1VappM5yW5LURhI08obIUlcOUg2vv+OML0J9DDgyug+jCKbDi2ON8pbrxTogTtp1pj6ThjuV+/cYkqRF2+l6hXgWV2egJOsnnXTAr9IuufOnANJe33cekKcaz2Wmc8YlYpZYnIRKjVbgJeuZM9hWjuqqSPNaVD42A8EO/IBZLWgy15euhK7s8Q== 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=g82O2aBVyCptVCQ3vky2tKNcvp0YYqSnK6Tx8buxk/E=; b=PxdfTfBlaZ6UkxZ/s1UTncktBOgP5Ns2kver42UoD5J+3W0tsMxHf/eIFF7S3/msuAavK/3gDvFT8+QrXtLbiNt3D/A7M7AFfvAB1X1LOkL91daeWTHpMP9QKHtOySy8NznblIfjUzl9cOzZ3z9B19077y+vwQpSTYM6Q4cCd7Xp8fkJEV9BJxZRZwk/v2FsRZSR3YihE/pFGi0i2gFgw6mSI2wrt29YjtidJgOtvaowGDLY42bj5GmBdjuAI6fLwnT24bU0umVZrsFWu3PEoS41HuRJLa6o8DGgdD4OC5SkhgsMXAjCvB8CvVyTVmw6D8eWH3gSYoEardylsLKpng== 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=g82O2aBVyCptVCQ3vky2tKNcvp0YYqSnK6Tx8buxk/E=; b=L0QuuIlz27B/WBX01y3qwx8F0BvhtgVGf2NlNOfumfercbif7i37/tJtUAcP97O2phyxTFpq0DyMGyHizabV5TtRg+Y6ssMjBd5n/nmhsNnzu5VunZvfE/OFg3QD/LjVQMvPFEry0xTuJeKLCujyTs0M/9HyLyKhntJ7qknkXIw= 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 AS8PR04MB7991.eurprd04.prod.outlook.com (2603:10a6:20b:289::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 06:15:08 +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; Mon, 22 Jan 2024 06:15:08 +0000 From: "Peng Fan (OSS)" Date: Mon, 22 Jan 2024 14:19:23 +0800 Subject: [PATCH v2 1/3] dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible Message-Id: <20240122-imx-mailbox-v2-1-7b3c80333b92@nxp.com> References: <20240122-imx-mailbox-v2-0-7b3c80333b92@nxp.com> In-Reply-To: <20240122-imx-mailbox-v2-0-7b3c80333b92@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=1705904372; l=2485; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=yxhUwukR1ZdbYAmIIg5lDJYxI/rUpRQGRKB2Vuls1Jg=; b=w/DCQz7zjfmgkOVv/KVl1bxZX/wiGxSELbw0hBBIVa8ZKLhLpQKQm7gMrFa5RPFG5ECqX0zxq xhNOAmIFBEECkRuc+0u2PO1RCKUZyzBN2MHc9cdHd7UDBmXjYHhEONK X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR02CA0007.apcprd02.prod.outlook.com (2603:1096:4:194::23) 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_|AS8PR04MB7991:EE_ X-MS-Office365-Filtering-Correlation-Id: 06730c13-9553-4687-1dc1-08dc1b117b64 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: QHz+ouFpFmXS/BqTGRw+NhYv/Ezz7p2xXAOdz95pzLNQpw1+QcFadjHjpIsntsQTpKsTtIuzxEr+KxSYtTE/9SmdBf4uN3FHQvQxWpOOOkCzCxJTXLKYNfe32cuMdQKm+dowViupv824q+do0P73q1saDqSsW+11h4RWqvtrdU0uJ/mR4GDNjNRQlftjpFWiubrUTrT8v56ToHRDeRZ7XrkIBMyu+EH6y9qy/go1VBQqlEP2i1XSGAZ1Wr7DiOe1Ow7kpYqASYxqzkDxb3340jqLsFZA2a8/5GzHkA++HIy6EGTaKgYX480S/ot9ACLnKbcGWT+PRBzYuGdYfAjKGba5K0N6AJYuJVnbxX0CzLYXPjEr8yZsj+xe3oIiIIUWIQZMKCicZfAJuXzVgiUSt6uf2XJ5JiD4swRzru5+sLx3NtexsKxZGb9C8JCkzawTALX0UQAGGq1GDedNXL8eTDQDj0omNhowyJittvhPxRDASwsOBQ8/T2sr+qVFsmoprtzt6wRlBewmbA8HCFzqSMCTMpins2bPq+ZEzakeFF8sfySvbrpCAeNLTG5l/NPiratyP4k7qe5IenafrUc4/4Hw/J20yeWz7fYOCfxtxGngfwGqeJADl04XsX9aG8GaLkjy8qk35+jAgh5LBhZVUgK9NsmX+16sXhoVPt+bMYo= 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)(136003)(366004)(396003)(346002)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(6666004)(6512007)(6506007)(15650500001)(5660300002)(66556008)(66476007)(66946007)(52116002)(38100700002)(8676002)(8936002)(9686003)(4326008)(2906002)(7416002)(6486002)(316002)(110136005)(478600001)(26005)(83380400001)(921011)(86362001)(41300700001)(36756003)(38350700005)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?nvRr0PGShQThtfM0Nt2b98RW4WRl?= =?utf-8?q?QXd98DwE+Z3rqmANEAQXX/EN0Ianz1XNa7SlChLZIgVU4ssmTj5XudU++K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?= =?utf-8?q?wON+jzRsLL6KIv5/JbrjcLXVVLkfV55fljV82vJu21JsBDVGGmUFAo1mbsjJXG85W?= =?utf-8?q?Sh7z+mgKyJP649gIbkOutzWYL/pPUBMmX43SowoD6t2P8Srm5tqQ1uRurs9L8goQ4?= =?utf-8?q?JgGAABB7eDT6rHwUunuw1U9CZPvnX5G5OJUqjbSVZwMniwgagDJqnkqZit26mzGJr?= =?utf-8?q?6kt5Nn32iwghU9cCyuCiG4xetTBOstKpBP4NBqY4RT06sLx6AHZ6S74PhHWZnwgB7?= =?utf-8?q?7coJi6875XBCt48p4upcxx4cwqGHffhqfyGlZ85z8h4Iz1M4NLXvBe3mWm58Q3YOu?= =?utf-8?q?GIotdMJBTupJSm+mAfbQae5KfOlnL1En5SwN9DJlbc3xN7mj5fMxm02tZyWYpPFUu?= =?utf-8?q?Kojoj6D80PVAh4SRWFu2uNOPUS4BEjdYVhsTnfa5zd8GTejFVpMo/rg5DC/0LngXT?= =?utf-8?q?3uguu5Hrbdw8MVKN7XR/NgjU6ic2SgSY1ORqpbgN7G5t1dx5qsvZd1PGZLZ0fo0wA?= =?utf-8?q?v7RLaDA231buTuPFJUehrUswuoZuN3/LX364AsJfhsYVKr6xIEYhRxiwlJy/MLxST?= =?utf-8?q?vstWTuYfi5w8?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 06730c13-9553-4687-1dc1-08dc1b117b64 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 06:15:08.0020 (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: ZnsPwQcHm8x28kM6XtPTp8ptdpWR0eQeSemm6p9sfSwkyKoQ3SUYrK/Foa8xgBe4XQEDeoYgCSYcGrygI68Bag== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7991 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240121_221512_688778_9C51665D X-CRM114-Status: UNSURE ( 9.70 ) 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..d10c6fed291b 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 { + #address-cells = <1>; + #size-cells = <1>; + compatible = "fsl,imx95-mu", "fsl,imx8ulp-mu"; + reg = <0x445b0000 0x10000>; + interrupts = ; + ranges; + #mbox-cells = <2>; + + sram@445b1000 { + compatible = "mmio-sram"; + reg = <0x445b1000 0x400>; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x0 0x445b1000 0x400>; + + 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 Mon Jan 22 06:19:24 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: 13524831 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 E3623C4725D for ; Mon, 22 Jan 2024 06:15:44 +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=tiM4ymV9+Ue1ScReVXWJPdCB7pYjYIIblUb2E7W6TAU=; b=JNT3JrOq+Voh2tPPkwJgvxDbPf Zu7sT3VLWGXs8gh+91H9gNzAhXd7xMrxQpvbPv3K12Ar94ey/kMeS9TOWGFgxj6wTiT2AobMs6Yev xlwljLCWkVzBZDQoMu7yKCRQ7EZJaV8gxLJiS1bQJO0/kFa8+NxDs3GdSN8eA8VMS9ZwgYcyu8wQd Jm5R+T15tkO48plQajiqXV4VBD+H6nymypw+Zh0y77pOREPk26pOlvwbqApyoQ/fSuxi+850FMlXZ G4e0CTKjXGdWYqVrn4Al3W4DOYxKtmXUo+KqgCxgTeF0EJ8gKNXSQnSC/d5GZq2IzHnJ82ufflS79 xnmH9eXA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRnaY-00AhjD-21; Mon, 22 Jan 2024 06:15:18 +0000 Received: from mail-dbaeur03on20601.outbound.protection.outlook.com ([2a01:111:f403:260d::601] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRnaU-00Ahgm-0x for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 06:15:15 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Z46lBhOnARC0flBCz7i4nQDqJ8KajuIVc8ZyjkD1hwcb7vOO1BLAzWABWXHOhNlFhsn9ktzzJyKPYbjDhSb8loacIvBaOF+OsjKEeUat5LALDTEH1b5N43tvSIEmUDbdEk9nFTAb7j5FnCg8kgF1tI/PtQyYce5b1EdyDibpgBstOfsFQHVrr+qATmqSCN9KhuKV2Rrb+H3pV9MSSOZcIlBdsO3XqagrUkH9agZsaOSM5bp0nQ7MytwD9Xdef60JjLtzwjZ8NSoHVftdtPmzqQUfQAoKOsbN894KPJmQc/DWThwGisjSPbn11lqaU1UEwrb3vKivUVKkq9a3PyV2Hg== 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=he4OIZJtqx2Q7v153MilCDFIDshERVi2Xfa5pWrFZ3k=; b=jQwtKJ85mtzv4vin0uXxOQzwuxkZ02lzF88uOcZ42st4Yfxxh0mcp0KjoWRmbuMotmJM3p0AqDb4Agp80+ULnlZCBl3BcfO3vFAHQopRgdKQkRXGx6Zab5DyvdJDlsYE0tLYOT4IOWyVno7z1xaxW1nUZnBRsuOvVn56z1Mt5cNmD486xZlnivrCKESgNLvP2OUNm5FzgJpRDh1mygSQDLLk8WUB+WiCseCG9osb5vBsyaIjc88rnb9PGf9ayA8ghPqQTWsfQq4SKyx7nevkD64G2Vf+lZiRjmLswJAuGXOVnqSXvoZjC7lZSzM32SWL7tSfyUzHlSnzOCc4/aoXyg== 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=he4OIZJtqx2Q7v153MilCDFIDshERVi2Xfa5pWrFZ3k=; b=fWu9QhUu6Y4F/uLWNTdmQVRRca4Bb3zN8t9TCCzoT67CA4tiU2hX5xMRHpt4nht9R4BvbWV3TM7c+xI70JErGKXjn9KxMbhA0RrJh62dCpG5HUGH+kzsL6ruWvR/Pa4kL5yFgUlLkrXYWTwoL8OVRG0T+CjdTARrwXFdeXRgNqQ= 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 AS8PR04MB7991.eurprd04.prod.outlook.com (2603:10a6:20b:289::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 06:15:12 +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; Mon, 22 Jan 2024 06:15:12 +0000 From: "Peng Fan (OSS)" Date: Mon, 22 Jan 2024 14:19:24 +0800 Subject: [PATCH v2 2/3] mailbox: imx: get RR/TR registers num from Parameter register Message-Id: <20240122-imx-mailbox-v2-2-7b3c80333b92@nxp.com> References: <20240122-imx-mailbox-v2-0-7b3c80333b92@nxp.com> In-Reply-To: <20240122-imx-mailbox-v2-0-7b3c80333b92@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=1705904372; l=4331; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=Iy65IwSAFryjGNiSZCuX9XbUK1AgEleuTe1kp75FjPk=; b=Kz4jb/S2/2GYaE5gDEsxQnvVF/jZGT1eic9YvgN9jMfc5zCqArTsSoyPY7d5mtUFT+9z5swca SqrIydptHM/AstttLmH+o8qnb8RspPFuvVCeeFUba1/A4rtW9Wj1In2 X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR02CA0007.apcprd02.prod.outlook.com (2603:1096:4:194::23) 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_|AS8PR04MB7991:EE_ X-MS-Office365-Filtering-Correlation-Id: f3ce00e7-5666-4f39-8c6f-08dc1b117df8 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: cG4RCSAS5nlyKZ/M4VU535Ph+tsJv+cwCZIp8sjB98QknZZ+mu3ko2NOHEgB0LqDSFgh/vzou6vqUGSM96y+it9zGu80yg5TG2S+N2+QQ0yQTr4D7rVmp3vXp49btUUejuWh/FD4cdvKTqKVxsJTH0PMawXSgOocrzoSkh4Sg4hjraEdVOtHh8g32yXDmQwSuHCDCUASU6F9tAPh3RG+4nbWN1Zo1Ktqi9xTXwg5pfSIB3cMHrXp7k0BoX5EpFUfuZwSUzaBqc6qMdeb/9NB3ZN/wCs8kWBzBh3s3xGBGv/OmfJUe4D5LTvZHQiySK6Xd/Mwg0KHMO7IQLMC9XSDZJU37ugT0LaRMiDpK9Fp2W2GgqKQStAXcYLqQbJBSfV/AOdf5EgXtBY7N/UCpUKYoYCSZGn/Zt6ufeXsS8bFBgzBXb3VYyZhNmchXOKujmSDwyye8xCSxDKR4IrvNxkY6LsHXm8R5d5UEqR87vXWrhO2KRF9sx68GD8MCkFYCfk+S+7pYQctwRrfj9Ls4cu9d3toTKheXpViroFgsQqjX3mVGd+LhGXfjUWZerXLa6DLQKE6PybrjnD6cqffBrRzk4Nk9N1kKALNzBTdZZuh50YagIke3zCj6JSdgfIHCcnyv1coBC97Ev32iFK1YfoTiA== 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)(136003)(366004)(396003)(346002)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(6666004)(6512007)(6506007)(15650500001)(5660300002)(66556008)(66476007)(66946007)(52116002)(38100700002)(8676002)(8936002)(9686003)(4326008)(2906002)(7416002)(6486002)(316002)(110136005)(478600001)(26005)(83380400001)(921011)(86362001)(41300700001)(36756003)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?pvq2jwL/CO9ifPKwcVDcolVFF/gq?= =?utf-8?q?IGgonqV1MhyC5IkcBidEsHox0gFbNhD80OobtLBrERl8b0+bqRwnzC0WQB1cy/9va?= =?utf-8?q?KuvE6DCah/DQKgGySKvTykEl9ck976Yx/5rfgepj8baM9VFrkd6BBjiMpYfDNnLvv?= =?utf-8?q?WyW5LJISaOjz9yWGgcNS3JShw7TYcFNQF0lxymaihVlyOm9WK2DnXOW7ZobdpOoZu?= =?utf-8?q?y453TyZXzo58JBVs5MqmywpjEOpLRqaS6fyEFca1nq8IdCzI/e+zWc0SRsUck/hsH?= =?utf-8?q?6tBk+DTO62IlvuqVDWVOjWG3y2NhBUuq2xlj5TXtnGu+ykYLvD3IG7Z2IdaTAPWc3?= =?utf-8?q?fl1g+O2MNP/aDjCtcOFh8UT8QgchGuTDt+0vbYNCFUvbuL0dSs2YAIbEfsdGFEPmn?= =?utf-8?q?IViyGYkf/iZ1lmCKwXYptz3UcFbaU730KXSDQDbSoyb6Pp9/srkDR29WiPQbWgZh6?= =?utf-8?q?WqEnMOPm+ZPgHgti2BxhzugQtZe1I77612aQ3pjlshwC2T3lJQXNvk/OoL4XXGYMy?= =?utf-8?q?BoXh66xSfep1VFq6dDYB6t2NUogRdBY43NqkrltU+40eEHZJRYxokTMzecJVr2Bvv?= =?utf-8?q?n7XsHfbsbIgpledVrEiIuXKJDkAN0rvY0ZHCO5VQVz7dl07XthbruSCcJNCj8oHsV?= =?utf-8?q?VOVq+RyL50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-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: f3ce00e7-5666-4f39-8c6f-08dc1b117df8 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 06:15:12.3297 (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: DrfeBoKawQAHWenwQoC0jxs0TTsfASwcxLh8+Iaxxpop5SNUl6ZThsO7qsciAHLwAoAmPmthuXL/o4vvCTEA4A== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7991 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240121_221514_337449_D8D8A9FF X-CRM114-Status: GOOD ( 18.85 ) 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 656171362fe9..f2a21baded29 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 void 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; + } + for (i = 0; i < IMX_MU_CHANS; i++) { struct imx_mu_con_priv *cp = &priv->con_priv[i]; @@ -768,8 +790,8 @@ static void 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); } static void imx_mu_init_specific(struct imx_mu_priv *priv) @@ -864,6 +886,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"); priv->dcfg->init(priv); From patchwork Mon Jan 22 06:19:25 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: 13524833 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 545CCC4725D for ; Mon, 22 Jan 2024 06:15:56 +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=pHWzFtSjBax8rFOJL/Hjs/kzfyjYGJeX3ABqIRXzS5Q=; b=vW9hCn+osjMq6iEWbwyC3Lua7+ bDTNS5NlD3NM/sZOP2G3+emhxu4qXzQpaBvrVxLpJH/JvvN5MnAbqxby4CUAvMKHXLqzX6NvGUVe9 opcAzd58H8G5B8x+Si9r7lL8gIKuaf1J494bDRHSRKPOFbB4majhF/fs6kDSI7AwCZbJhBCLLWbv7 E2/hCT6kwWg9jUr2DAtmd6nl4Q0t9Gwc3aVTCJcv+NYULLdvD0EM9tIsDr2FwdbOmMA1J3ORaJnfA IootwQ5VziaKhN8cy7r2G+lRIgcLM07V3obV2gN7p888JjzjOCQi+EXQiniIVPkptlz0aPT2ICzc5 33caQp4Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rRnai-00Ahow-0g; Mon, 22 Jan 2024 06:15:28 +0000 Received: from mail-dbaeur03on20600.outbound.protection.outlook.com ([2a01:111:f403:260d::600] helo=EUR03-DBA-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rRnac-00Ahk8-03 for linux-arm-kernel@lists.infradead.org; Mon, 22 Jan 2024 06:15:23 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Vr4QqslISUzM7TSBNkf83aRcV/3Y3xqUh6mn1DZaAaBgp9QQMtDmdWnjTPHpuwE5d+RMhiV5nHG7O6AsPbjTRqnbdSU7/3PEEu6jmWEB0G+IRSwvbjgT9QTQ8s5OLtwIPjI8Y5mVyQF22zt6tWgcqb1fS4sPyS0YScWTIu7EbRGQC0V6cq/lZOqQAbo93myM4Pyrbm3VtBGGRO5uxvAbWWax6QLMGZ9dTod0gHBO8oeq5IZ5DUnvnvIYkitLimlDqfPB+sLfNgRFV0C65Mswm8KLfF1ThUEHvsgUWc/53PNY+aER1NgnR3I7ybv5AYidl0DSX5qr/roglg8PmNshbA== 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=S00LkTCO5ug4Wk2kAzcZUF6yq0Qq/+Ds7+Kxe0oX3wY=; b=HkoHwdZ10NEwJROrZ4G8piznTz+74TB/Pwp1H9gfULFkqbz9O+IUViCX4pMWazrUoRVsHXRoP2wjwf9SXNT2QH5kLyCoA1Ck6uV1KP0ADTUFIuParuw6F5bTfC7FsidYDhfzOd5Q5w0WsxFhbDfKvlC8W7H4B89YUcxk9rBprZzK5bge7KWgHp1qSpICs83ehlzJhFDhO7IK3MRk+XOm3Iu4eMUmysE5DMKOeQrG0V73Dq/5FLKskvmwgR9L9jp0I8qEGbMF8kbaIwGxQUt2jClqpF7MjZ4AkhuZrgY/dndM4X+5YoFVM1Y8p/Wtcwb5qom/FT7iNX81jo4a+xzpqw== 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=S00LkTCO5ug4Wk2kAzcZUF6yq0Qq/+Ds7+Kxe0oX3wY=; b=fXGNWFDpPIHryX+KHqLLikLzglGVyvCUw8Hl6Q13KLY4cW3AX3bIDqQ7TGPAMAe9Bj43SO7NJIsSuyMfeoG9dvp9fGY9yhrLnX1RNJtqLnWnu8JaW/TuMZnh+wFbb6zodhHbuMy2TlX+7HK0uFXyORntHxZVIHWpCA9HXbUVcvk= 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 AS8PR04MB7991.eurprd04.prod.outlook.com (2603:10a6:20b:289::8) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7202.32; Mon, 22 Jan 2024 06:15:17 +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; Mon, 22 Jan 2024 06:15:17 +0000 From: "Peng Fan (OSS)" Date: Mon, 22 Jan 2024 14:19:25 +0800 Subject: [PATCH v2 3/3] mailbox: imx: support i.MX95 ELE/V2X MU Message-Id: <20240122-imx-mailbox-v2-3-7b3c80333b92@nxp.com> References: <20240122-imx-mailbox-v2-0-7b3c80333b92@nxp.com> In-Reply-To: <20240122-imx-mailbox-v2-0-7b3c80333b92@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=1705904372; l=1750; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=0B4VqTwtXtRr4S+gF9oNw8ppit14PJMMR/X9Pho1nAU=; b=6/Y4PilE0iGqExizKj2SGLsapcs3S3CBDLyoANg4NG0ZmEb1Ayh5qHAJq9bs8xpqJmIH7XVFL oHrjtEShkEDDjL21nANa9vQoP7xczhaqgVvegMFnphq4FRSoMKftuEb X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR02CA0007.apcprd02.prod.outlook.com (2603:1096:4:194::23) 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_|AS8PR04MB7991:EE_ X-MS-Office365-Filtering-Correlation-Id: 6a816271-624b-48ed-6e09-08dc1b1180e0 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: rs2HSsXjnE1TU9XtmStwNgJRd2Dq78P8xnQ4Hovs8Cftzg7/zRbBRZZuVu1vP/GlXmJU2OKZgvqb7TG45wePRUPuZeYHwVUtowNvtnfCN/hhciSCcHp/Esm47tGGXDL8qdrF4L56WX+IWOtksO/59f+UtBiHaVhXJelbwOHm8jjx6m74AmCUG6uQpHvJrF/Wz6yru6cK9YDV+iIPfhSt2HZPB+D61L8UznAbNm7CKuWqvt5JesOMnkEvLW2v6yrzr6hvwIhkC182vAOfc585+ME0DaoHMZcdpfXZg5ZE96WsaYeyTY4drKtXLKc2oN6hD6r2iHeieB7BsCGspCqgzkFF7vFueYA3N8/f96JwQp2cTwzG0OLA1kcYY0js8w2qpODc4llAwDfW1cMiTBtBFmV+MgFYVyBShWZAhJ1JVDl4EfxkyfoDmsGZJWu6HYApmF6jj2mnBY9CnG5uuwBh50vFIk92ccAi0xWiA488veGSMrfog6P1zvOe1AEHk8rUeLy6lix4PjMkL+2lh4c6+Zf4ICHD4vuMlKFURIAXwET4vXBrQA2dKEd+fJ7pkzoScVfSalCG/5+OASUJOktrRhkEUiCAUKPN/9EcNu7WaA6bLrp5bG4FYIvKo3P/CAs2vTMWHzmH7RHATTxtV2O/5A== 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)(136003)(366004)(396003)(346002)(39860400002)(230922051799003)(1800799012)(451199024)(64100799003)(186009)(6666004)(6512007)(6506007)(15650500001)(5660300002)(66556008)(66476007)(66946007)(52116002)(38100700002)(8676002)(8936002)(9686003)(4326008)(2906002)(7416002)(6486002)(316002)(110136005)(478600001)(26005)(83380400001)(921011)(86362001)(41300700001)(36756003)(38350700005);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?/S4O6utfIyVH/ThbQupKTOBz+4/L?= =?utf-8?q?8Yv4ZVHzDqq83HFVo6CJENFC9RdTk2yIuic7VQmbpOzp5UV8EVcHZzYP8YMwok0F7?= =?utf-8?q?z+yQHrQSCz4moPiUakMX3z9pV+t7Phov7y14zg+9HVgVR1HowzF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3jGGDvjAF?= =?utf-8?q?gN1HZLbxVH1wcEyATuqgX0zv9H48OgYisXqh7d7ucT4wKICOD8saZUyuw+EgLNuAr?= =?utf-8?q?006s1WaBIIr11dK6Isa5c83OLhk+0F3oZtSO89L1gmmPG8i4A/ot9BBylPadCyOCP?= =?utf-8?q?Io3Yp7QssWsgVtifZhsHLUtnpS88YHSHBmIJ+gpQTG/OQSWVGRFm0suD6Uvrie7SE?= =?utf-8?q?qHffAoWwKhBGT3xzTr2+4rk8/DJ8LyS6lWSNZWbfEzBsXB3vcYMAG/7vAeM36TdDf?= =?utf-8?q?YWFedjRO4eELYv9i/Biec2Smc0oBNuTQysAnZrxnx7cF/AGm1Tc9GnEC/7iR39Slv?= =?utf-8?q?b6+A9W+pCoiHqJ7UyTbGCuEl4PHUmvJyOWE61tSQtr1OVHv6Qegfw99nAYi/kBH+N?= =?utf-8?q?sOUBkilDohDf5t6W1hK7tYnrz+nZjMMlysNu1m7380jpdGC9mWoJ6RcCghSaCyGFY?= =?utf-8?q?P9pesCTGLyiHXbIn3/BcMSiVCPTZIoQJOFRsggZiVaKlXzO4r/FBCZUUldXQF/gAQ?= =?utf-8?q?ygaCg2Ig/H7R?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 6a816271-624b-48ed-6e09-08dc1b1180e0 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 22 Jan 2024 06:15:17.1581 (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: /M4NLGZhUJQmpp87H8Yq32zV6p+SwTWgXlYpeUrXO9Xnp0UfGLBGTuhPbr1eV2K0d2Pl8ZpE+yQ2dEoF/1VuDg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB7991 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240121_221522_068389_9D4764C9 X-CRM114-Status: GOOD ( 14.69 ) 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 | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/drivers/mailbox/imx-mailbox.c b/drivers/mailbox/imx-mailbox.c index f2a21baded29..8506f92c0238 100644 --- a/drivers/mailbox/imx-mailbox.c +++ b/drivers/mailbox/imx-mailbox.c @@ -15,6 +15,7 @@ #include #include #include +#include #include #include #include @@ -907,6 +908,8 @@ static int imx_mu_probe(struct platform_device *pdev) return ret; } + of_platform_populate(dev->of_node, NULL, NULL, dev); + pm_runtime_enable(dev); ret = pm_runtime_resume_and_get(dev); @@ -1018,6 +1021,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 }, { },