From patchwork Thu Nov 10 08:57:26 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Oleksii Moisieiev X-Patchwork-Id: 13038484 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 BE82DC4332F for ; Thu, 10 Nov 2022 08:59:33 +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:Message-ID:Date:Subject:CC :To: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=q/F4rm5Z40lpUmnme8QVwMh8M/HsWPrbt7a+q2w1KPI=; b=y6IqWjD/XQeDHA DvDg3HEYcuuus+u/YtB0PrvfeOglTUy1eFdI+VPeB+ox8zoYeXSt+LhvCVBQXBg3fd/cvKeKKyjTs agPiUUwZNXoESnDxlZMT8yYdDxeOrGS27NP+ySVVV7yD+Bm3p5O+Psmf8piy6obW2VKy82xO0fc1D 7iD1M1nqLe7GsjcqIaPEvPwWHLUdjWi2LEkus02rhtEzzkFMeURaM4cpT0E4/PzHTgMWwbv4F2Du6 tBbKxaNX+aMrcs7AwWRw7wV2BzVea10iTEKRX6kqli1UScHkJbtGPiQin1v0A8qAKBTCEdWwKL75O fUYY2zDX6nvWqHbg1lKA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot3OC-004OXZ-CW; Thu, 10 Nov 2022 08:58:24 +0000 Received: from mx0b-0039f301.pphosted.com ([148.163.137.242]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1ot3Nf-004OIo-Bv for linux-arm-kernel@lists.infradead.org; Thu, 10 Nov 2022 08:57:54 +0000 Received: from pps.filterd (m0174680.ppops.net [127.0.0.1]) by mx0b-0039f301.pphosted.com (8.17.1.19/8.17.1.19) with ESMTP id 2AA8XZIM005288; Thu, 10 Nov 2022 08:57:30 GMT Received: from eur05-am6-obe.outbound.protection.outlook.com (mail-am6eur05lp2106.outbound.protection.outlook.com [104.47.18.106]) by mx0b-0039f301.pphosted.com (PPS) with ESMTPS id 3krwuag33q-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Thu, 10 Nov 2022 08:57:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=jCfN+atovDxJxX7HeRjHwExf9eRflozp+8vMo8PgMRbje+fZ9IxxGn5164NaZAknvFRmOszTej+OOK9nWvgn9A28qKzwqIt9jAdF+3XP5tPZS82cftWL/NoEUhI1t+6oa5FlKyinufoay+7i8qNWheroCv33mN//LzB09jrqhzX+vErO1eofF0s84KASN3fJ4Ou/498X5xUgE6ne1a0Vi7YK7PEZaAGOQViZbKUvbWOtTQbuzHgjVAEReELUnKC9JQV5aBj+EgXwWKX1rMf7CfK7MMlZmvb9bJLP6qL1kSQWfXDR6u4DYZe2RgR7j3dXU8InA5sUyC4QRN/DBjzAog== 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=E6MY6GLpPznR6Qx+Uq42csnjWYlGniYaNAZ1jcOWQ6k=; b=DzgS5bekaa9X6FylYZof6zfyWuDOLFRhd/4bC7MDoqXgHhfSFm9BzyibO/yH4SLTD7EXdbOebht1BoMPZSrJbAORtVfEE3E6aCM/y3ctkIykiwVtdMMPx2buvarqQlhhLQE/PmXlqOurjVV1jvyxyggLn5lZPkQzvTPwk/tW0L301IiVSfUFC5+6RUUWPFYk6DInCgZVIfUIO5GzxRo4UGWsRx/EmgHfSKPlOdn2vy/Jfko+vu4vdMg+Yq6ae72AVBEjpXbk8/uCxiLwTrhVpOptbAJ5b22H4EGUR+87Jy7sKuBlmZzLYEdxtL9pVtbQZaR6F9THXLYoLh04UwAzNQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=epam.com; dmarc=pass action=none header.from=epam.com; dkim=pass header.d=epam.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=epam.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=E6MY6GLpPznR6Qx+Uq42csnjWYlGniYaNAZ1jcOWQ6k=; b=MOAKOEGPC9gVxQwiLO1DwPcPqyn6ufQw/I2A04A2dHSkEg3C5f2GZQsfL9cpZeQSYtC0E32DlmL5vfamTr/FDOdDOo58GEtgBbK+Y9lJhQtjdxABE0hiNQEPlyUsvOQ7V2iWj5FKpLwFUexUo7ZIH9XW4b1LusWUU5I/UdqYquajbxHwXTP0jMHOHuZTq7hMscNKw6MZK6eVyJVZIqKbn0S4vuRAqBEhRDITKX7KtB0Mw2qrK9jp2HajwHHFx7eRX7DcqyGvfAy0vuOMxYrMxY0el90W7L8r8MmjiEZld2cv6+Vb2uj1f67CEPvzf++b7lDrugslzpVdfsitve7Lhw== Received: from PA4PR03MB7136.eurprd03.prod.outlook.com (2603:10a6:102:ea::23) by AS8PR03MB6822.eurprd03.prod.outlook.com (2603:10a6:20b:295::9) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5791.22; Thu, 10 Nov 2022 08:57:27 +0000 Received: from PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::cc80:5238:61b7:43c4]) by PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::cc80:5238:61b7:43c4%5]) with mapi id 15.20.5791.027; Thu, 10 Nov 2022 08:57:27 +0000 From: Oleksii Moisieiev To: "robh+dt@kernel.org" CC: Oleksii Moisieiev , "mcoquelin.stm32@gmail.com" , "alexandre.torgue@st.com" , "linus.walleij@linaro.org" , "gregkh@linuxfoundation.org" , "devicetree@vger.kernel.org" , "tomase@xilinx.com" , "benjamin.gaignard@st.com" , "broonie@kernel.org" , "arnd@arndb.de" , "shawnguo@kernel.org" , "fabio.estevam@nxp.com" , "loic.pallardy@st.com" , "mark.rutland@arm.com" , Sudeep Holla , Cristian Marussi , Stefano Stabellini , "a.fatoum@pengutronix.de" , "peng.fan@oss.nxp.com" , "linux-kernel@vger.kernel.org" , Krzysztof Kozlowski , "linux-arm-kernel@lists.infradead.org" Subject: [PATCH v4 0/2] dt-bindings: Intorduce domain-controller Thread-Topic: [PATCH v4 0/2] dt-bindings: Intorduce domain-controller Thread-Index: AQHY9OJ0NJO3IBK0dkaU7boFPDCicw== Date: Thu, 10 Nov 2022 08:57:26 +0000 Message-ID: Accept-Language: en-US Content-Language: en-US X-MS-Has-Attach: X-MS-TNEF-Correlator: x-ms-publictraffictype: Email x-ms-traffictypediagnostic: PA4PR03MB7136:EE_|AS8PR03MB6822:EE_ x-ms-office365-filtering-correlation-id: f2f0472d-c19b-4dbb-90d1-08dac2f9977a x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: wvRUG/K+RIgmto/sZnHgU6ftf290oNfRik+0nUTHBtFeTIcSpeciVxk1SVhQvY+2ozafCobRiBHrpxM7aDmPKIGRcUGWlMNEM6RHeHxkc3zgn5LR0DOgZ94tUYmTviJJkBJzpLCRV8IndNNRupR5ELP13hQQNcHVUG52FLpyPkqV4hr58Fsuk5UlhrXNIZ0b2mZFwybQGmbCKDBMFw4CzA1bLbvEv4UEHMssUltYjBpL3TxcGHiKPxvSCG6leNmM0+Zy+1/8PrWSVrB1M2+rCixcyQF/CNf1KQVMgrRLsEV4AXZzexY42OZRa+Tve/cG4prkPwHkEqwia6tQYbhAQAGNbbTrhkQPNa4RhIIm6q7UzNgg/Q8UZOq9J5I6MAD6eYkfPOrQzE1oBrY9XkoGQWI+R1LGBKNnnF7ZbQwUAib7oYlcFLQTnNTm/wzri2meuM6LLNWy8LuZ+FyYSbQujuXr3RVc3nLQJAMt9go+6MU7VxBKNIFmtUIPIBEuKQ3cDsFEFQOmnhRx+lmLXHdPGXRpuHOXu5lRePGRctAqTSocmG0SqrYHqx28nXqPRIFB94klQK1BFYxB12m9sE9fogUjjp5f7uY6ZJg25UcHFKRgbr7xohhkbUV7oibOrDwzP7A1fkwimn7bcMvJ1QVjWqtu0AIDAyCkL/WSMTXB9NViqPfPzIdQydyqTis6LbGjVB42l2XvDb+cOXksd90c7C7FS9qT65mGOF8wv9tepctdksuvXmr9wT/rvVXtLJwpLRXDfelZ/+EQnW9+L6qcJG0v+viF4Lr7ZfuahdERarWccPpilNl4ksaYIkZogYbzBMir9ADVaAQJFeIMIAq6LA== x-forefront-antispam-report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PA4PR03MB7136.eurprd03.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230022)(4636009)(366004)(39860400002)(136003)(346002)(396003)(376002)(451199015)(86362001)(38070700005)(36756003)(7416002)(2906002)(2616005)(6506007)(6512007)(26005)(83380400001)(186003)(5660300002)(38100700002)(122000001)(91956017)(66946007)(66476007)(76116006)(316002)(66446008)(64756008)(66556008)(8936002)(71200400001)(54906003)(4326008)(478600001)(6486002)(8676002)(41300700001)(966005);DIR:OUT;SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?zrxh9HT1zNY9DuOHg16DH4n?= =?iso-8859-1?q?61i67DefNE0Wq4DHZssZa+jNGhhw6+mK8lstVou1SPR9v/Dn1bOPhIosv/Ua?= =?iso-8859-1?q?E+EdhvDi2sm71pOB3GoP//V7lqczNbRnHM9w2PyVd8lvfnkiF8IkW4MsHE4B?= =?iso-8859-1?q?m606BEE+mE8R6cMdbH8U/vRwOnRgxbKLFIcmG5/wnz7R2nceOx9gvYxYax3y?= =?iso-8859-1?q?vP1wvT0RtHLp2lnMbGcfSgRK8zR1uguTqyMcF+SMHpX85AovBXZiWkSVcwG+?= =?iso-8859-1?q?aJn7IXY7SX4D0kUevfVJ0h0oNiGnitAba/El06h+mWVI8mqweOU7WUFM5Yfh?= =?iso-8859-1?q?vXMmeVUpmX07nJrhN+jaCHravmgdWg9pNIjhF+/QJ9NtxVCAKiyT/1csYEeV?= =?iso-8859-1?q?qRxq9X2CyZoo9qBrrR/xdSEGTE25D5jtttJVjalkqIVyxBLhUhmBPka0mZOm?= =?iso-8859-1?q?/wLkvY9OKauLr/7Qu1Pfo0G07RfVjqbRBqD8Slm+vPmQFBFk9sQDCgYYysr5?= =?iso-8859-1?q?eltOGyMBJICyhOYLK3TkTgPhHvxkmebZihJFLmmeB/lsZOCpzE5zdSnIsYlc?= =?iso-8859-1?q?yG79WN0J2viNfA8akmFF2o4SQVH0MTHfZOM+lDoZzZc5LgYr+279y+Klvv7h?= =?iso-8859-1?q?r6fyQXAC2Gnmd+aEk3WH5MZSsEUfTKE30jy0rGt2aFEaOX+iV5EGVgfd4CPq?= =?iso-8859-1?q?H651Ii4O6Fa34EhQV1vDCiG9S8beNe5fjyNzciM2lKHc5vMIxwy2ydAsQVVm?= =?iso-8859-1?q?dD2RiA5/Ztt4UhtY1E/EaT2A0g3rTLG1rG4xJRaNXL7UPoLEjEawJ81M29d/?= =?iso-8859-1?q?fHMPgNwgdV24knmAph7GQXhj5Zf0UZDVcdIM3a+4OP5PyMsstwmmaEDx7j3C?= =?iso-8859-1?q?0U6cJ+7umvP9BxQ+hw9JTnczHlZOofq/0f25SuA+j+nc8kqs3L4b/Kwqo5/g?= =?iso-8859-1?q?womm1Tuwi+xwTbGZdqRr8X2ZLHYVokiIxJWP/oYq/EGKbn8znMx6canbkYlA?= =?iso-8859-1?q?dEyC3AncaMMh0YVGhIocc5DvavQF9v3XcTQRvsAyIpOuQjEiyt2X9Qg+gOgv?= =?iso-8859-1?q?9HzJQoVYsmeYqf1hxjEmsMIDGz94eTG4gg1uxAXHIGSUAYOFOvWhKZ1sSDt4?= =?iso-8859-1?q?bMCwxs7yfV14ykv94GBk1zpPRIQsJJoYvRMlNVJc7GVo7Ge7BLVZf4nLtaR4?= =?iso-8859-1?q?esmsKWjTs8FI7h+RJ0H5ac3QpUze4W4MlzKrh8Z2fB8Wof1f4A4HfgOh4Sum?= =?iso-8859-1?q?v6oousWkpDG4g1DExzFPfPSQJdH+cZsQ3nMoHMQ6TTotDQA4tsw7XZMlZumn?= =?iso-8859-1?q?9tD2u4d5GnCk6rpeKRbwA7ax9rS5a9riG4H8aUZFemY+7b94nzvbG9cGS2b7?= =?iso-8859-1?q?LrGAYrME7LoIcwQh8z3LiUAPgEir4XvLUkNj+ry1t0A0zgAXyo2mg7me7tX7?= =?iso-8859-1?q?rAbB/RhNgRxC7lKmbMQTBhUjDVd7ue91Ucpah1NtTwMi3o3JkfOk4bgwvbsX?= =?iso-8859-1?q?MrtotroP0xvFajHOXJS6NGA2mORNL62K+x/6DrtGbHq4jCkbn28LgUoVhUE8?= =?iso-8859-1?q?2ED5dOKQjlJ5sEOcrkjtbYoyvzoAQkwzXlC+dlrPE8tc1PFt4G4eq8hHX18G?= =?iso-8859-1?q?Pkb7orHID2aNQStA1jZ8Juvyv17UmSRQNH24jNQ=3D=3D?= MIME-Version: 1.0 X-OriginatorOrg: epam.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-AuthSource: PA4PR03MB7136.eurprd03.prod.outlook.com X-MS-Exchange-CrossTenant-Network-Message-Id: f2f0472d-c19b-4dbb-90d1-08dac2f9977a X-MS-Exchange-CrossTenant-originalarrivaltime: 10 Nov 2022 08:57:26.9758 (UTC) X-MS-Exchange-CrossTenant-fromentityheader: Hosted X-MS-Exchange-CrossTenant-id: b41b72d0-4e9f-4c26-8a69-f949f367c91d X-MS-Exchange-CrossTenant-mailboxtype: HOSTED X-MS-Exchange-CrossTenant-userprincipalname: bZ2Bo0vKV9ZGxkZQjBYj6mBrrIZZseg0KJbIPpMyjT5B7leVzvcAnDK2tTIowKUAu9LEqJZeVAp1jIxv1ewE90UyHrRuP71jwGC/+gNwQXA= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB6822 X-Proofpoint-GUID: 2SRUNt4g_iHX6uAf8t9y23duWvjz8i0H X-Proofpoint-ORIG-GUID: 2SRUNt4g_iHX6uAf8t9y23duWvjz8i0H X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.219,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-11-10_07,2022-11-09_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 malwarescore=0 impostorscore=0 adultscore=0 mlxscore=0 priorityscore=1501 bulkscore=0 phishscore=0 spamscore=0 clxscore=1011 mlxlogscore=908 lowpriorityscore=0 suspectscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2210170000 definitions=main-2211100067 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221110_005751_930370_2410BBD6 X-CRM114-Status: GOOD ( 17.05 ) 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 Introducing the feature domain controller provider/consumenr bindngs which allow to divided system on chip into multiple feature domains that can be used to select by who hardware blocks could be accessed. A feature-domain could be a cluster of CPUs, a group of hardware blocks or the set of devices, passed-through to the Guest in the virtualized systems. Feature domains controllers are typically used to set the permissions of the hardware block. The contents of the feature domain configuration properties are defined by the binding for the individual feature domain controller device. The feature device controller conception in the virtualized systems is to set the device configuration for SCMI (System Control and Management Interface) which controls clocks/power-domains/resets etc from the Firmware. This configuratio sets the device_id to set the device permissions for the Firmware using BASE_SET_DEVICE_PERMISSIONS message (see 4.2.2.10 of [0]). There is no BASE_GET_DEVICE_PERMISSIONS call in SCMI and the way to determine device_id is not covered by the specification. Device permissions management described in DEN 0056, Section 4.2.2.10 [0]. Given parameter should set the device_id, needed to set device permissions in the Firmware. This property is used by trusted Agent (which is hypervisor in our case) to set permissions for the devices, passed-through to the non-trusted Agents. Trusted Agent will use device-perms to set the Device permissions for the Firmware (See Section 4.2.2.10 [0] for details). Agents concept is described in Section 4.2.1 [0]. Feature-Domains in Device-tree node example: usb@e6590000 { feature-domains = <&scmi 19>; //Set domain id 19 to usb node feature-domain-names = "scmi"; clocks = <&scmi_clock 3>, <&scmi_clock 2>; resets = <&scmi_reset 10>, <&scmi_reset 9>; power-domains = <&scmi_power 0>; }; &scmi { feature-domain-controller; #feature-domain-cells = <1>; } All mentioned bindings are going to be processed by XEN SCMI mediator feature, which is responsible to redirect SCMI calls from guests to the firmware, and not going be passed to the guests. Feature-domain-controller provider/consumenr concept was taken from the bus controller framework patch series, provided in the following thread: [1]. I think we can cooperate with the bus controller framework developers and produce the common binding, which will fit the requirements of both features Also, I think that binding can also be used for STM32 ETZPC bus controller feature, proposed in the following thread: [2]. Looking forward for your thoughts and ideas. [0] https://developer.arm.com/documentation/den0056/latest [1] https://lore.kernel.org/all/20190318100605.29120-1-benjamin.gaignard@st.com/ [2] https://lore.kernel.org/all/20200701132523.32533-1-benjamin.gaignard@st.com/ --- Changes v1 -> V2: - update parameter name, made it xen-specific - add xen vendor bindings Changes V2 -> V3: - update parameter name, make it generic - update parameter format, add link to controller - do not include xen vendor bindings as already upstreamed Changes V3 -> V4: - introduce domain controller provider/consumer device tree bindings - making scmi node to act as domain controller provider when the device permissions should be configured Changes V4 -> V5: - rename domain-controller to feature-domain-controller - feature-domains format fixes Changes V5 -> V6: - formatting fixes Oleksii Moisieiev (2): dt-bindings: Update scmi node description dt-bindings: Document common device controller bindings .../feature-domain-controller.yaml | 84 +++++++++++++++++++ .../bindings/firmware/arm,scmi.yaml | 28 +++++++ MAINTAINERS | 6 ++ 3 files changed, 118 insertions(+) create mode 100644 Documentation/devicetree/bindings/feature-controllers/feature-domain-controller.yaml