From patchwork Fri Jan 26 06:29:14 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: 13532105 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 554A5C47DDB for ; Fri, 26 Jan 2024 06:26:08 +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=tarZSzkp2NjonXeLrk6mtSvcKTwcX3gs7Au0ogqBUYk=; b=aJguWm4Ced/XwEHjdO9KzE8BIM KlEGqU1Amqnv/72j+hPfATeQc1b4YQNh3pdIrNujRxROHLn8HCCx+oCo9ZMZkMp2gl+97uo4A3Wr6 HRrHwe1lRUg+9DrMS0EkLf4Pcd3BDhCRj8v4JkVNiB48UPxXOeevIPvPGfsNOx66JjdWMzH7ES0HD 0tOC/l2LzQ98CNxfFj4IpcM7sRfv2uQQ5/ta7cheWWk0+f6fSLUEZWaLEbrJwbtvF6lZteHLfi87u E2NPTw8HUHeBwW0tt+lCkcDf3dHiu8OGyMobTocNhCYF7aYVWlvvu3WZRz//Sa5HMJWHMpsl7nigq FIVbjZ+Q==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFf4-00000003Eje-1Ffc; Fri, 26 Jan 2024 06:25:58 +0000 Received: from mail-am7eur03on20600.outbound.protection.outlook.com ([2a01:111:f403:260e::600] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFey-00000003Eii-2aoW for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 06:25:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=lnOWk708WgIN2/RBkHUX6pFPWN0Uir2SvTWo2E4271zWnQf9lpaccX1JX1mYK8k0UdJC/MWSTdB5YqbqK7q3fm6UI5HNCD0Q+bSOKXE0Lp6y/gB8PBxMpLiTyQSgW7o4JSUxjja8TYC4DiN8WKTlS7L1bIyrkWX+PCsttOJ+kC05iCm3HaeBQFE5RNAt7TAgB2Ls/Ciwz4Krn1SoW51AyZWO3ALRzcCO4zvKNPRrEdbE0XdSAsoD6LthLzuli1Aw9yT2gpbOdm+ydlNQ69iIK1SpkP/dPqxCW5Jov5cgaKfuUEsVH3wiCoz+oBpfa3KFylY8/kOTNcXfdK3+bFMV4w== 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=8BsEtLvK2LO5kx/XmsIcliJVjFv4jEF43rbFLLOuJOQ=; b=Yb3AC8Gq0UGUGZb/hqB3LozFHaEbKkgGSslA7xFDWvWz/piqLsDn0OaeZH1mhKQ6xpccCWb/n8jUqV0n0ba8B7w9HOA2aWLCeoDwyAmm+bYrj6QbiBcGb/1Ja8MtIxwfjGzjIRk9W+4/G7v+vT+6m3fsDcyW5cWf6kL7TOWn05NqHXxzyW10+SxW8aJNeHOFp+/txHUFsU/85pw6GdLFhTOj3sD3nU+bNm/Lmaa2XOOfIznmVsY7PvUvLpVamapVH//CKYcfst7UvI12LH6cOmGc9XuB0j89d83AW6yZWsWrj5wCoxJDJvICcYMN8bnVMZTNTXMEI3QAl4jnW5rBvw== 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=8BsEtLvK2LO5kx/XmsIcliJVjFv4jEF43rbFLLOuJOQ=; b=fQ5fkDb6Eoar2Mkr/wn5nybItAoNdFR09tg26lHC23AisaBVot2Y0Yc6mzsCl3B6UhwcOPu8gbgCK0HMcc6pWbxdT/p1+bgbtZ99fRzDKIiFvR+SKQMs6T4MCUKmqH28kutI2ELc319DpPFQICOodiDDjS3WLt//ciPfP7Qom44= 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 AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Fri, 26 Jan 2024 06:25:01 +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; Fri, 26 Jan 2024 06:25:01 +0000 From: "Peng Fan (OSS)" Date: Fri, 26 Jan 2024 14:29:14 +0800 Subject: [PATCH v5 1/4] dt-bindings: mailbox: fsl,mu: add i.MX95 Generic/ELE/V2X MU compatible Message-Id: <20240126-imx-mailbox-v5-1-7ff3a3d53529@nxp.com> References: <20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com> In-Reply-To: <20240126-imx-mailbox-v5-0-7ff3a3d53529@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=1706250566; l=2712; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=TOwsWAbXauMQsQBj77QPNsiLkiJ9S+3QBpYZUzgpilk=; b=ee7xilz1WrxvID9wR7kHpZbB+sFce3HHWaZsVwzk9NToX8UoN7a3hOcUcPIURlg0KiQD7bM3U Po4tkFY/DzLCItD4rxWNrktUR2+PiDB/NRLjJt6g823P4Ik4P1MIU2F X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0215.apcprd06.prod.outlook.com (2603:1096:4:68::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_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: e5abe841-2b67-46a9-3efa-08dc1e378710 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: yEHRSIhMo8tMexeqpZVX5W2vhMcMsnTOMFxB9nlnes8H8hY+EyfKbjjQDAlGP2tfuPtjfK+o9ercvsVuxUb20+PgNZiYYl17PCwHPoGtfLteEhGAsFsJYVg64jqO6HLTDCCHdJAacszf3Bg4LT+NVzB5bGVLDD9DcOh7oq4ZhPDd7VEufvzINkJu95rdgZey5y6k/28fRqyxnu4pEFtsCehy64G2EzYhurZ3hpioO8aji5YrkywTCl12mx5bEvT0VAeP8TcWGIkTAd5W8stf5GdCB30vB7B5hXWlEBAWknpFftya540qgIzKogrpFFV24aNyPhocH0440RHCXgXI9rPbMH6OoaITVBBeJ7xkZpPScLsxtMbNCxAgRIAXjkLre7pIf08UD3XjeQV2H4+YL5hESnjq9rT3bbYXhy3u3MITodpboQXTcZn56AMJYfhy3d6RhbPXx1mSsHa2GR4v5rNzjvJ3TV4wtfIyfqqfcBQ4MkAIogkkBJBJYhks0VwIuBZljhtjFtpz6n0YfyWitLd+Qq0c+omGsGqbEh42p7fCOy2cTIQFtyJA7ImxJdg52gZg50qOLwoXkedtIVR+FJQCBOBnS9ab6y/t3xOxpP+AEjE8svrLZfV6+oMMr8KzaXoOSaA9k0a9jEFfQ0NwV5VEg/mZFsPwjOvGSaLzFGE= 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)(366004)(376002)(39860400002)(346002)(396003)(136003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(52116002)(921011)(38350700005)(478600001)(6486002)(36756003)(86362001)(26005)(83380400001)(38100700002)(110136005)(8936002)(6666004)(9686003)(4326008)(6512007)(15650500001)(8676002)(316002)(6506007)(2906002)(5660300002)(41300700001)(66476007)(66556008)(66946007)(7416002)(41533002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?AvchnBpaz29Wtj9tMQuiDumTdc52?= =?utf-8?q?JFCgtGhARK6KkUI4jzSiGSabQSxRRFc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Aj4phhs42rA9ptEblyGpi3r2qCaTv6yw/W0Kpu1tTum5wmG?= =?utf-8?q?onR4WwQDnPMwz8PeWnO4mXf7aNf6lTEYyxFFnf1mnTZJUKb1O8gRoQ5uz3oPmnerf?= =?utf-8?q?WJyFDkj3Uf6JziD8qjYtNxmoJbpk8rVU3Wgw6tdpsjQxXM5FdJ8zrIFO7q38Ffpqm?= =?utf-8?q?UrVJdaIeW1JVSjWz0mWawLWS1dVOfX6V6w2ZP1zHSyixn92nkrenMzZkyRWU2gHzF?= =?utf-8?q?jWPIdTKHa3M6/oR7+JXzqyisBs+uMmDIGwNMD3Hc7pNxHBEHhHQik0rs4WOLrUoqD?= =?utf-8?q?XxTNbZ/rnHXoWt590eP6ddPBHCZRYmyXRlZZKc98DM7vzjQnFg1xz8p56CpcrDLNt?= =?utf-8?q?pURnEBDzGd6rbUQAD/q1HFj95WxqisZdkcIirv0U/7wcQZG6TmXHrDSY8k1T6R8RC?= =?utf-8?q?H4KAv/A2KdEyapPYYdwclTU80j+a/+Lmd6nSkiyfCblGUFCFwZTsB3D/ATZ4WPQuA?= =?utf-8?q?hFlob5lPE5f27nCbuVoO2yfvcKJTaTdJwc/dygfPy7B1HrwQ+iuxerU91xQDCipu7?= =?utf-8?q?rYY18B6PY8i1gZMcMisZpROcsch6xlPEHesWS2Oo9d97apj1AFpvSFOCp2jXWrnwM?= =?utf-8?q?c+DqYnZH3nQ9?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e5abe841-2b67-46a9-3efa-08dc1e378710 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 06:25:01.9054 (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: mtwVNwZpUQrwjveleuNTyqumloeCy6yoKfNVvMgKi83t3f9owzIQ535Jf53WXNqURJk06Dl8ayIxJ2Y1+MFuWg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_222555_761488_18696E90 X-CRM114-Status: UNSURE ( 9.45 ) 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. Signed-off-by: Peng Fan Reviewed-by: Conor Dooley --- .../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..33140f72da6d 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 + + mu2: 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_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 Fri Jan 26 06:29:15 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: 13532106 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 369EBC47422 for ; Fri, 26 Jan 2024 06:26:14 +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=FwnH5Vleq2EA5TDN/QlGnstNxZ uy18MzzPSHo06PSmXlfcNHCtyB6x70uhJ18miPf6iT3Q7CwK+dsq/oC7VgGiAsDcnzJhE492hoLc4 tC35XEbWVpyiBkeyBcN2D4yP+cxiD/DNOMuXd38YpHcbQidPuxWdYfBv/v3wsYRqX8lZDhbQnq/VZ v1/8CkWr0M0B8KBgoPJYuzkqIObNlxGlqMxQ0EvPwBhQs9+ngZhr+crLJMHLIVyris/PWyVhZNaK4 Bqpp1m+vJiCc50vW6QhB3MhLq0kSyBKD8aDn7jT4PmhjNT1yJev4p/TpfpFKebWNzo0yaeT1BrTJd Jf5zZ97w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFfB-00000003EmA-0Kcg; Fri, 26 Jan 2024 06:26:05 +0000 Received: from mail-am7eur03on20600.outbound.protection.outlook.com ([2a01:111:f403:260e::600] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFf4-00000003Eii-1Jux for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 06:26:02 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=WSO6PdL43qxY7vPj95mFGn4P/GkEAqKKhi6u5bUpCMMS6rl522jT56+LwvsQ5+Ef1yV5uGz4zG5mkRuDAS48XeI1w0ltbDDa+VhKl6mRrhxILUl2Q4cB1azmZXc4Uwp7ASvQi4cV3wIrj8IdRUUSh6d1cKXDL5dsKvph6BAsOR4G6hUsLx9neBnIu39rwEfu4Hg7TMhf9ZdkjKTTNh805FKrq2fUIQ8KBHPvWop5vXTk18Wtgu+jFitc7wb+lnrU5jApjpCAcUINoFJt8ImaLEUYYYFHjyPWfUO+95JFZv7pxlvw5OqBbgd7SCrFR55mQkrFX83IoThkV5rofAy4yw== 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=FtgGTUfbTf3FzRv3GJBhR/uhcCEexfnII0aaOLLv+Gjo9Uq4QwS05V7XLrY3691g5SH4dIPSywB5CanC/VdfmERbN1eK5PGSaud1oTi0SrowWkCVQ/PbSZvAESvY8hemPdrBamLfMm8e5li6s1UnJ0b9rCDNEOFNUsvNSTMHwOWKgeYGPvsj+1OV/sO5TjMAIwYhHslm6ztRyCvnklLi4O4iVjhKUkxbdfdJtUlr14WbiBAodlKDyaraTCysG6bopOTeYat2tS8BFbwq2Mv5vLxbComafVzkSLLwbSOtmCRH5Y6VKQisM7gLBxIkRnZEFD2ojah/I1IMEAl/xHi6Mg== 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=Y/wQuN5htNJhbCsFEHzYhvI81xtMvI4mQ3YWqs2xzbJVrhbnzJxW5ykIOtI77UBoeo7aS/aALZmpQMUTJ/Wi36vaIHvvODvlbOXa51qQCQ27o2p+t/QtVdeU2IkMh4EYUadxibtJWW6zQaTvNrwmlnJWYx7/DDjLYdk1q26Qv4Y= 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 AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Fri, 26 Jan 2024 06:25: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; Fri, 26 Jan 2024 06:25:06 +0000 From: "Peng Fan (OSS)" Date: Fri, 26 Jan 2024 14:29:15 +0800 Subject: [PATCH v5 2/4] mailbox: imx: support return value of init Message-Id: <20240126-imx-mailbox-v5-2-7ff3a3d53529@nxp.com> References: <20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com> In-Reply-To: <20240126-imx-mailbox-v5-0-7ff3a3d53529@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=1706250566; l=3395; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=S0DKuiQSDcYtu53JqBC1+gV1zoHcWj4DjQyGEWhlcnk=; b=jzwjXdk6JYvqSvpdfhj2R1+TiUmh6bgnYKbWAMzrwdDXFeyfpWI21aOV/W1MbJ9SdcRl3ZhA0 T50oGZzFFiwBQZ2hnG22aAFHll6MprwOfD1g6baWUl2Twy0gcg4eJAG X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0215.apcprd06.prod.outlook.com (2603:1096:4:68::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_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: d287da3b-962a-4995-28e8-08dc1e378996 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: x3M4sOSnCP/lmFZMkyhtS6GAeQTXI5h1xbee1lRwwZs4oYlcf3NtAOVSJaHiBDEYIW0r8UU2kT0HsMxz8uJEvV18S+m3+F2HPzYqZGvkYPmZMRFM+TPALwvm1wErzRRaypuf8sMB9TzXgKAbHxoBY+nhS1dHK2/Gi24S+xBWzwlNBsP6qw0uJKGgkTGUs3jvgTN1PPC5H/THApIWa6lZuKf1a28ZgcpmbjLsVa17LYnNugpL4onkFPc0Zp+QbTjZDfG4t5cDBncrq468hpwaYIUZdvG3w3ZYv5JqlwTZrg8lDIKvFqszFwnYyq+4MlBMUO+D2qMdsq8rNcGO4P3xd4+ISdrO+L7K67H2PBsUTVydPd6HoxHdWVzuj/HHgX3JvXXRkmW8G7pKlpZF7tw4qSl7cXl/Cr4/lJa0ts0bvb9vp3ZwFOZUJq9VAuJXw3IiSGKCg5S/FVsnnnroFEu3PtlBVOzgiYlrugBHHzi9ImeIBXoQLjQsYeDoDtmV7AihKC/+Ihhe32Hy8lqKIOwJ6DFrmzbtiUhX5E/fkVWt8p/e6nsDGBnvXlvlzqMFK8C1rDybqrb8AIipm50XpuJ0/OjiN+0A+lj7JjSUnulfChSav4Lvj349ni9ogZdWTZNU 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)(366004)(376002)(39860400002)(346002)(396003)(136003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(52116002)(921011)(38350700005)(478600001)(6486002)(36756003)(86362001)(26005)(83380400001)(38100700002)(110136005)(8936002)(6666004)(9686003)(4326008)(6512007)(15650500001)(8676002)(316002)(6506007)(2906002)(5660300002)(41300700001)(66476007)(66556008)(66946007)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?cpZjyCVzxJQP2wRgXeSeV9tEEYSn?= =?utf-8?q?FmacGsZuPkpPWYKbrPybMNHIewLsnAFCQTUhoXUdjLAYmmCrC2lLbT1K28yYluLqc?= =?utf-8?q?S+K2YtuINoyDeFgAdbEnc2xvE7vjfWSk0id878CQnG0CkUzZVDNOTTx7EH9Qh77/5?= =?utf-8?q?4ZLIoQIfLqKLc6gxcgHENSJTw35hU+QoojQXsk0LsiTQo+A8UhdYXjfoWMqZ+jLbv?= =?utf-8?q?fYXcfZ+rz78Bg6jQMwUAzedipwYmrW33ZrvjEZHiLGhr3bsgFVOUWGOCvzBEjX4To?= =?utf-8?q?whpNPKS1FyjMnqcslUR2wMExIb+o1ogiYdQMXGg4LlHUmzleB6ewPmIWRPYQU7puO?= =?utf-8?q?Kco4f4kuV/lzx9Hqtt0NMCai3k7umukeGTIn/FAeyYHH4qkziWHvkOGwsJyhf5M8R?= =?utf-8?q?BVIeOX6lyzRbTlOZkT7Wcvf7WhdvAbI7Q9AIkyai7/JnHl+KUPr83DA1uSs1yoaPt?= =?utf-8?q?/7C50X978vuC2NoxYf+i4N29wRQXaz08T8eeQdQih8sUIeEwauHs+ZJHG44Z9NqMJ?= =?utf-8?q?RP8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UxbLdlZ9SN8iGYXH1KcivjjOb9Sng9zeKcr8Ebb1PIrdJI9H1z028yLor?= =?utf-8?q?k94WE9mmj4aBt+eS9D/ST+NRP2/vTnlW7t90PhIZyKN2JAdRZE5m8DTav5pVxX1wt?= =?utf-8?q?jnR5WBCAEQTo?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: d287da3b-962a-4995-28e8-08dc1e378996 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 06:25:06.1049 (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: 2CU7wChIrJOMAwOrGvzY6SBmilILBo4u5OvutqfbFwsexWWO3Lh74gceuOBXCyLDEjUYtZdYcs9TrUDNg6Q7Mw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_222601_150000_BF2E98F0 X-CRM114-Status: GOOD ( 15.15 ) 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 Fri Jan 26 06:29:16 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: 13532118 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 ADC64C47422 for ; Fri, 26 Jan 2024 06:31:20 +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=YXYeuT7v372ccr63Uj200kBYAh H6VJDIfnViguwPkBWlOYcpDCGW4z86KFkRBhT2lv1HxP+0oxjVAqwjlqBn9RD84I3PiHQ0dumzsTk FJgJpcS9AkmUedNAVSA7YNDLP+IDw2cDgOj7slMge0Sh/aIzTfk9SpqO1Rl2q8Ch6lViVncmVV5We QNHH7y8Z/Gg6dO2yRopAwUatTgoOyWKfZm/jncSuQTTpEs8HjUiUMVZJR7NRyjjjEOcnBUuUgOZ3Z KlgbEBZTOLnHj5UGJnN4HM3lXwOr0aWMitbOWEFK//JbXbPMNDqgUsXNRxFc/IFRu/jQENxLFohqB KduVIH8A==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFk5-00000003FSH-0tDB; Fri, 26 Jan 2024 06:31:09 +0000 Received: from mail-db8eur05on2082.outbound.protection.outlook.com ([40.107.20.82] helo=EUR05-DB8-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFk1-00000003FRU-3bwN for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 06:31:07 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=OWiyYbWUePhRkqPLw9rTIreo+H/tqJwswxO8/F20xHB+FqnOEVd1DdM6KofgQb/HcU0olEctPFzNGXfHUwscGp3F2U22qbmPYtepnqQSndMWFeeFEVegXDzHJcpsBMCXy2T0jcGo4R68wsJXbJeIYV/9JpjGX7OzWjy3G2i9uY8VAhhQHY+cL4BeyE43MWttqN1Sf4CCtdtr7GCy5hI23sZSoVboCr2LZe0V15O4YBceds0a+R2fkahTea8WisnRs0R9CEXTR1HdyPcr/HnObYmBUuzY1kn6BV8KITKZDO0B92x4fghrOgtal3AkKCsMFD4M8kR6/KLQAxCHmVjP2g== 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=ATJQTBbOO4Oo4hkDCXX9I4MCJo8UZ7sFRGcbzzMrtovd/v9IFjvV2grZZcI9PAvYrmdZWxe8DzI4Fz1L6vZLYYfqvaRexfEIps14HidNlk/GiEQjCWlcIZ5bXrTJiWmmoKksKz0Ql4SHFU2r2zl2mVrx+vbOWLkX0FARfghrrWYzw/0Qkvipzo2J/MxOw4ymckpW2QoeYLOodTAN0boF7x8Dv788wP9Sh/q4w9tn3W8YEue0tMTFnMO1U1OAj22LtVD4umWBYE8bRJtZYcY/guMhdpMidpN0y+69kTolm3DUJm2oz8RVs1sOJttmUA/uR16Sov8aPiH6eDRBgHmumQ== 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=BAbv7aNGuM0eyrgCKckb/5YkfbhaarbTjr1gk9d4wYJrs+zlLo+Pv7ryPQXAvClwszkYKNyT5MoQ9AAJfxrz1nPJLdleZIOGFt2qh40sld7pwGxxd3JO5p1ZDcGQSiysJ3Qenct4xCmZkPCEpUFawh96qoYJVgSh8U5HFmo6hH0= 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 AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Fri, 26 Jan 2024 06:25:10 +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; Fri, 26 Jan 2024 06:25:10 +0000 From: "Peng Fan (OSS)" Date: Fri, 26 Jan 2024 14:29:16 +0800 Subject: [PATCH v5 3/4] mailbox: imx: get RR/TR registers num from Parameter register Message-Id: <20240126-imx-mailbox-v5-3-7ff3a3d53529@nxp.com> References: <20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com> In-Reply-To: <20240126-imx-mailbox-v5-0-7ff3a3d53529@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=1706250566; l=4351; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ZIPe1ShyvGcJ7GWp7Z6UAmZB3DJN28oXn0B1jjJz194=; b=xIqAmhXo+Q+nsmIkZUvmIxxHiQw3+Eka12KjoYQknKGh561X9rhE0E5gHSLmIokCYoXtSteFb X6QBl+eraH3BFZkqUKXUm2P5v39n63aJsvQM5Tnm1y2+li0KvXNEUav X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0215.apcprd06.prod.outlook.com (2603:1096:4:68::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_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: 77764ebc-407e-41b3-5f8c-08dc1e378c16 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: asFVqYRAsEM4yfTFpoeGCHh7byl95DdsEwccjJQH/MW6ltxto/GQlF52b8k0N8N//TJnfOXqaDZUL5Vw7jpAJzAuOwPnT3dkuol1dB4D5h7NxFuOVsvyuFrvDor8b2O1jzxFEL4qm2gWOxBAWHIcHU1HV+hW9iHY8U3nzFvYWeAUPF8dripCeObBg5x7s/hBAL3GqLvj4g7QF951KV0DDMat0BnXa8rjS2t5L9UXi/BvnKxnxuPJ48e614wsVJMMJ8u06b3iSqA9j54ZNw2NZHmLl5xCzzjpTtE2n4xV0+nlxIihtCbhXM3x1OoP6jYyM6pVfHzTGvWYJCO6yvFZuJRV/8/KE0uXld+sV/7z5B3c3NaaoJ7z4ChquD8MyDR4qKXodtHMAoMuDvw4TwgurEyAmKujvECyS5I4ftPSibD5xXY7naqRk/UVMMd4yD5hygcY4FdeXI88y+//gHogrZ/U//DNwXZzCvViYSGJIyzJub7n3U+lXr2DdKTcJD7vkmLA/A2wVPepFbjtQ3ZBK1FkeIl7la9PV6Fg1poa1EiogknJG2sphcf4muTNFyuPt1qBBjn87pISnYag7en5mey1wnbCkBW3N/NawC4BJy8Cgf+tDEmeRPN2B9iFrVX3t3WA/jRTL0ATAkdWpOpNLg== 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)(366004)(376002)(39860400002)(346002)(396003)(136003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(52116002)(921011)(38350700005)(478600001)(6486002)(36756003)(86362001)(26005)(83380400001)(38100700002)(110136005)(8936002)(9686003)(4326008)(6512007)(15650500001)(8676002)(316002)(6506007)(2906002)(5660300002)(41300700001)(66476007)(66556008)(66946007)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?yqHS2ebifGhY9iad3ATxJNxuQCkt?= =?utf-8?q?f/ied70i6mPV3td27Vd+0K6BHNj53wtFoNe+WLV6tEr+3suu3YIWdxQnzfyAmw55M?= =?utf-8?q?+cInQFaxsHdf1BtWa1fZSPfUmHOExA+DEfpGHK8LDHLIzJmdJe2SZrnbdPn7CCbI9?= =?utf-8?q?QhsPubYUyhvTv25d22OUhHPVOILF1xbqEzOe5UFnbERSuCpe8FR/cDSMrIDg4Faql?= =?utf-8?q?igGVWIxV+C0lsrD2va+r6jmc0go4M1Ybk8Rc/8THcDW+LfOBv3F6NDfIOk2xjpsuz?= =?utf-8?q?TBbVZwqpc6B26zx9Q2XJMA3Rfs634RNFOtvTzvQN+t0aR2kduUd64HadJXXJ7w7SK?= =?utf-8?q?i/iUKCzkpfevtpkKnx6MTTJ8zCMFWOFcz/syHUvBbZH9xbqkgPP+C5+5xI1E1G21i?= =?utf-8?q?MFWZKY1CeohRBojDVtwNMTgnvGHImKhIc54e/00IPBdtY8vdJTvN7RIam5h+G7Cak?= =?utf-8?q?vGTooSjq+JOyX2I/d1nmOmcWYcANrF9vKFYfdY+rP68m2AZl1mVt4wKHmAQsdVXO5?= =?utf-8?q?YUaiPEsA3PmXQcnUJ2w4f/VOc5uWGeSg6OO4CWOJ5X5QL8M8hQAT9hqoFtFhNglvo?= =?utf-8?q?ZCFdo413s3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632fPqipKGAV/ooRNH4kgIoiysHfOgZan13O7C?= =?utf-8?q?PpXR3YoGwoSZ?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 77764ebc-407e-41b3-5f8c-08dc1e378c16 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 06:25:10.2856 (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: Jk6CKcGcVGJEnwb5I6EaoSsqP9vEO881ejfVZHgZOK3omy7pYHL6+yVav6x1ADk7ZQq3AA60OEpayANeUXZxdw== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_223105_944313_76C6BC56 X-CRM114-Status: GOOD ( 18.82 ) 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 Fri Jan 26 06:29:17 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: 13532108 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 04728C47DDB for ; Fri, 26 Jan 2024 06:26: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=TRBGazMG7Y9Ndmh1mbxDlzXxq6Qort61W15nXePTKco=; b=JmrUzNQgOYPxrhpaQsKcMdIX7/ KoKvfNN4z5Gt3Lj/IvgZeq1Oa15tgSK9BO98d4cH3Ig5Fdp9qERFRx2cMU0QjPP8i5WnyJxidkcNl 6CklXlWvMqNFTSfYRb5dMFc6d7NtTpyjSD2nYirzWrtikUniID1yZYAtG0qXvP8KhI8o3LkgdnCUJ LBjPJdB/syXRmGunu9rwe6VHvtD0hZWdnpsUiZwtdY2XAj/hA8JSrBdzk7b2h+gEqqnMlo8UzMOQM w41A/Ape9WfjuqufIfYwTwcs1GyAfzZjplweSktE296kUWZde7wQjj5aPxnT0bVAk4NGWTV9UEpGL 9U+em4Vg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFfe-00000003EtE-3Nut; Fri, 26 Jan 2024 06:26:34 +0000 Received: from mail-am7eur03on2075.outbound.protection.outlook.com ([40.107.105.75] helo=EUR03-AM7-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rTFfV-00000003Eq5-2t4r for linux-arm-kernel@lists.infradead.org; Fri, 26 Jan 2024 06:26:26 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=XsSKWfsr0UXzs7m6G3x5jucnyTFHoZK8QUzkLSHPSRITU+SE6XERYtsk2wky36T0sVK6Jpm+24EnZnRMDmfHnoslxgXClumj0AHp8LuIVsE3VCerZHWzg/eVLrP1Re2HykDDpe9AfWWVQNEucn3WxCSAdUxVIDF0ZKvg/+nrFSXduYIsdTbhmVMVjd+B8q9TylbonPOn9NGyVJLvhMK1ve3HzqEXR7RFdaKb/FLPD2Lf6qLToWGr7LJy45VKchdRVIGPXt/AjhlhnJ26snZMCUs9N/oFznuBSdUJT3g6VOe14nJn3l8p3EjgzjDNK0vS/5AF0ChJJ8caucjEr6tMXA== 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=L3MZJkY9Ae93EaInZKmSWDAQchsjgpRTul3GD2MoU6nzEYsRlVaNoN34DTdJcqgBzLO/az55Z/Kwj4U/W4/SffBTXi/u/O8ZXWlr251+AYphLytAbLldvWTfCEGsA252KA0oVmbO/MjfvF/HsMJAEnzPzFl/whQVZDSdahHBLbXnAw2s57KcnAo6LTiQnAYodhaN796DfVbkAAHOCmBPxXf/qvPyeds9j32qt1tsEQaIyfaX5q+5JT2EI+Tmdr00pd5/S2vKIkO41VsayEuRgc2R6BUhcx2UIugWJDmI/ENTXHg9riDefqEVW/fPcpP5q2xWp4z0yAKHSzZR1W+sYA== 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=kcmu0JYXmILovr85af8NoX6xa8g/gyrmnD56roaP8Q7rCb8AA2YCz5e0kJk+RP8k4kLTVglgWSZ8t7Ny1MLKIojULIIr8H3cbcPffT7ehMNyWQU9SNFtFLCg6qHbIWaIQQxT7V8fdGapz0eFXs2xodi0Xnhme8A35PmAlaJkSI4= 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 AM0PR04MB6851.eurprd04.prod.outlook.com (2603:10a6:208:182::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7228.22; Fri, 26 Jan 2024 06:25:14 +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; Fri, 26 Jan 2024 06:25:14 +0000 From: "Peng Fan (OSS)" Date: Fri, 26 Jan 2024 14:29:17 +0800 Subject: [PATCH v5 4/4] mailbox: imx: support i.MX95 ELE/V2X MU Message-Id: <20240126-imx-mailbox-v5-4-7ff3a3d53529@nxp.com> References: <20240126-imx-mailbox-v5-0-7ff3a3d53529@nxp.com> In-Reply-To: <20240126-imx-mailbox-v5-0-7ff3a3d53529@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=1706250566; l=2040; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=lL3X7pJ74yWEAfSciMF66PVspSe1EXpJ2ahQLd5ain4=; b=J+poOS+xfDxcmBGVFyHoworU/w3Yx2Fc3hqow81smu1OUoH2vOZeZuv2pS+Cnn/8HT2j8PnQs G2WVMCF2Fc3B5erqavRs7MGGLf17tw4ntQdoHxNr/U3fr4B5fOhHdUw X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SG2PR06CA0215.apcprd06.prod.outlook.com (2603:1096:4:68::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_|AM0PR04MB6851:EE_ X-MS-Office365-Filtering-Correlation-Id: e95fc1ac-e4ab-466e-45e4-08dc1e378e99 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: zAqHiP4JvaH4DI2mRnM4WVW0vOjxxHBNwO7EHg9ZAsFvmzTJCjjcxLXQz45c3X6LAel8VMRomcidwoOM/c552xbTH45ml9vf9cNk/1vQm5BOPnRLpySZ9E/aRKdx17xiSxgxvKA3QaxBQrxHXcRjH1hBrBxttudMGd7GAbT7fH7rbaIxxc8dPQJb4gJoUPz+itNAj9NMiDkpr9/9jx7Ym2+ZBhs52jVftUZnpn1SDAaPZiaqp7aaaBBby8FDt4f2FSqXCGkrxr+gReePAKvRztoVVgj/0IB9mym50kNlxfyrzHM20Tzd4eeRO4sQbVGgL09VVeRZLdNdUlwYriW8i1nml05CzSxTF4Py+EW0m45M8F5PW6W1I5C2DrPPgIRT2Js44FCpoXTF49EOSn7srIjYP0+k79QWyZllPhFVds8ywnvxphLV1t3928lC0pAnG0Fn6TuX66ddpzI9lD+TFRs3sCCKyUZ/uK7tPsV2wUaPq1EqKZTywydcSTxGQScw3lq4Emq6hpyFtlW1XtobRsaCi4Oah+Nb0nHS536WBpijKO/Efw+61fBe1sLTX2EjQ4m5T+Ubk5o8cAxAGu29TE09vFdFu7wJpNrsnEUjHBOztJ9TXVpgeiWBM1C6ftmGnSjhEMLRZLlU6Y79AdyBLw== 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)(366004)(376002)(39860400002)(346002)(396003)(136003)(230922051799003)(64100799003)(1800799012)(451199024)(186009)(52116002)(921011)(38350700005)(478600001)(6486002)(36756003)(86362001)(26005)(83380400001)(38100700002)(110136005)(8936002)(9686003)(4326008)(6512007)(15650500001)(8676002)(316002)(6506007)(2906002)(5660300002)(41300700001)(66476007)(66556008)(66946007)(7416002);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?RqctJk5Nr+QlgMquWMXldIDRcgzG?= =?utf-8?q?aC6b9Buz8mrrRC7SVv8To7194o+3szwniU7iOb5GQ1pCsvB190pIzUuoYhRaQq2V+?= =?utf-8?q?yCGJYEmMCc4ysU9WcK3vVgb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G+3xerAUbuSWDDQQmcsnSzXBs6S3jTJduE?= =?utf-8?q?t2w0LchA8v8Y9PsyGh5hHom1zD1Kc1p2qyGca+X8Sh5FnMltIdBtgCbzKHE8wQLII?= =?utf-8?q?WKA6YTbJCuqC6upmsRmZYfNc/Hnh8so7gLiXZjTcP7nq12FgWkZZzlltQVNQ++nd4?= =?utf-8?q?Jr9ZCUiYQlKulv+KWB9H69TSN7eBj9qc4V1Q3rKTx96Dtz1dJmJgHzBNs3s+cZjmU?= =?utf-8?q?S90sYWV/KnXO9F6iAU7nmZBJ8XGhv+QHdIpkVJHVO+p9DUi9P9JTVsoeXbDjlhu6r?= =?utf-8?q?mlwk8LNntJn6dGfaj8tjQRNAXGGXPu1tdVuwGDTxzkTDdyKXS1LHjtcNZeAHQ+9Qt?= =?utf-8?q?NGpnlhulZagYcFqGzknoZ3Ao528BkQ2f3mMmzdORti+CXY6gFsE6me8U6UjnIZSnG?= =?utf-8?q?ZAIQzwNSS0mbpZJ4A/s7DSwd9dzPDZCp3Hjx/NyAkiCmoI/pS+Ba1VR3EUO71o6aM?= =?utf-8?q?KvdQqrpiRObPwWzLGoOG4NMEAlb8AB7DBkaPWR0wNO9mAAA3YsPh9dONHNQ3rorWV?= =?utf-8?q?Zs3/dxPFuQ3f?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: e95fc1ac-e4ab-466e-45e4-08dc1e378e99 X-MS-Exchange-CrossTenant-AuthSource: DU0PR04MB9417.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jan 2024 06:25:14.4924 (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: GAbxY/Mmb9urY5q+FiJi8wtm8+gfpmnAxAixM8vZERv66Rj2bL4TbPr+YCrdKEXaX0GsLzpV12jvninHU/9DUA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM0PR04MB6851 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240125_222625_774057_22D036F6 X-CRM114-Status: GOOD ( 13.92 ) 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 }, { },