From patchwork Wed Jun 26 06:58:38 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: "Peng Fan (OSS)" X-Patchwork-Id: 13712346 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 8CC18C30658 for ; Wed, 26 Jun 2024 07:04:18 +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=Yy+VV9SuYLepJbKT4oXVpfluF2Vol8JJBAhhpGlNOgs=; b=fj9MY4/hCz72TyXnVuBMWTVrEq cirHD0WOMhdSyhJVSm8nQAr6PEdkXJ9LEv1gR9Qm+GhLjMBZTsnIsG5eNWWik+bUQHkdrkd12TDxH hnIk3FbEZxoxoAzPwurzFG6hxHMwckMtF4tbRFE0ERrT96Ytrzngb97zvRLrmKdRxwt76nXYL8zdh D3r7DO2Vh1CzNBqg13KbJxuF4FcqTDU2byUaMa1OwkbzPyqIiqQzE+Ng8XCx2e92nDFV12LP+PT/s LbAH6sSF1ZwGph6kv0pfI3eX07/pe+3sZFlaqfEolaIyGu/+66WbUR4YGw5zgS0zdGgbs1zsYVrKm IlRV7Epw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMMhJ-00000005fwb-0JlW; Wed, 26 Jun 2024 07:04:05 +0000 Received: from mail-vi1eur05on20601.outbound.protection.outlook.com ([2a01:111:f403:2613::601] helo=EUR05-VI1-obe.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1sMMhA-00000005fvA-2lZT for linux-arm-kernel@lists.infradead.org; Wed, 26 Jun 2024 07:03:58 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=nH+CDgQNupdziSMxfiajVgKmMWzip6S5Vj7tFLZGqOhMGPb/B0LWSyL5+W/obJjsTBKcljI/E+LBZZf9mHiPZtA8suRh4SJkw4Xd1GTYLfRT1Mk5a2Inx1sKyIlvr0dA8PQ8+3vGKpNjvi3+Tu3zsI5wduWbSU7S3H90bzPIFvNVMChJ26ZwR65IIZ7Cnk3Nj0vIbjXB+p1vBN5ap51AFLd302qjTE3Wxl8xGzA3hTGEXQbgHpM19wjIdwZPrfs1lD/k0hlDECitWiPIz3dNXRmgjYS/e0Zz9Sj3cbdTizouKC980qPyBrSc89ERMG82SsAUbkdsjVMrZldOZMkkiw== 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=Yy+VV9SuYLepJbKT4oXVpfluF2Vol8JJBAhhpGlNOgs=; b=k201VeEBY00hAYW85GwMz0g/g3AJiw0i62fDG2utidn9xLTaGraZfIde1Jluu6sOm+0AaFph8Ha7l1+LYz51UCnKxm5vTIS0eEXU46k0n9w9WPpL0IjNsiiU1rPfsfaxJUm8pZ2ln/DMr8M0kICBRcnV6kW4qWEf0ko6yapoutf6yXeBlRUvT6+eh5t2eHq+UTWmiCx+5hgE0SvNr6bSZ6MFSxbaUig6hALstm31gTs1I05PotbOxDNCguO9rd6VG8P+RNmJ3oIQyucKNDul1WGJA67eg+sbw8GwN/DU3qxcXxIQsK9eAXk5B5xWqh5ZEA5WGTNfUZ3ZjrVAEicJtg== 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=Yy+VV9SuYLepJbKT4oXVpfluF2Vol8JJBAhhpGlNOgs=; b=QZYa3lkjewEFdInKwTng60jE1w4LU/9y32cri/M8cj9XQ34osL8rJL0roZOwZAefjq0LgpwDwHWyBtSntBYjRs2GfeId2FGsvUlHGqWddqDw0qnbCX0ZGyyVfufOgNzuJLytSTtnaKSyU+6puCRoKb4fkVo2JRrT/8j4Y/33+/0= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=oss.nxp.com; Received: from AM6PR04MB5941.eurprd04.prod.outlook.com (2603:10a6:20b:9e::16) by PR3PR04MB7449.eurprd04.prod.outlook.com (2603:10a6:102:86::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7698.30; Wed, 26 Jun 2024 06:49:34 +0000 Received: from AM6PR04MB5941.eurprd04.prod.outlook.com ([fe80::9f4e:b695:f5f0:5256]) by AM6PR04MB5941.eurprd04.prod.outlook.com ([fe80::9f4e:b695:f5f0:5256%4]) with mapi id 15.20.7698.025; Wed, 26 Jun 2024 06:49:34 +0000 From: "Peng Fan (OSS)" Subject: [PATCH 0/2] firmware: arm_scmi: create scmi devices for protocols that not have of_node Date: Wed, 26 Jun 2024 14:58:38 +0800 Message-Id: <20240626-scmi-driver-v1-0-f16d777e004a@nxp.com> X-B4-Tracking: v=1; b=H4sIAB68e2YC/x3MQQqAIBBA0avIrBPUYqCuEi1Mp5pFFiNIIN09a fkW/1fIJEwZJlVBqHDmKzXYTkE4fNpJc2wGZ9xg0KHO4WQdhQuJHjEGtKvp0TtoxS208fPf5uV 9P1LClMFdAAAA To: Sudeep Holla , Cristian Marussi Cc: arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Peng Fan X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1719385128; l=1557; i=peng.fan@nxp.com; s=20230812; h=from:subject:message-id; bh=MOmNrVB7/gxZ/QhdQ9M2tSUEUd+hP5luT6SmrC2YArE=; b=cSWw2IXghkcdx4CjwRB06UVJ2vdOek5MYvmWyHIAPdFS3Imo9+4Et2kmU1gS1FaLVtb/T9F5X SrwcNv/yhfbBFRO4YcMfJE2B95Td8rxIwrn55JoKnhJlkhwUikoxOmL X-Developer-Key: i=peng.fan@nxp.com; a=ed25519; pk=I4sJg7atIT1g63H7bb5lDRGR2gJW14RKDD0wFL8TT1g= X-ClientProxiedBy: SI1PR02CA0051.apcprd02.prod.outlook.com (2603:1096:4:1f5::6) To AM6PR04MB5941.eurprd04.prod.outlook.com (2603:10a6:20b:9e::16) MIME-Version: 1.0 X-MS-Exchange-MessageSentRepresentingType: 1 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB5941:EE_|PR3PR04MB7449:EE_ X-MS-Office365-Filtering-Correlation-Id: ca024465-2914-4b27-11b3-08dc95ac2398 X-MS-Exchange-SharedMailbox-RoutingAgent-Processed: True X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230038|366014|52116012|376012|1800799022|38350700012; X-Microsoft-Antispam-Message-Info: =?utf-8?q?HbSYNBHybdbk0Bo2dy8q2u4a4+pYHCV?= =?utf-8?q?/k5yvXpAvbdF21SS0oJqNvS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hipShWFgtkKxIwiQ6WxbPKbUYEP9eFEoQajnJcqpMvdaEDj90wftLMGT?= =?utf-8?q?Qgia+UR5NDqMK2SntoKr5DgCBNGfF8J2KbS/7kX1QxiE1vIpAiiolDOFV1CNWHtAC?= =?utf-8?q?QX6k0+h8c0U0nHGmasKpRKp49vZUAg6liMAxqVpQZuJiIfsKfdRCcZ8deRWmGyHmv?= =?utf-8?q?7fT5vzjKMKOg5zdh0Ht8XjqHyYHaIDDwkwqRhHnY/2gxskCk2VDXeyfq7EquPag3H?= =?utf-8?q?7WMeSqUWSbotGK7wCGpdqqr5/pBHux3ZJQzr7JYGPyPhJQ0ghUWVC4iz3fePGJQhT?= =?utf-8?q?LFWHaW22c7Qt0289CK+WKsIYm18g1jpnXSzHtQ50WQDriELZoNNJvXyTZ29y1IoOn?= =?utf-8?q?G37yvy0CSHqAraGH58lv8kD7SgqNVpusVXtleCWo2ctYIHuID0fbvZVs=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB5941.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230038)(366014)(52116012)(376012)(1800799022)(38350700012);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?utf-8?q?Oa6C07RgpXNXJpCEpXvvIPpvx81Q?= =?utf-8?q?nP1pRYKDZRpZHFikJRd5dJStVcFWas15LMe6YKOux7+4IEyd+8CrFFUmC8eEsH60k?= =?utf-8?q?mCPIjK1I+xdq+o89/3S8qgkO6aoUGH7g5EMJOoUyYLqLJ5IVkct2uAQKilywjq6rt?= =?utf-8?q?ax1BbzguPZ76QyuW76sGxYJEfj0qoBmF5DkW5n4m+jhtcI2Cl9gcr+reUNJra/nb9?= =?utf-8?q?6w5Ek2nTbHoXn68ypU5dy1WnK4psi9SLKhezrdm/82XODqy5Oi6G+J85B4Gge1rLx?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q?/6BK2woxfRCfFsnoT4/3dhOTUm+OBkSEvyk5d0nziAo2DtlKFssQOO8eKChku7a+H?= =?utf-8?q?GbRmOr3MhYzB0SRrLtcS8+1834lkjIMTprZIo+W72T6KUpo0VuLcgqm8bspORthyS?= =?utf-8?q?duB7cJS9HpSgosUVYMJr1pH5jqR4y53+r9r4oqRCYOAGHhszlpPXp8OFOzfQUGPeJ?= =?utf-8?q?sWkRd4hSz0s9VFhr3XSk3wR2Gb2R/UAbRlZDMq88GRiMks5cTAKVDV0zfZ+L22lgZ?= =?utf-8?q?39I40S4uetPHELnzPsp5+vIUqyFRtiOy8ZO2gu1/mqoeI47gTPGeIf+xrf3zl9A0N?= =?utf-8?q?x8afRBPp7CKlSiZjWuXv0zpVuiUZDSGaMsOrme1RG0NgAL4v6PRNSiXpdFSY/5D5P?= =?utf-8?q?tMb2jSdAtJt5?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: ca024465-2914-4b27-11b3-08dc95ac2398 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB5941.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 26 Jun 2024 06:49:34.6438 (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: t1DSJDOCoe0DBuih9eC9HRm0skC08rjZMXJjNe5T5vLuu1nu1xZqBbZ4Ty1Qe1z1AT4mtTaem+XLL1n60lWwXQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: PR3PR04MB7449 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240626_000356_717985_2186DE8E X-CRM114-Status: GOOD ( 10.16 ) 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 Per https://lore.kernel.org/all/20230125141113.kkbowopusikuogx6@bogus/ " In short we shouldn't have to add a node if there are no consumers. It was one of the topic of discussion initially when SCMI binding was added and they exist only for the consumers otherwise we don't need it as everything is discoverable from the interface. " https://lore.kernel.org/all/Y9JLUIioxFPn4BS0@e120937-lin/ If a node has its own channel, the of_node is still needed. i.MX95 SCMI firmware not have dedicated channel for 0x12, and no need of_node. This patchset is to support protocol 0x12 without the procotol node in device tree. Without of_node, still need to create the scmi devices. As of now, it is based on an array 'protocols[]' in 'scmi_probe'. And no of_node, means no per protocol channel, so reuse the base protocol channel. Need patch chan_available to support. Signed-off-by: Peng Fan --- Peng Fan (2): firmware: arm_scmi: channel unavailable if no of_node firmware: arm_scmi: create scmi_devices that not have of_node drivers/firmware/arm_scmi/driver.c | 33 ++++++++++++++++++++++++++++++++- drivers/firmware/arm_scmi/mailbox.c | 2 ++ drivers/firmware/arm_scmi/optee.c | 3 +++ drivers/firmware/arm_scmi/smc.c | 7 ++++++- drivers/firmware/arm_scmi/virtio.c | 3 +++ 5 files changed, 46 insertions(+), 2 deletions(-) --- base-commit: d8003eb2eb0200352b5d63af77ec0912a52e79ad change-id: 20240626-scmi-driver-96dc61b036a2 Best regards,