From patchwork Thu Jan 25 05:20:03 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: 13530029 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 B3979C47258 for ; Thu, 25 Jan 2024 06:16:43 +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=2x9lREoB2RbenzhHlYGC9uHKso3AQRpGgRA/Y6cTK/k=; b=GHM3E7BbAciMbIV3LyTF3RVqd9 kpOBUZmMBnejYHmW1pw7PcnwnSswPfn2R5avSfP5xbH2AVKwAyFhq+j/GVViMZKGQoKPwdsc9uelu OBYFYhjCF6hPj5IkLJWqMtNdsAzSpXC7LuAYejigj5RGz0x0GJ5P6WUEq14gzF9tK74y6tGFU+JCx DM7k+PHwhAid948+BNhoRXlqZvMPKeR1A/w8WQfZz/dNl6P79epxpUfo+bJtvL6dtGXYIMLI74QUQ QWr1+N8Jg3c8lZh0Qj7l7oEL2Tb7hsChKJqHLv2qewig5YXTxfP5A6S7aDoEaFRIxxAtU3Cb6D7kl /0geRXzA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSt2U-006hEo-1n; Thu, 25 Jan 2024 06:16:38 +0000 Received: from mail-db5eur02on20601.outbound.protection.outlook.com ([2a01:111:f403:2608::601] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSs5k-006R7Z-2p for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 05:15:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=FRXlOW0OO6ZpcFyjkk7imr/GA0iQ1iI7PxdOljZjulxOtgfW0xoAnxXvE9ARo3rv1c/IOwz4r/s0HK40vtrMQWBXdWwj0bQj13rtABzuWGm3qejs15M1UYcyeX+Wvs+HpKv3KaNyEfGD6vlJEETE3Aqur4FKwIyMUBCA8/HjSNMM4qVOdtkc631UsOO2CF9qiohiwA/OARhsh9KPFHbe4WHYmyzpP56KeqK/S8+blaUqjkrtasQNlKOR/BVHrm6+oXoBrtMGbHxjhHnj8jw18IJQbtfEOB13ZNkCMrzHm/D67vliIgE4p4uLdEGn2wFd2V5jZgC3MaEHv2rRPL9Vbg== 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=Ee1Dli3O1FXVow7SMu8mJze7edWHgMfSVr6Wxc9+jYI=; b=WMc4QfAKH3Uvs4AKhEQ0rTD64Kx568D5ioKX2yapnn0D9H9gU420m2OXr7OxBQfHDUWKIfv64APUPbZ3LxwiBLcXYplejonWij+vPRUqCM9SWeYi1DaUa0PDsPVSlhN5X+baOe5Gvh51miBZfLWFGw9nRzJ46bNngHay36OHoYsCv4AbEe22DgBwpzAgtMB9xcU4jACT7FeHHhTfTRkW51TXuUy+j3wERauksiX9ZmIeUnhvOQk3hK8//KADW/4eX2ffXZl2BGy2jhLNOFUF9asUMuiYRN9bYprtCbnxltqg4S/17QF1xF+JrdMuCs8dbUlJYsJjdWmjzC129LXOnA== 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=Ee1Dli3O1FXVow7SMu8mJze7edWHgMfSVr6Wxc9+jYI=; b=kBpDiFnoPZ5OdLTP4j/UWfWigny9U6Kx8uWczefQf+glE63eqUuUXyb+2jHU/Z5QDqh9tyqRwcZfRlnTq/t9iEkKKsP+HXlL4uj+lEvM+MDmjqLYvbFaEdiPS7KNz9nSK6dfyUHNjPFseU5tXnqh60sL1wvM3i16Bml+CI6kIcQ= 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 AM9PR04MB8275.eurprd04.prod.outlook.com (2603:10a6:20b:3ec::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.26; Thu, 25 Jan 2024 05:15:53 +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.7228.022; Thu, 25 Jan 2024 05:15:53 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 13:20:03 +0800 Subject: [PATCH v4 1/4] dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible Message-Id: <20240125-imx-mailbox-v4-1-800be5383c20@nxp.com> References: <20240125-imx-mailbox-v4-0-800be5383c20@nxp.com> In-Reply-To: <20240125-imx-mailbox-v4-0-800be5383c20@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=1706160018; l=2505; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=1O7B9LF8rHxMfyFadGQ/lPlfemmgygQItpOgVsQLSyA=; b=Xui0n8jYHYXlRs2WLw/UISbfcbJwt+2f4LAhPyqjnTwWRSzWzWfzSUp9WbYXBZuVZw88FBmGP WMd0XYHCuzIB8Sd+yMh1vwIgAb0X/Oe7uCdEhUytOuONZRwTd8Gmk2M X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) 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_|AM9PR04MB8275:EE_ X-MS-Office365-Filtering-Correlation-Id: 8a7632fd-22ad-4c7a-8ff7-08dc1d64b42b 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: q0qy3Hac6o6N1aQAryDZecBrGKa27SEEgU9hqOijoEkmTgBNYJsHs+GI230LONu/EBOHY5BsoICp5aCUCb6SJkAbuLirVCLeCP4mh082mFhkiI1coZEly9VNgfDfE3AS77aH8d4s6ZJFG4RjhVsaYmGO+CyTddnDeOA/pc+bCM1awr1yArmKsCJ2xIDMjPlArw2qdjuq2USr4+BF14vYceC2KmrZ1a0M4/rxK+jQ+ubEXBkpBXueLZBW74yk9W/Q58uKBF86W0uizovqe00qOXMwDOiTxx6GZP8abs4WPB4jPOv1o4JCOIroEqwL6IsNuKcZ5gHqANfff+QaUCtDpyUgBMrV16Tm0bcXfEjZYfRIK0euracWJzkbXblWWIOtgMkPO3yGN/f+Z+PWFkevkgBudKUKCaN85LIX8Yt2ipovdNjgYniWamBcnwVbtvzEffRwG09pewNqcIfB3NUXBoJl5UJ6nt6dfp6vEJDlfVNkZHnmVidzZ5YtLkuDN3O/cdRLg2DFDfspZbQKX77M7qk1ftgWJZ9RNr4ShVUElTjP1S7lxNdKvjNPzCpaCSR36RPLls7+cXhq+RmTR++dvRmP4mpzZAKUJ7d8Wc6RoTjS7Sr0tIpJjExzc7pSIWmrmmm8Jg9RTn5robnZKd2vNtPFJ9JeyzcKWsLJ5wyLPP0= 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)(136003)(346002)(396003)(39860400002)(366004)(376002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(921011)(41300700001)(26005)(38350700005)(36756003)(9686003)(52116002)(6512007)(6506007)(6666004)(478600001)(6486002)(83380400001)(38100700002)(316002)(5660300002)(66476007)(15650500001)(66556008)(66946007)(7416002)(86362001)(110136005)(2906002)(4326008)(8676002)(8936002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?ePtXKPpoK0obX7HqrUNnBwf9yx4S?= =?utf-8?q?4EclGdE534awcJsGhQ+MkLfnF5a2CdWzibOYce0MRf2YyDXdI5VgVO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-8?q?lWOKbKBIq529YcFSfm1sfqcN2ak0WwmE049xnJ8/Dg0laMQ6rUbo8kOwJkUp9GDkg?= =?utf-8?q?v2uclHFxUrcNN9jWMlFyUMDkWD/y0pWvzDWKX9PKU66CtqFHfyaAEOCc8A6kVou3y?= =?utf-8?q?XhPP+zu6bh5VyDQNg9G/7WTrAPgnF2cHhJGKZQOoVtlGq/MpRwuWrh61Me02+KqWO?= =?utf-8?q?RxkGdg1mn1P8rr7lS04+XZo1d7xCpDt8NTo27a08nXe+wxAKODu/49a8doCHd2v+G?= =?utf-8?q?6U616THOo4V3Qzn9eWMTm0dIDNpwqkfc+QYLXRYmvgyphRfm320y20iHqXjIUhzaH?= =?utf-8?q?sY+yIzcFgRdDP2pW8OrsYrbr6H0l1Vgb1bTkk5bniPjURzEXB+CzKpIUbPaSnzKBz?= =?utf-8?q?AcLIFLtw7YFsKRMR+37pXqdx1u3+P9hl9MFdEexDn5GkrZ8zSW5CXPuVoRG0DrqKA?= =?utf-8?q?3AdlAfbGOBeDiofGVCpUBZqeeLacZHEyugVRhBXWPcqtNR89PEcYeW6y+F+r0MEJ7?= =?utf-8?q?s354dL714ZaqNEHvZF0ndKwUFAMApQccaTKlaRjlNd8yJZQiOjcMeLisdsxaN/Yys?= =?utf-8?q?P6wZCKfKB/YI?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 8a7632fd-22ad-4c7a-8ff7-08dc1d64b42b X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 05:15:53.7861 (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: uNHo7Akt0IUy36IbzgCN1COYxX7EF27DjNrFeXV9SHSWFMbid4ynPzkRkMlJvMb1hi6BrimqF7IIII/35HBHkw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8275 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_211556_919685_3374C308 X-CRM114-Status: UNSURE ( 9.52 ) 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 | 52 +++++++++++++++++++++- 1 file changed, 50 insertions(+), 2 deletions(-) diff --git a/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml b/Documentation/devicetree/bindings/mailbox/fsl,mu.yaml index 12e7a7d536a3..86759831b24a 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,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 @@ -134,3 +151,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 Thu Jan 25 05:20:04 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: 13530030 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 26917C47258 for ; Thu, 25 Jan 2024 06:17:06 +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=kRZlsiaAAuKXaYoQWgkqu5/r0Y cUaOLqr3pZgUFHLt8ffj5+PLDzbFUYDQU3S/0tN5BntsfsBtH63PEr1az1JEhD0dghrElafE5gTNA ObKXaNn+PBJudXycaouByJhBG7yiXwYbWYxQaa0kb6IGFo+KyEEu6QxVSb1AuiVXHDS0+6QPHh3do vIDHdz2o1bTJODiLcyksZZBw5qKpG4amqC+kaoVp96c4tmgGIa23vCndMYR3RRSEOqzXbh94g5Z4i UGw1BOtLaBdb5fTMuoPeu2a/t6nPiA3Yl1NgufXCPpR5TawkB0UGZLSDcdnCTE83orgRsQkmvIgU5 d+NIl+BQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSt2U-006hEq-2g; Thu, 25 Jan 2024 06:16:38 +0000 Received: from mail-db5eur02on20601.outbound.protection.outlook.com ([2a01:111:f403:2608::601] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSs5q-006RCx-0S for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 05:16:03 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=Y2Gi5Oi9DIQ/cUmUNXFtKVLA8Z+KR/x+pQdgEvzqvtfjNnCWGevthEPS4ZoPK/uO46DpyfCkzkfwD/9xp8xwNyDZFa5f9NOffgZUyA5Ewc0d1vOqOt5+0TzznHhBpBJgyCXMZqDaYSgqbdLjD0ofuvKP4KK5MwS32gHn/SOy4jsIqBBS3OWMLjncg5sv0t9Np2JQvsrYb4MUxg628rnCTHu/FOtw3yVFwVVXil0e4B/kXdiFbIcVYqUy1akNRpOY60H7HeCKkHPZfCRda5NzwKCKCNAm9qI0hIDWM21QfClfkKcpNNkrIhH9FDM+d8O/O9q59rOU7EE1Y+LP14z67Q== 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=YAdkZsl8gftGwXDX233yB2UPKe3ACyxCNvKntmsX1dKmqTUXdTFx35mvgHwPxZtfCQW2VQAYDzra1s8jpsOO7NZ2t/dPwhD1qsUz8h0vC7hhDn7TSNG4IsXS8IrLUHm0IjUV+ob6XckiwKsWA0fXBqwEUmy++GnqB5PCaHj0rYHIVEGVcJfY1sKeoWPoVlUIsouE17LVTGXRnO9o/rN7go/X1S3KPkc8mEI8+OR+PoAvQaaT+vLOpeCEXXe2acH+1kpnvemC2Jbj0hhdKahlmds7pvQDmT7Z3wX4PBkeUBQqcW+8zQN3eh+LZlfP2HwBXy0KiYpM59vLHeX5rqjpCg== 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=aiY0npBnoP+HnXAgmHH4I1MkN9VffurUBsUxhd7I7chuxpsHbB2vTCuFeyIALnbjO2RU4A+tiVEeW+p2SYvyIymwm9iEPsljcbgLcqxJKlVepwDO08NW0SCo1/AzsyKcKKl4k7nPhk71vsp4t6lw/QLl8RaItODzWTn2HRiJ2Mo= 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 AM9PR04MB8275.eurprd04.prod.outlook.com (2603:10a6:20b:3ec::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.26; Thu, 25 Jan 2024 05:15:58 +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.7228.022; Thu, 25 Jan 2024 05:15:58 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 13:20:04 +0800 Subject: [PATCH v4 2/4] mailbox: imx: support return value of init Message-Id: <20240125-imx-mailbox-v4-2-800be5383c20@nxp.com> References: <20240125-imx-mailbox-v4-0-800be5383c20@nxp.com> In-Reply-To: <20240125-imx-mailbox-v4-0-800be5383c20@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=1706160018; l=3343; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=+Gd+/hMaY4KbnLg+mAxCKcpz6HM1MVsMqwBCKUxGXc0=; b=jrGwXVeZrCtbYrIpbRKhaIScl3XUdA+WXHE/EacTeNle57CnLCZIKACIFeDK89AvN3fHwe9tI 4MDYljwA7q8A3JhGUFzit8fMhXe/JFzTG4Cg/wkmuRPNPOYK8fbwNH+ X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) 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_|AM9PR04MB8275:EE_ X-MS-Office365-Filtering-Correlation-Id: fd8404d7-f91a-4935-e6bd-08dc1d64b6bb 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: 0XLVHGm0TQtfyZ+GRaHKsRhGF+/pMX3u1nP3TzZaDYXL7xiHEbibeFl335IbROGydLawBqisWyADKxFrTYcDT5hnegbj3DGNwSICZ63BVLnm+UlN6vz3HHsewpljDIu9lTA+Wr0+vMfpC22E3sJv7TLae2gr7BHBcOCDYV5NfJYKQ74KbwLEBs9SY1NakFG3OQtzp4mwmd7O6tZdZ40dCQEm+fHjJhSkRoJJjJCZLELLvU1DwF1g6w7Z6FK5BplsJDLTBSTcT8lyRJ6Yjw0+oFXe3QzEwJ6zS8r/nasKHN49qfVKU1gWFWWm6EpASPdpQBIzjahN4W/bPPdBTnH3Twq1ioJvD2ZEiMI4wpU9gOmNYYh9yitcgZpqyrte+q3naHdcKD3jmy4eyl6/mREgD0OpUVgzGrHqqCrd945wFZG/MYxfO4uKEHDGB8ocIBE6UTkAKsQcGEeXgjf+AIGxF1obfaKhZ/6T9Z8nuucj2lBC5B/QJuLA4iG6hOvjKOHs/r60GzGzwVRQk+/r7eUxeDHl6r3qKAoo6BpHq+eHPr+cEMRjl9bEV8U8YOnGNzJLav5kEnZkV/iiGs2/ufDGnA92rm37GsgcN2ZszN6CykDpHXUzlf5kTzKqDWLUVOji 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)(136003)(346002)(396003)(39860400002)(366004)(376002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(921011)(41300700001)(26005)(38350700005)(36756003)(9686003)(52116002)(6512007)(6506007)(6666004)(478600001)(6486002)(83380400001)(38100700002)(316002)(5660300002)(66476007)(15650500001)(66556008)(66946007)(7416002)(86362001)(110136005)(2906002)(4326008)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?PhfkqOxQvIwRB6MA3Mc5zA2vXNVz?= =?utf-8?q?3Oxv+uvrElotAlPISuh2G0MnNJ67TD7Qe0wIUMSq9JJhgKOYbWf9OB77zwWRUVxgG?= =?utf-8?q?NeD0IBfOgcuLXxkok7yX5QNZM5SsXx0Ke0YWxazBYKoRKUldMBBRxV+TgH2T947JB?= =?utf-8?q?QaurYjnzkPhs63zNw1PbieevSCW9LMMJ849xDgsSMHQXv27TejuaBqZ7ePYajAzHw?= =?utf-8?q?E8G4/bUT1I7a80NAOYF/FBUdQKYfdgl5dEsCIH3ANUV4iKLT+gSut/0IC3xwvYv2d?= =?utf-8?q?sF2KNkfdJlPNEjFpGet5VvhZocdQ7ch9ZN6MsADovOpwA6Hu1oe/U45e2mLlAwhEU?= =?utf-8?q?4OYPLnmcwMErTLM8nSS5mwN4Ogq5WsQtezW7qfjvbZvT7TOmpYDXbZTYY/Mn0ZrU2?= =?utf-8?q?xiYS2R/mnHVCZ7FT4oyIZQkZBW1EaQAvm3SCP7TQUcQXZVs4nFppzL/NRckzjFyS6?= =?utf-8?q?AKdx6MRsONr8wNQEj/uTUK/vqgZ79eLTjH/DSGbnAVSbqkY0mFRLKOJdVWlHiRfiU?= =?utf-8?q?N2chwmytKniUYQIsISM0KXbmOlRCHNGDHtFZhi3Ju2auIOxhfIkc36joClu7nrE9W?= =?utf-8?q?2v6QMal/JDRxvMt+hMO3S1stSG68SUZO59nlrZsZbZnSwDcYyCG9woI2/vdvYebvL?= =?utf-8?q?dMCpjwQcGnQzDI0BkXJ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oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: fd8404d7-f91a-4935-e6bd-08dc1d64b6bb X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 05:15:58.0460 (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: pcxfgHzifFWKwc4xx7I5CJuTBUDhoEF4auJ4qkPLuTGTmGcfVbKVgT6rieC5BAEBYVUA/CsUI0+5aENyrCyhlw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8275 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_211602_209466_7AEC50FE X-CRM114-Status: GOOD ( 15.42 ) 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 Reviewed-by: Sascha Hauer --- 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 Thu Jan 25 05:20:05 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: 13530006 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 3E5E3C47258 for ; Thu, 25 Jan 2024 05:32: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=ALEYUvi6kxkXtbqXAOFtlvql1LoaRkx4i3oW3SAYhCA=; b=M7ImNxBSU+sGUdYGUC+wpTaUtC 12xlDve4Sel/7zn1lZ2jDFN4dU/AtL3l6aiOkNKuFURM7kdCGY59wVAvoHjCyjPbI1gtWjRwYqlLq Q0pNgmXps4O6ks2d60JzH/RTTGyINDpSxGKi1wWWAKUku5TYI2dWcp4MjlfVust+zuxAPKOi7ruQ+ R56j4Fg20nrXj1NVQLCO6J3tVIZPlMf3kjGS6k8diUOzLMvQnoXx8gbtza4faRhFQid5vBuVrJCQs lzqPkMt+9x7vdiU2zeFyE3N4SFIljpO3p83XLcLa2w7qqg0B/EB6lvPYLnCkE8JPBmPQ2wAgRAFhI Jtne2+dA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rSsKy-006V16-1O; Thu, 25 Jan 2024 05:31:40 +0000 Received: from mail-am6eur05on20600.outbound.protection.outlook.com ([2a01:111:f403:2612::600] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSsKu-006Uy9-0G for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 05:31:37 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=GFLAcAMOnlHASGRa3ggznNurU31C7OZ+vqXTDZmxA6qN85RTf6e6uc+yBWw6Jyc6oi4T+nXVgy+XCG7jPXxnJ7v4sVhsGRNg6/ytIkNsAsqC0JMQSNFscifbrEUluc4o49puBAhGlbCQU1xFcCbt9uY5eHozvJE5bq2htbKP8h1HaDkIETz9lV8WlAqCyIYMVxbGlVqp1J9L1rlbzKq4PB/S9eF4pIxsgRCoYfDHLBBBHlY/ZQroRFfHXMRq6FZB+tjKn8xWOhMg9eK1HkuUjdx/AUHmBi0Ll6lu1f5WxxVdn7Z4Yh/wHkGl0JyTi8TMItKwwW+7HqFsRRZ3nFYJ3w== 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=e8xvoDjMFNOaYYGfNaQju9Ya6oargDIps1jXsQasahHfZa8azDh4lY6Vm2XznbGahN5TyRO3R5uwkDtzG8bFv5aEGlAwqmavWYp8iluF8SJhDtQQaSWFOrNhdcnWdyI8Qma8S2FYa8f5VJwOKOjtAPicXFuzygsd9DWr7vy9keRE5I8WjqjIu7aqX+QtbMUT3ehB/9EDFhiR02Q5mbmLLXMbldl9boZ4xBOap9tWanS/31xW50ryIz8RP2AFAZwlD4mOjiLGfLsEr7XdY+UAoqSQNdoE9F+uk/vD4+QAPxCxWbsS7kB66CGjjYeXD95UTHf72XtjHNWSebF+qUyfWw== 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=P+GNyMdcmpY+aCyXqc9KQ4zXNSIZwSCjB2M2WExkmIdNmhe1twb1lIhGlDGIJUQf0BfNo3lf6Z9XZfilMar2QsnU8uuXBC9udccfOcN1jw/gwg4RQXsG3ZlUKclcow27/Wfr0cUomf8sBvmd93Ao8J7wSq5EtTz0PQ4J5kCcQDU= 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 AM9PR04MB8275.eurprd04.prod.outlook.com (2603:10a6:20b:3ec::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.26; Thu, 25 Jan 2024 05:16:02 +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.7228.022; Thu, 25 Jan 2024 05:16:02 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 13:20:05 +0800 Subject: [PATCH v4 3/4] mailbox: imx: get RR/TR registers num from Parameter register Message-Id: <20240125-imx-mailbox-v4-3-800be5383c20@nxp.com> References: <20240125-imx-mailbox-v4-0-800be5383c20@nxp.com> In-Reply-To: <20240125-imx-mailbox-v4-0-800be5383c20@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=1706160018; l=4299; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=SGrBffeqt2EmFannia/RLKGbk1G3zr8UaibaUsZBgP0=; b=R4B7JnzRAqG3ojY0Y86IJU0x3iLi7n945yzBGF7LlmjUggxllT7E8Y5RauMxE2UEc3x6XMl6N k3vhOyvhUy6AD2sj8epx7LcQjNY2uGSubQ9rI1Awa/qi7rORsdvK2BH X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) 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_|AM9PR04MB8275:EE_ X-MS-Office365-Filtering-Correlation-Id: 03ed271c-086c-45a2-4d26-08dc1d64b942 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: uMlW3qetcaOL07KG0vqd6u88UdYnN1LShS5QRwf2DkfBjsrCwmBMZWxcFNr7ryRyyC8cfgUxgyvVMqTTp/1bB5dTYuG/50rOSHxIxf8K+2/3XzGFauQ2uK0r3FXk1ILyExo6HArVnp8WSYEEj+aiuUG0VLEuK70cUCEZB1ddrz2Tsn53vtuV/fT3LKY15dm9O5npzlxF/Eh+Moze5tBVUCM5YScw7qUWJ/hiSJ8NilD4PUWFyQgQvxoXgCbIR44sHAIfWqrzyJVDl+N6fZD7A45XwOQwElWZckcq/RWnA7FbTs5ddRl6eWffF+oh+Z0Tf6v/x2SjfKYM/CpC/dnLSjLv2+dJfQwFEpNufKEb2HVCkRKwOKk/v+KSKBRauFOGLCbWhGYW3Z4XYzUdACYZ/uebswhT7vXKl400JHryYGNDyBRTnWLZ3Q/BomtMmRaPdukUjyIkqY1EwwjUxsIFdu/nbyh0nVpQPcTO8YaQF6HPwDu5o3SfQoFc8tjUxoDWZnECg7KNNFb6pN/zPXOmWgEd96n4KGCMKYhNDCoF+6RmPk0KBQ9jRg3MYwtTRII6ncML9/3EdexOcT1OjzUrTqdnGDeDFWryZecENN1bEhcXU3e7VpydxFc2TnynDu3WIDL7y4v60x6jCm6zJAImww== 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)(136003)(346002)(396003)(39860400002)(366004)(376002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(921011)(41300700001)(26005)(38350700005)(36756003)(9686003)(52116002)(6512007)(6506007)(478600001)(6486002)(83380400001)(38100700002)(316002)(5660300002)(66476007)(15650500001)(66556008)(66946007)(7416002)(86362001)(110136005)(2906002)(4326008)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?as3B7tI5FT7JNDTatJN9m+L7Hm6C?= =?utf-8?q?v0u/E+EB/lJdDPKIsGtaWjloZjEig42HEiq4Dv4c9SZrIHdpOaMyLiT4j9fEzVD1G?= =?utf-8?q?ti+PbOAiNTxShUylgzB/C2GA4kkfh+wH7HqvzLnD3k8ZpO09uYyiqDrTiqk3f+L1+?= =?utf-8?q?J9CvvJLRAarUcjg0TFcOrTrOd8u3gr+ILnAZP7zJxUK4JDApuFfn3T7Mnqt66ssRN?= =?utf-8?q?kmoQUGEVHJOLdZBQzfkz/cWyX2VSS5q9MUpnwWzvAeOslygl2Yij3kt/rg/bTqcDc?= =?utf-8?q?uSWNsR2JPTSp+oXgZcJzWtUl9DVWtNbNQ7oElA598bgFykSHcVCukoXHBm5If/cwZ?= =?utf-8?q?RZeoNPUQ3mL0RZuLVf1OLOD2edlax5eUQ+QdBlwvklfvfz0tIpfUG2ieWcyr4T57p?= =?utf-8?q?iK+gj6QOGO4EbrPRGrNilamyiI4xRk5rv5x2KCGrdlmBFwv/eqUs/RQ4ZPHHBm/S6?= =?utf-8?q?VP4u5NUW2219EXoplXFyCSBbUZgV1HgI7psux8dPp+6NeiRJhkS1GE3J0aLiQ3eH0?= =?utf-8?q?ET/nX+3VNxCXuTxDzGRHBt5gBIaE7t3XT5mdANEWoBGVZ8iC4Vpd3uAER5nj/JcpK?= =?utf-8?q?cS0bAppVZKWG0m1qIDzaaPWBYTIo5yYwy6g7P/ftTCrE6EbPTHaGwi9ajziX4x5AM?= =?utf-8?q?GQRr6OLGGH45KCR3q5sob0kur6Gr70fuR5sChr4JuBOiqVzAlY9FzaOPEPpYGkCst?= =?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Tenant-Network-Message-Id: 03ed271c-086c-45a2-4d26-08dc1d64b942 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 05:16:02.4074 (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: Eclb3f/oPAb3sG2oM2bLhN0xlFWdAfl8C4LVso0YXfBXLiB66cw8oDIhGWOOinMeLPUJZUDOfcxc03D/Sixc7w== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8275 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_213136_146399_0A8FF734 X-CRM114-Status: GOOD ( 18.98 ) 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 Reviewed-by: Sascha Hauer --- 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 Thu Jan 25 05:20:06 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: 13530114 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 26FC2C47258 for ; Thu, 25 Jan 2024 06:32:04 +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=oR3lop9HEYy2LQ7fMHPwJsGbcR MQP736lHqjD6+mEO/zELvCRM/dBNlZazb5Ke+uMhQL+w3HirJoifNy4mVn4NpCMgMVETJJpT27DkQ yoR1RphiiJQ57CYCvXqAczLCzp7T1FVEZPQkk5Zh0RVU7k3Jl74nqvBw3fezwtjNsPZjqoOteQzos EoV2hr4Bb6lB81Z6YMimk01w8QH+5/EqhVKmnvX/S5LMnSxUuYESnSY49BofrBFm0Lg7a2HRMItVD p5ZFqyAOwNgUmuUsTIVHW+1nzhbXcuF/+IsTQDRARL8YWWZWP1kVvleSETR47tPyWOKih1I3deg88 VKSmDbhw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.96 #2 (Red Hat Linux)) id 1rStH0-006msx-1s; Thu, 25 Jan 2024 06:31:38 +0000 Received: from mail-am6eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2612::601] helo=EUR05-AM6-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.96 #2 (Red Hat Linux)) id 1rSsKQ-006UqK-2j for linux-arm-kernel@lists.infradead.org; Thu, 25 Jan 2024 05:31:09 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=DmSfyqRCXJS3xTxd3Ov862jIrhIR1pW4yQc2x3KBWosanzJ+jmPiEgjDpOhaptrOhe8lq/85MdlhSU45bi4qWOWXTh66WlYLuSOUiTohFJxpZhJfXliDiLmtFtDI2nv2qH+dHpQG+EGFuTtClyN0UWOhMJpee0bS/K1tyOV4YkMVHFC0e8nsMq9YW0KIyADcX4OBedzi/AE7a1rB2LRNAoieYfdyFG+1tq0uXIMVapsDFjGZwLXaySUuaW4hTUTCCpsDx+Qy085pGEFwqLPMlb9cT5TZJWZUGgIxrs64mUhAIxlRcw3AFiOpVMX+eKb3zws8NFqnBGxKsrbbLS9pug== 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=fcqxEt33TibWvjcS/BHp8eoTaeR3D+xpStrOcI2wsUGZxC3HtYfzbj2r7Cpz21YUODj1nY/1Lzaa10h9V7NBPXgNprv2br4MbQ1wurbM9SO14+kG1QU+g0nGlkOqwxA5wu9CLBjXjcLw/FAuyg5hov/o3p0fHtdDZ2qu1Bz5LXdGut/c7WcfkRZV1GYcvLWM4d3ReDKX5Xds+iAwODt9T/3nFRrJ2RRz4OkQVB1sXuj6Pk2veITYGevTagGtwlRJY6///6TW/2x8cYjJk8XncLrG3ZEm2zpvg+KFGh6ieiHHsogdDkdIOwcJfuemidUNAir8XEhnP069zwU0cZgc9Q== 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=gbx53IESBR9/gUXHGl83nwoHWK9bHg7qT4n6wCJ7G8KNQMDU0O8de7/34UH+toERtzoADlceX9a7JAp0MZO0OstKa+iZzRDd8JSCi7U5EnIoo4JlPA5VlwlImmQMmEhiDnYu3/0x5KVOJ5+d20MzgYSZuKSpr4/aNh0Kv0PlDm0= 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 AM9PR04MB8275.eurprd04.prod.outlook.com (2603:10a6:20b:3ec::20) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.26; Thu, 25 Jan 2024 05:16:06 +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.7228.022; Thu, 25 Jan 2024 05:16:06 +0000 From: "Peng Fan (OSS)" Date: Thu, 25 Jan 2024 13:20:06 +0800 Subject: [PATCH v4 4/4] mailbox: imx: support i.MX95 ELE/V2X MU Message-Id: <20240125-imx-mailbox-v4-4-800be5383c20@nxp.com> References: <20240125-imx-mailbox-v4-0-800be5383c20@nxp.com> In-Reply-To: <20240125-imx-mailbox-v4-0-800be5383c20@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=1706160018; l=1973; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lkPMpPy6UalcvetyTqhwBLnqDq8ONTaWTu9sur2v8yE=; b=sKmTvNHtaxOL1fzrDSRxh6YTKrjr6sD9nWt/6AC/y8NZv589HRitd4ANJ3Dc0/SQXi55wNTGT 8+Li1inJ38TDG1BlqKurbW80YMCZKHXx8Wks4x+PyjfNqF8Kyb/awZv X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0036.apcprd01.prod.exchangelabs.com (2603:1096:4:192::22) 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_|AM9PR04MB8275:EE_ X-MS-Office365-Filtering-Correlation-Id: ea6ba22e-d817-4799-5d63-08dc1d64bbef 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: Hisa21zJ6QbjE64kH7JVF60nTvI4DOSt2nHUX09KMnusNp7F9JajCIKAEGn1YGhhJVeRXPD1XAAg83HoRGIpo1MmY60ThoNxgodk7InqUf1Jqh2VsefCiUN+oPMC6qZAMOutS7orYzKyeNqhgxBLYFYjZqqbrSYeLw8lsW72o9QELfbCmjVrwl0ke7r/EUYojuXeT0e0ZLhdumkgGwGzE9Qi5f2E5O//s80TW3rP9gZy1s+42W/tOftTDSyedwi1pOJqSksTPtAefBowKe3kMSQRPsN+Vsf3OBaNo6hr1Hz3qeaTTqSm+GsalB6a5vdI5lZA3KF2eII3GdhNjthzeYaa95+MWdDFIDat+/LWo7WSGr23TCYeqWceDYLBLqkHSN3ZrK316MfgmP5dWzkO7/L/wWc6DiLry+wS4xjEitt8rq1DYbNL66u69e2iRzK2bsi9VtHL7lWkeWIFTxunwLVVVvY2AG439AjzkaIjb7Z8x96jW5qmUseq8I/I2fbAAasXP7a9c6unZDKfcx1wzUhYg3PVX99t6noKJrO+8s4m2SlBjoi7KkaQL9Q74qnQu7UQ45vntmkjL1CSoB71cnqE20dQVIEOVRO2+5KBr/Oeur0C/kLHDSLNUV/PWOsmx/zbh4ONNaK5Q+3ZLkCjRg== 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)(136003)(346002)(396003)(39860400002)(366004)(376002)(230922051799003)(1800799012)(186009)(64100799003)(451199024)(921011)(41300700001)(26005)(38350700005)(36756003)(9686003)(52116002)(6512007)(6506007)(478600001)(6486002)(83380400001)(38100700002)(316002)(5660300002)(66476007)(15650500001)(66556008)(66946007)(7416002)(86362001)(110136005)(2906002)(4326008)(8676002)(8936002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?u6wTk4M8H2yh5zCrswcz0apXivuH?= =?utf-8?q?T7Wktn/qcZ7b/Ug9SPA6Cjrx/FhMRw9z9TuXdszAtK08QGOHFfzjLg+vfuNHCtsBo?= =?utf-8?q?eCkYWrpOhcGFs5RoEhAydCtRzGZoppp4Sf5brCjnce5gtZR7nfdS45KXTR7qKeH5w?= =?utf-8?q?o/CJavaHvV3eu5fpJnfhKMc8jBD2cCA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yY34SqVaX/aOBdVu881XrbzPvixh5uiGQ0OZtVzb2?= =?utf-8?q?Zn/gSoVPRd9Uy5tqqKujeUXIUGfkSaT1OrBxq6eSHrK59XNMyOTgvQ6IOL1JTSllo?= =?utf-8?q?tW7ox8GgqzpVtmuxBeTC05Wtnh+WWAHoGpm1t3r1rKIOY0SdH3Va0zodEpj7r4BdK?= =?utf-8?q?ktWHmCiYShBc81k5hIN//jKiOtPWKDUY6ynUGUkTrRbo5GJA0cEKhRWyS22g0Soct?= =?utf-8?q?q0nZeQz2D2KYksPbqWJM2BMTFp2Sf1dKOpUv9pwCOHYZ9fxuBt/X6TvPbAp15F+Q2?= =?utf-8?q?57zXv6o3VHqdhfdLX6dj+PgA8CdSh/SZ/T5ZPw5sEtbVHMBO8pS6CcUfDWK4cUxxh?= =?utf-8?q?ukopIZePRZKOvU4qj+5TWCm8WPmELBjJVUNIwcDykNBBc+xdxx22q6jqc0/v5gUhw?= =?utf-8?q?o7tZWSl90wECdGrB3Gw0QJFSUA2Fl02fXKJ2C/tbDrZmSl2weuSOPS24sGnt5VOIx?= =?utf-8?q?aVAU+ELTroIz?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ea6ba22e-d817-4799-5d63-08dc1d64bbef X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 25 Jan 2024 05:16:06.7790 (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: MbvgiRrlEUKCf3Sqx8Ke3EbvXmeniBYdoKaRCwo0InLf1JaAjPcpzL4Dgu/8UnEFIkXbT4n/8NeQa0L79hXQ9Q== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM9PR04MB8275 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240124_213106_915656_47A6B4FF X-CRM114-Status: GOOD ( 14.45 ) 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 }, { },