From patchwork Tue Jan 21 15:08:10 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13946410 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 5A2C1C02182 for ; Tue, 21 Jan 2025 15:13:15 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: Content-Transfer-Encoding:Content-Type:Message-Id:Date:Subject:From:Reply-To: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=9D7PA6aFzmqVU2lLtS0EwBKJWFPcm877IuoXmo+pUOo=; b=Tj2kLMop/1GMjk9RsQB2TNrXLm wVLsmdTruZ9LnyONnAmV8Lpw7WB3z6XZqPfPZ5TRRrt6y8UI/ZjEt7qMdpBEv6T3iKbH2xiJQjWit rbFnCP7s7LioU/w/QdhZ6wkOpTAv/MIeB/jZqc8DndZhlvjBv8M81SXwGC0PGLJEmXwPdLYPcUG6j MfT+PY8MMrKHpllTeeArEzPPy9p/bynRTAy7JeDZ7xEswg58j5YoxVYyPCuyk6PYsOE5E+bY8xkeI lpYRCzi8VJ7t0rzQom1LsSyjLLvIWVSbW9YvLfZiucNXw5y1tzCfSbNMxXMmMp1mKqqfeYQX9iGlH Qn66Uk2g==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1taFw5-00000008BR6-3ENH; Tue, 21 Jan 2025 15:13:01 +0000 Received: from mail-db5eur02on20606.outbound.protection.outlook.com ([2a01:111:f403:2608::606] helo=EUR02-DB5-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1taFsB-00000008Amp-1hfw for linux-arm-kernel@lists.infradead.org; Tue, 21 Jan 2025 15:09:00 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=zSTraA3QITi/ScDVDkDsqMM08hwy9H5QBtTUmi7qUPPSpeDG0TrJkiwdZiRWKw9utip0z4LApCwka3aLgKsde2ifdqjRmD3opjvuEHlGdYQutdiOekyEorgPA9GySVJIOBgL5t4NQa6Y7uAyj8K6OuVeuQ/SQNDFEQrSzVJiChMidwwM/x9QNi1e4eEQuko7pSS8u/b0UwWQjWtuimkzBSfbtoXecIa+FTWIaBb6rzq0bnuSLJT0JIdcbaQ9uwe2oentCxO/XxDVHUR/1AfTztDzHv7dPv6HPLakc5+iUGpk9b8jpvg5avAGz499cmKq5f0TGdvwewLMzsX5pg3u1g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=9D7PA6aFzmqVU2lLtS0EwBKJWFPcm877IuoXmo+pUOo=; b=CBmKUbOrD+TXj1wLGeOH1qdkNu7EEsHoXfvE5NpGZbd7zmY3IeZZsAXKjNKMKM0nYnpwr5QYj7/jGqnGfK3qz/ssSAc95FEdYt20U8v1JL0OWnO0yCDSJfp1qvb+s8fLbVg3nh54b9+uEcEPQC/ETGOLeSah2qgqQnYRsMLBP2VRab5Bk2CSUuxGKD0H8RkFYoNNKRQW1uT+VAnTabqm5VAgPQR0mA1GS6wo0U1XniGWAYTRR1OmEuoV1LZhuHPsvTOCparbkhOi7rLK4anZwUBAAwNuTwioVp0QqdLJWBVwz5ZX+TgojOWogDgkeBheHN0bgWhrkFuUjWF28FOeyw== 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=selector1-NXP1-onmicrosoft-com; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=9D7PA6aFzmqVU2lLtS0EwBKJWFPcm877IuoXmo+pUOo=; b=ogL8IMtsy8lLBavTNzy+DNaSN1vvzC6tgVWIX1ZFQ0ujYsUMB3knaFNmBc42DJMUUkHX1fb8FBZYLOD/VxLav8YJ+xWfkasHUqnNwwuJ+dgr3HoCv6Q2rZU1ND7jgusvla1QYSak/B/zDGJKIVhBXOcGXKoj3rd2g95jVAlxl+IkNI5WDYYlICq7UemFr1i7MXaZk0hlapdkJu3B73pFdEf5giIJnEqQFiu+3ktdRwO+lKU1qWsHHignWX5c8POrkUfovQ327Chxd8IJGZh6eH5JozdTcE+lYvtop0e8cKfcNr/92CT29vgP/hlu+Oo8n+9omFzLUqLfwnNRQqlicg== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) by AM7PR04MB6853.eurprd04.prod.outlook.com (2603:10a6:20b:107::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8356.22; Tue, 21 Jan 2025 15:08:55 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%5]) with mapi id 15.20.8356.020; Tue, 21 Jan 2025 15:08:55 +0000 From: "Peng Fan (OSS)" Subject: [PATCH 0/5] firmware: scmi/imx: Add i.MX95 LMM/CPU Protocol Date: Tue, 21 Jan 2025 23:08:10 +0800 Message-Id: <20250121-imx-lmm-cpu-v1-0-0eab7e073e4e@nxp.com> X-B4-Tracking: v=1; b=H4sIAFq4j2cC/6tWKk4tykwtVrJSqFYqSi3LLM7MzwNyDHUUlJIzE vPSU3UzU4B8JSMDI1MDQyMD3czcCt2c3Fzd5IJSXRNDi5TExEQjU/NUIyWgjoKi1LTMCrBp0bG 1tQDf0mRzXQAAAA== X-Change-ID: 20250120-imx-lmm-cpu-418daaa257e2 To: Sudeep Holla , Cristian Marussi , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-kernel@vger.kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, Peng Fan X-Mailer: b4 0.14.2 X-Developer-Signature: v=1; a=ed25519-sha256; t=1737472103; l=1945; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=ifgDquSQscn/T03rF9Vz+EDOYQiu9tyXilA81NHM2OA=; b=fjrH/jfBR0WMiUpMhFg16nHNhW5E0kmOKjXBY5/OHI2YJNJeFZg9xwHmGKtpRFFoVv4EDvMD9 15AT+PglcFSAup/O2VFULM52tshVRt6mkgM1CSOAptmaec9sD2CwJ/C X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI2PR01CA0045.apcprd01.prod.exchangelabs.com (2603:1096:4:193::19) To PAXPR04MB8459.eurprd04.prod.outlook.com (2603:10a6:102:1da::15) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB8459:EE_|AM7PR04MB6853:EE_ X-MS-Office365-Filtering-Correlation-Id: 10ff29ef-c68f-4f35-1051-08dd3a2d85d6 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|366016|376014|52116014|7416014|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?utf-8?q?pxXGPVYtUDNTzmUdTWpN706e1RHrv79?= =?utf-8?q?V3gzblxn2Fh9sK6bFCvPNikJAwYbi2Z3ayjKN+5Z3F2eZfTmU1hmsiCNTelaJeTCV?= =?utf-8?q?D0GUIGAW+wspgeKXAA91IYB9POlrQbasi8Ut5O9RjVPsERixqoGjnR2JTXsu/GZDv?= =?utf-8?q?nvVQfBRpE+w5fkw5N1zDlyBn9056+tw6qhY5///spPvwE6Y7Mi6r9rKrGMhss46n2?= =?utf-8?q?JiBJD/uoqKjvRWKtj4S6ar+7OBwyf8ver0vgr7V7+qfhs0yd9fqEhOveGeVqZj8q4?= =?utf-8?q?X2iSytAnyLVBsIb6zOvhfS2A4ZtlN04ggAdZYUBk1zc+MvgmyeeXM4lLnYEihW9Zu?= =?utf-8?q?59F/MQejCv8GM9z/7Vrnz6d8e6+RTBQ3W/qai4L495nc9l3IfLOiYZ8OMwkQVl82s?= =?utf-8?q?8OPvu/j8O0AfWMNfJu5B0MnSBtJgXHRM/9TaMRwNYkjjUwyJQhROEPYJo0kXziUhW?= =?utf-8?q?Q0WbTe5nOFpbevQBFu4RWkwFuNGre70ggEJeN9+KcppRZuCt4pi+Q9qwOSPXFWO7D?= =?utf-8?q?HKAygij8hSsTDGq18cdIj0Pa43UX+6GVHgIaPufz7RmolPcCHCXA0WpHBJqwCKnNA?= =?utf-8?q?RvbdGYcOTUVcUlbEsSTec/HitlLnTv9DA0b48Kq/Z0NIUKc2PGBrRmwplbLW2/rEJ?= =?utf-8?q?xcvSprZWDwdTPSQDRoS3NSac3m3iHXKGKKtHyWH8uaj3kcsVPBICIrnxWgSwEkksC?= =?utf-8?q?Kj1+vJdajYkEFvZUjVVu7GYCtCoIJdlaDdUuTx7sdbxWx45/nKx+Mz8ZYWacx353R?= =?utf-8?q?PnbxTDtFKPi2r6VMQ9z64PfK3BUnDwKLTvKLfW4nJ+qbBAVRKhDlnYULc0mD68EoE?= =?utf-8?q?EIABuY4kLl894O3L2Y+lN+t6weTshCKrjtkFYUsuY/kGl310bOk9IhQzIkU8iBXDb?= =?utf-8?q?m1p8dZbZT7GAv8Gj9ZCpz7v+rCaPxLYEDBcuR0vkRbRR/lBVoyS2v1mgvdYtUJkOq?= =?utf-8?q?BsJzRL9vRXbGkBzV1J1bY+gi4ZiA5bQNU4YBZiY/N13YvMkJN3uLNE26Orojnz+/k?= =?utf-8?q?rF+Lee84CW10sdFJrFy9rqDpkM++VIT1GKAVtLlMmQYPoVtHxjomguueGoStU5OH1?= =?utf-8?q?EFAX8awCnBs5fMvYQN70pplangTAc8ivxHaaH9F4d5iWFE0MTinDtM1/GZcABIvWE?= =?utf-8?q?ooo8uV2nnFOjoHHSCWXLTFIbnTKWax/PtD2hFOIsaEf8BebDS/jjcblfZNjrLX9ha?= =?utf-8?q?mg4gNni1T0kxN917yk3f1vja4Ig5ya1AhqlbK3u7dC1bfWrBFQNAmXnuhaMPpgYLj?= =?utf-8?q?TRvU301gPnjwJjiWW9TetDyA1Z0sySEY/ZqcQ/+SiqZ96pqxHNMMH0d5MGJyVHCxb?= =?utf-8?q?bFlE5+eN8/jfX4MKG5Yk1h33mvm5SEr5QMGtoyh5YqbRlIossxgaiTiMbXKozG6y1?= =?utf-8?q?o6zSnuP3Ecy?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB8459.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(366016)(376014)(52116014)(7416014)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?TQTtL5v+qY0sf5rBce0KPTIlVybh?= =?utf-8?q?cRCrWHBDZPcjpEPfTQmY8ufuKvb3tRpGaEGYjaG0A+n8OX4TOAdLcMqTQgH5pKMEt?= =?utf-8?q?gfCCjU4yZgkocTwweuoydyL88OI5qHea240JRcZJ7yiEsdqJQgY78ecH95+b4Wvyf?= =?utf-8?q?HnDe0saV7s1qC9q2uc2Cbo6/vaRBI9usyjOnckDiG+gzRXko15tLsVsnJbxaL2p0/?= =?utf-8?q?YqxXGgabzfYi92Orhdfue9q/9dH8QhRmoCOHkKpa8VFlokUOsw2+WLMZ9ntAvHMa8?= =?utf-8?q?1lKROAsAQlQidgTYbjjqIW0eLQEQPu6+YruhlEmH8ByQ4cLShjDTGkDjnKQcB1YyN?= =?utf-8?q?2y69StJxnQ/244xIUP2iL+YH7zJOmqyP4zX7eDW0dXvMj6MQgaFhoJ4H1NK9gd3UV?= =?utf-8?q?wXvm5yfrMu9vQ2vGu/GFadr/dGmECWXAzGupCsuL9LmGjpGN8HengjNFdhO4w9NE1?= =?utf-8?q?xHQEfcN6ujYgAFo3tP7nU2YuwY4RQXOHSUmL4uoMwsBxCK8hptFaB87ywbvQImXE/?= =?utf-8?q?zNJJhnejiWEljYBtfyYVqeEKw/UUq1/I2vAWK/9PMzZD0CoziXw00Aidh9Afl30JS?= =?utf-8?q?+4Y4xKpdZY8EnTE8dZtMVv/DyCVabcVmyffvxbOvTt1KlQymw3meWKRoCOifZVDb1?= =?utf-8?q?B21TmtwJk7wjDyNCqFRyc7RU90UR8rZMtP0447cEhCi90MrNp+FnQCv621fkCwAgL?= =?utf-8?q?62wAjpWLdWPVcBpvegbA0pPzpb/meOzymoSZD5UtVHYr6Aene/wGZnvhGhre74aje?= =?utf-8?q?upgxzItIAppxr1aqcCYVwd5VKwCVnyDyjk9fRvGF+lKctZxRJXTO4I7lW+EcDUoan?= =?utf-8?q?343apOtOpUcgQPUOJIC4PElQDZ1docX6JHv+m/Ip7mnJZLnu1MlUR9L8Zd+ZzA3Vz?= =?utf-8?q?zay7pE6muf6go1CYmf65E7p2wFmJvb+zme50WhOny3pKQNUt37UFNgosEskONPT6q?= =?utf-8?q?BlqZXI1Bj8H+pWYP+5RIyk/ofXfmp12hlDxp6rIK9oFKl64U1rz4PzbvrQbkEsdD/?= =?utf-8?q?HS6JYQExTCpJkamsIwFFhowuBY2K+SAf+BOSeMQpfqJ6SNKd2hd42QL/6R3PGwj+m?= =?utf-8?q?oOcSjsWwXlv3d7l/2N6OTvbR0wAQOB9riJTh68o/AH7jo0uPJCqOP2dMd3v139fl4?= =?utf-8?q?OTr7pCnz/j6E1gtsI5pgeIRUAOTnED0YZ3KoqvGkw2dOrPTPKoNndwPNDM+ZkyCzS?= =?utf-8?q?P7l5sPzXJf+oZ5wY0EpgIY3rFwG1rzYxk+AqbHQUNlKOxYqpaXeJO50/btHQLRY/d?= =?utf-8?q?fC7mrfY9GgdXfNTADNmcOxQB5SjOXT7xANuG34H5n6JkuWJzTVsHeVX1nqgQvAA8I?= =?utf-8?q?Uml/B7YvzUNbOqe561mogO0FFkWu4FR12Hna15IERmi/6tj7G9AoSpS06af/5nEgV?= =?utf-8?q?oOrEDfGhTX5K9VSt14j5sWhpEgONz574dgc3sN/lhSQgeq7Q6QIcN0boP92lVq4Wi?= =?utf-8?q?/+ea9Ry3WgcCS0FFgM0U5UBxHAQ45+otT9v4WjMvDtm6/vq6syfkdtfypaScyZWbA?= =?utf-8?q?DfU66fhpaytg?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 10ff29ef-c68f-4f35-1051-08dd3a2d85d6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 21 Jan 2025 15:08:55.0776 (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: lMY9dOAMNpXD2F5Wd55r6LUDN6S1ge+PEjqhx5ybTxJdHPbx/2T1ORpLxHvJtiowGelIFlKGVbBi9JYzIrQgcA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AM7PR04MB6853 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250121_070859_448641_1D145DED X-CRM114-Status: UNSURE ( 6.76 ) 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 i.MX95 System Manager(SM) implements Logical Machine Management(LMM) and CPU protocol to manage Logical Machine(LM) and CPUs(eg, M7). To manage M7 in a separate LM or in same LM as Linux itself. LMM APIs and CPU APIs are needed. When M7 is in LM 'lm-m7', and this LM is managable by 'linux-lm', linux could use LMM_BOOT, LMM_SHUTDOWN and etc to manage 'lm-m7'. If in same LM, use CPU_START, CPU_STOP, CPU_RESET_VECTOR_SET and etc to manage M7. Both LMM/CPU APIs will be used by remoteproc driver. The remoteproc patchset will be posted out after this patchset gets reviewed or in good shape per Maitainer's view. Build pass with COMPILE_TEST Tested with remoteproc on i.MX95 Signed-off-by: Peng Fan --- Peng Fan (5): firmware: arm_scmi: imx: Add i.MX95 LMM protocol firmware: arm_scmi: imx: Add i.MX95 CPU Protocol firmware: arm_scmi: imx: Add LMM and CPU documentation firmware: imx: Add i.MX95 SCMI LMM driver firmware: imx: Add i.MX95 SCMI CPU driver drivers/firmware/arm_scmi/vendors/imx/Kconfig | 22 + drivers/firmware/arm_scmi/vendors/imx/Makefile | 2 + drivers/firmware/arm_scmi/vendors/imx/imx-sm-cpu.c | 283 +++++++++ drivers/firmware/arm_scmi/vendors/imx/imx-sm-lmm.c | 235 +++++++ drivers/firmware/arm_scmi/vendors/imx/imx95.rst | 692 +++++++++++++++++++++ drivers/firmware/imx/Kconfig | 22 + drivers/firmware/imx/Makefile | 2 + drivers/firmware/imx/sm-cpu.c | 91 +++ drivers/firmware/imx/sm-lmm.c | 89 +++ include/linux/firmware/imx/sm.h | 56 ++ include/linux/scmi_imx_protocol.h | 39 ++ 11 files changed, 1533 insertions(+) --- base-commit: 0907e7fb35756464aa34c35d6abb02998418164b change-id: 20250120-imx-lmm-cpu-418daaa257e2 Best regards,