From mboxrd@z Thu Jan 1 00:00:00 1970 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 5DED6C19F32 for ; Mon, 3 Mar 2025 03:21: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:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:In-Reply-To: Content-Type:References:Message-ID:Subject:Cc:To:From:Date:Reply-To: Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=wAmT4m+Yr4qdj0/9Pa4K6C4iKk2NWeNt5HhySlySlb0=; b=fiEgpwy0UN8gEeZQXEv5iSFYwr I9BJkRVCcfxgmvdTzXSDHUd9qau6xvyRYOaftpfq000m96YrKBF3sgkNvxfjabZye3Dll0YGNbQiM Bo2D61W+m+Pu0Tk4Vu70Zc1XgRhQmdk10IoyUK6HR9RA4UKufPpi6sho4kkXCCv17m3m5H9Tim8JF T1dU1TdotDy9ysC/xwoKmZK9et1s+5JKm2/im2T3l0h78O0aEpecHTO4ZL3NJFeihcCkpN1NLB7Tk bUENdAdWUtTIyr24lEkBE4ehPEkMKjBcKzB2RIbtQxsjuyBLGARu4LmntVzYCTCF0BGdbSwjRPhij 42FpF6KQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1towN3-0000000H3Eh-0YZU; Mon, 03 Mar 2025 03:21:33 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1towLT-0000000H398-0phf for linux-arm-kernel@lists.infradead.org; Mon, 03 Mar 2025 03:19:56 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=nqZkqbw6fbTfboemMn6rC35KJQsd9hz7PpxUrVhxuOGH4HpJ+mlC/gPzCMBotgiMXePAk6ELvD5Xc4TiFwLShxrkOHtVaF+tekEfDSO4GYVz0RKA4tY5aU8lskg+po35J8JdpU9qiRVlCeaQPvVSJ0pGRn81jdGOVQgbQiP0TRJUa7uS9gfDq5faMry/zgq7L+Ul2Fs4LGZrLNkNgrFWMZj0JGWR/iaQnxX3FA/shunr1beDD2gLw1qRy6elx/3yLWfc6JkIFf5FvT4HRkP1GZCBStk+xJgi6hcvIFc42pSLRvDCYRNOGkPF2Ztg2fR4D1is0i38jlmfx9iMmYbJBQ== 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=wAmT4m+Yr4qdj0/9Pa4K6C4iKk2NWeNt5HhySlySlb0=; b=i8Jf6pZI85VpMHM1HzSgdtiSwCYqxR/tqUL3Dd+9TmY1c2lRab7zWtEFyjMXVyKlhCQ2P22gvZWK+EprOlPIuHlBd3iIctXmBPUbXmhAuXJzXx57MOHPnwTTX0Lwm1RqMtxwXjsGj3fAYr7XOJnCzfLqztbXODxcwFlXjZQ7dFWCd2qBBbxzT69WcRBSd++5A9+ZLzsBnFrwVjz4ls+dDN4oZCglO86tnlFBQg0FxysU8PfHX+/ghB9HzKGAosi2kX/WldmTF2rdsmBrletWnmWT369a01WdQPdcDnpA8tjAW+k5AD0tixxP/BO9lZbb5nOXxAaujwP7RNYLotP6+A== 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=wAmT4m+Yr4qdj0/9Pa4K6C4iKk2NWeNt5HhySlySlb0=; b=bAv4NuPa2QRA8SWdZ3olUEj9I58Z3Gt5cNiMcdAYLhAOqOg5DO2nFOV07hFG+3R0bnt3gHGWRVkPEIyqw/+mDtgvg2wFGMW/iiq8R14Wwy75lOk11c4JUweO9UbOdlCMUnFfMp4/pQDQbNTXXE+HguS3joa6CXXqZzWnUwwpAwIC83jfxZgB7yvqSbyhf5xpUCvPgYhOa64TC4+9tCQ3pQwMvwvaBHQHfelYfvPX0d9O/dXOz4B7qzyIMkhWfrpfPDptKi2G2pcjRxZib/Yu7hXn9v3ksrgfVN9fmHeSei5iTHwOfZLHmN2yCgwP2GgHU16ZGOTVUsHXDEA+U4jJCg== 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 AS8PR04MB8101.eurprd04.prod.outlook.com (2603:10a6:20b:3f6::19) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.8489.28; Mon, 3 Mar 2025 03:19:50 +0000 Received: from PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630]) by PAXPR04MB8459.eurprd04.prod.outlook.com ([fe80::165a:30a2:5835:9630%4]) with mapi id 15.20.8489.025; Mon, 3 Mar 2025 03:19:49 +0000 Date: Mon, 3 Mar 2025 12:27:14 +0800 From: Peng Fan To: Cristian Marussi Cc: sudeep.holla@arm.com, saravanak@google.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Peng Fan Subject: Re: [RFC] dt-bindings: firmware: scmi: Introduce compatible string Message-ID: <20250303042714.GD13236@nxa18884-linux> References: <20250226094456.2351571-1-peng.fan@oss.nxp.com> Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: User-Agent: Mutt/1.10.1 (2018-07-13) X-ClientProxiedBy: SI1PR02CA0049.apcprd02.prod.outlook.com (2603:1096:4:1f5::18) 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_|AS8PR04MB8101:EE_ X-MS-Office365-Filtering-Correlation-Id: 3223810a-8869-4b22-d067-08dd5a0241be 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|376014|7416014|52116014|366016|1800799024|38350700014; X-Microsoft-Antispam-Message-Info: =?us-ascii?Q?UNSbQHLkVFj2n/moNJWp9UYWp6zpi7dsQwSSIa13pOQnkdw8kEtXCCo7AVHq?= =?us-ascii?Q?b5gnFGMMCQwIOqfGg9FUxrIjZMw/wyrKODHQSW/2jbK3YKfoLtkk+/ZgGSdZ?= =?us-ascii?Q?5Ff1bywQiQ/ob8GiolJ8d56QfqgD54AFp52t7qI2tIjIfxQYzBcNQejgDm5A?= =?us-ascii?Q?e8gFPTXbyTUXsdBFU/fndDh7x4/OxXGBKz5vHloyTtZovBMFU7aQ79RovEgz?= =?us-ascii?Q?u1GTnYz9g9vwCV7atHi+rFXm3lNuwLjp+3YzTZSSH2KoODVHXvWWffdGZ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FvSeDOwWGTwRCPu0AjVLl6xBMh?= =?us-ascii?Q?OWz+R6O17cYUlwrmVu8vdsOxvedf84Dqij0F718IuPnXlbppY6r7yQALwrOg?= =?us-ascii?Q?08FyYpPZY/FiNqbVrLe4B4wB4cruGkh4lYf9HTZ9/pJmZOJEWsoSnfsJ4s3y?= =?us-ascii?Q?G6Nx5o7QR9SrlKHe9VTh86qYS5jgGoNGjcCPl5CmQSGT2gb6KxOICUfAh/z1?= =?us-ascii?Q?KEr1d/ZHOm27SVDupbgG8PSEfoHoAmaej6gKVtyP8oXVcA2VD4Y5n/ZvNYBI?= =?us-ascii?Q?qaRevV/Bshlwn/ynv6XfhqoFwY8qLPya?= 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)(376014)(7416014)(52116014)(366016)(1800799024)(38350700014);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: =?us-ascii?Q?5bJ4C2rBYqCSUf0GHbqcp83YS9EsMw4cvGv/tMQeu9YMjha8l1ZjqkNvotkL?= =?us-ascii?Q?ok1VBjH/Y00xDFD7M2jpaQ8pmk1FeHOB5oCdFchOt5ioMLqidwBJbRiZv2O3?= =?us-ascii?Q?JNchBvouywelVdyLawy5SaLLRxA8ZKEsTC1q5mJ0FyR5acc84LeBtnH/EMO+?= =?us-ascii?Q?DcG/581g5I3aF+WvMbVzmFd/IvfCGYz3OVxc5yYPIFs0GRpzyuQPelag4mFl?= =?us-ascii?Q?wbmAiWE3n8uff24v6dkKxjlbbr156ut5GzFaP8NJ2ZzqBuHhtDxrDfXmcpAB?= =?us-ascii?Q?OjlfLbeLu3RSr4Yskz4TSW4aOwmdzvnmfeAycbc/a394Ixv4QCDyR26cM44u?= =?us-ascii?Q?2I1DeXVDJu3IBq2LF+w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XlkL9Swyrshd154OWbS6y6e8XXzSq8WVco58/OVuYd6FhuwGHqOYiXCX0?= =?us-ascii?Q?QuL1Rryu2XrEtWJt8bXVnBvYrLOh8fbSmXdzSUvCV2zf3S4r+nbIOhPJhK1u?= =?us-ascii?Q?G1kjBSJh1vuHlILJsLjSGvh1Q9AHQs5Jgtliymp+2MusOZeAgPVtqlu9wJ5c?= =?us-ascii?Q?uuWYIdvXOc8dyWvrgdQmkwKyMCh6Y2kl1w75H98suumpMrCaKMnUlkvgL2nl?= =?us-ascii?Q?fK1wkALMjYxVpPBah4JsGdhOJXCSSCCmHYE3wumYfBFkktz0nQvkePLDiQLG?= =?us-ascii?Q?l8WyvEWAoZnRAWPk9TnlCELWrAslPTv1/GDvRVj7?= X-OriginatorOrg: oss.nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 3223810a-8869-4b22-d067-08dd5a0241be X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB8459.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 03 Mar 2025 03:19:49.8230 (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: 0/4RWunVJeIBuxyDAEckKU/Q72Obl/12QZFMk4HlH50VvLTxxPlDb59Y/rhGLeGzf4jjt1kGIzD8lu+LxNinAQ== X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR04MB8101 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250302_191955_240449_BD55AA42 X-CRM114-Status: GOOD ( 27.23 ) 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 Hi Cristian, On Thu, Feb 27, 2025 at 11:48:51AM +0000, Cristian Marussi wrote: >On Wed, Feb 26, 2025 at 05:44:56PM +0800, Peng Fan (OSS) wrote: >> From: Peng Fan >> >> Add compatible string for the protocols by adding new nodes >> The current nodename pattern is "protocol@[0-9a-f]+$", the new node > >Hi Peng, > >> name will be "scmi-[a-z\-]+$". >> With compatible string and new nodename, cpufreq and devfreq could be >> separated into two nodes. And fwdevlink could correctly link suppliers >> and consumers. > >beside the backward compatibility issues that Rob mentioned, the thing >that worries me most is that, while the current bindings describe the >SCMI protocols because the protocols are WHAT the platform FW exposes >(and that is all that is needed by drivers to refer to a protocol and >its resources)...here you are getting rid of all of this, and moving to >describe basically the various devices that will use a protocol, >potentially the same protocol, just to have a distinct fw_node ... >(...I mean my understanding is that there wont be any protocol nodes >left when the scmi- variant are present and, once, somehow, we will >have transitioned into this...right ?) > >I haven't really had the time to go through properly your proposed >solution to understand fully all its possible side-effects and how >many SCMI features could be destroyed by removing protocol nodes >descriptor as a whole...but...off the top of my head, as a quick >example, how you will define a per-protocol dedicated transport >channel in this new scenario ? This is an issue for current RFC. >...because You wont have anymore a protocol descriptor where to fit >this AND you could have multiple DT nodes describing drivers that use >that SAME protocol, so using this new nodes to fit the same >transport-chan descriptors wont be possible either.... The other alternative would be protocol@abc { // current property not change. // Add two new optional subnodes cpufreq { compatible = "arm,scmi-cpufreq"; }; devfreq { compatible = "arm,scmi-devfreq"; }; }; protocol@abc { // current property not change. //add a new optional compatible compatible = "arm,scmi-pinctrl"; }; If compatible exists, the driver could use compatible to match. > >IOW, sincerely, I understand you want to resolve the problem with >fw_devlink (me too), but nuking down everything, while loosing, possibly, >a number of the existing functionalities of the SCMI stack just to make >it work with fw_devlink at all cost it does not seem to me an acceptable >trade-off... > >...killing the whole existing protocols descriptors structure seems to >me a recipe for disaster, also because, it just goes against the very >essence of the objects that the FW exposes and the bindings can describe: no. I was trying to bring backwards compatible solution. If compatible is there, use compatible. If no compatible, still use reg. >as an example, the SCMI platform server manage and exposes PERF_PROTOCOL >and its related DOMAINS (all fully discoverable without any bindings), >so, THAT is what is described in the bindings and referred by SCMI driver >users: SCMI FW does NOT handle/expose TWO distinct perf devices, like the >cpufreq/devfreq-device that you are trying to describe... I understand, fw only provides one interface, but linux use two distinct drivers. But this depends on how to abstract the interface for OS usage. The interface supports CPU freq scaling and peripherals freq scaling, I think it should be ok to add one node for each, as below: protocol@xx { cpufreq {} devfreq {} } Thanks, Peng > >As Sudeep mentioned, IMHO this seems mostly an *unsolved* implementation >problem more than an actual issue with the bindings and how we describe >SCMI resources that we need to refer to.. > >> With compatible string, and driver updated. >> - Differnet vendor drivers with same SCMI protocol ID could be built in >> without concerning vendor A's driver got probed when using vendor B's >> SoC > >as said, this is a corner case that is easily solvable with the current >layout (and I will post a patch soon-ish to addess this...) > >> - NXP scmi pinctrl and ARM scmi pinctrl could be both built in, without >> concerning arm scmi platform takes nxp scmi pinctrl node as supplier. >> > >..the only real issue is the general fw_devlink issue as in cpufreq vs >devfreq... Not sure iiodev or thermal has same issue or not. > >Thanks, >Cristian