From patchwork Wed Oct 26 17:51: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: 618953 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 461C8C38A2D for ; Wed, 26 Oct 2022 17:52:03 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S234210AbiJZRwC (ORCPT ); Wed, 26 Oct 2022 13:52:02 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:55448 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S233881AbiJZRwB (ORCPT ); Wed, 26 Oct 2022 13:52:01 -0400 Received: from mx0a-0039f301.pphosted.com (mx0a-0039f301.pphosted.com [148.163.133.242]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3ADAE915E9; Wed, 26 Oct 2022 10:51:59 -0700 (PDT) Received: from pps.filterd (m0174677.ppops.net [127.0.0.1]) by mx0a-0039f301.pphosted.com (8.17.1.5/8.17.1.5) with ESMTP id 29QEjikG018352; Wed, 26 Oct 2022 17:51:30 GMT Received: from eur04-he1-obe.outbound.protection.outlook.com (mail-he1eur04lp2059.outbound.protection.outlook.com [104.47.13.59]) by mx0a-0039f301.pphosted.com (PPS) with ESMTPS id 3kf6xmgqmq-1 (version=TLSv1.2 cipher=ECDHE-RSA-AES256-GCM-SHA384 bits=256 verify=NOT); Wed, 26 Oct 2022 17:51:30 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=JEUR9H0pnX9PsWPayOuw24yKy+9MJwv8Ax443t9/3BPIg/uKKYzUBwTTAIlDvT+z8yTYhFG56h216252f21Wofx8aPv29xr1RKjF8wfj7VtHsbSXhq5ssjNUhfeQoHvQbsU9Dz+dsknUycQbX53/a9Eq1KAX3h2TwihCqpgJnFLLNnkZ0e5qBoliw8zyrNewnZVRRNRkEdMB3WkgrqMw8sdSnLq0DUY2Ac7NsA7UB7U3RO8fcGQqwmsqJ9W1maPVVr62FslJYE2A04n425KVfJw72h2jLR+Vc3VmYkcYSynPBfzfTOvkFLuKDxhSPov/or2s+m/Y9a2KNXtK1KfLCA== 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=H0LphD6/i9eGF8ENerwMRiQakV60OUA/XK5uA7LdGO8=; b=IVqfTxuKmWItJjppOI3iQgBuAMDneIEJ8qB/32UjKumSJMgxmXa0nmdFSoDqYrFUzxnTTMi07WpV6tQG1cyRXmyzDzxF9sjAh1JMYTu02MitqluTP+0MaSetmr3baeMy2oFv8dfbcMqtQrohQbGt61Lfz2mEiAXmZB5uAYf7V8omT9jeZZKV2q5sleOVJDkYGUbTrMQb9D8fn4bCtP3IM5wOOHZUH2r09DJGAXK2Y+xXsip1V/n9SUGd8h4Y7HPRFpWmncLVJAerazCcrXVhFspD/kh62eoK4x+e1QEUY4RCI2RVZQ+Cbk3/9QCNfWsv3qOkAYvQrbWSvyZNB3SYhA== 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=H0LphD6/i9eGF8ENerwMRiQakV60OUA/XK5uA7LdGO8=; b=UhQFai70eJVepSfViY+LLOjUouDuQt164EKcqASpk5VC7wgP0j71EBcFyl3thGwgo8TQihsaM+BjYFhO8U9F0w8GUzNrBhjuPH0/wqPEy7uhvp1O7oGQZ1fVTKbiCj5R+qDwi4NRcKaAghweQHVvHOuOmfQBSAWTvMcvWQi+8wsCFDYhu6RQNi+5SuHb40cDceMMjWWRgxADOB7GlSd5E0b0kBqNsJKJH973GpRPPs8Ndt4+2ryge5cRA67T1Iz98mjNgMEYMsYOQ9lXyozDB1NIMSMA3QjUeqqeZjoMwS9PaTQgA4veg8b2ZD5enBhqCabije4b/Ev6z1z+eKmqyw== Received: from PA4PR03MB7136.eurprd03.prod.outlook.com (2603:10a6:102:ea::23) by AS8PR03MB9069.eurprd03.prod.outlook.com (2603:10a6:20b:5b5::7) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.5746.23; Wed, 26 Oct 2022 17:51:27 +0000 Received: from PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::551e:e1bc:b684:b7bb]) by PA4PR03MB7136.eurprd03.prod.outlook.com ([fe80::551e:e1bc:b684:b7bb%9]) with mapi id 15.20.5746.028; Wed, 26 Oct 2022 17:51:26 +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" Subject: [PATCH v5 0/2] dt-bindings: Introduce feature-domain-controller Thread-Topic: [PATCH v5 0/2] dt-bindings: Introduce feature-domain-controller Thread-Index: AQHY6WOR9rgqInIf80e8qho4/jJecA== Date: Wed, 26 Oct 2022 17:51: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_|AS8PR03MB9069:EE_ x-ms-office365-filtering-correlation-id: 89b834b2-2eed-4383-4e94-08dab77ab482 x-ms-exchange-senderadcheck: 1 x-ms-exchange-antispam-relay: 0 x-microsoft-antispam: BCL:0; x-microsoft-antispam-message-info: 8ELNAewwmsyNdHoUd0VupmnbgpmmkFQEUiqrPB3f04K34PkmpCDq2s5RxMBOvPAfi2W+gkEBtGa3AlTh2azgTRXccwNrbA2ZkiQvf8Jjc1ATg8m3FK4KgzzWYtrc3+AOyAsNklhRt/Nx3bTx+TJRgs0Kt3nN7KpbJytiDAv/X56lmhAm5z1wLLmQyE4NMRm6IbzkVDItdokv3Ee1TVGCFYC/jDO9ZRqCtlAttktBm7cp6OnTt1kIxWKjAst5BITPT6PmvzPT9UJHIWzsEWun6hAIrcyo38j26WIfo5+h419C2HPTibIm1ups7QZH49MNedOGfybLGcE6o1y2y6EwG30FM28JUD5TojRxCTxgb1e9J2BHBMlsG9RgKs8uKtKogrpdWPO5okbwtVTbL1GrHvggzSJbwtlgraloKX7PaqIdaUldkD9fzOA1H2Qily2be02WW9uut3/o/iuM2/y3sZ2e/ZY6WY+4Iaq6x9HPPzQT4UKWd0998sfpj0kSzqOGleBwwI1GinI3NnLzJhwcAzfeAGbUuo4OobxkA4dnqPqlmqd4eE711E81PWYU00G9Mtfp7tCh2TNqkhb4h3Jsd48CfCNd93lOZb7iFecb9mTYMpgSQNs1h904uCW9+eGLiG7MCSu6hk3eVKfPiA0iEyyGb4KccX3srD4hEebjhGo0z3qWQCW95gLBVE0GYFm1XeWrWMvX8JsIfEmq4pRLWEXJuwKHPkdDvM8gEG/Eq5Dy0Qosj68je9DsmzaQwzMaNmwqf6/r4wBtMH7L50TmSLM4hDmkAoru8s+xd8h3MOzpXaAle4J1fqJdwtq1bw15vmjTUkgC3m3cCZD4Dxta1w== 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)(136003)(376002)(39860400002)(396003)(366004)(346002)(451199015)(8676002)(83380400001)(71200400001)(76116006)(91956017)(36756003)(478600001)(4326008)(6486002)(966005)(6512007)(38070700005)(26005)(54906003)(316002)(86362001)(8936002)(122000001)(38100700002)(2906002)(41300700001)(2616005)(7416002)(186003)(5660300002)(6506007)(66476007)(64756008)(66446008)(66946007)(66556008); DIR:OUT; SFP:1101; x-ms-exchange-antispam-messagedata-chunkcount: 1 x-ms-exchange-antispam-messagedata-0: =?iso-8859-1?q?shBO/HSomw2jmcBJz7Ze84Z?= =?iso-8859-1?q?1ArCwMvdH35U63BibtuOuhcmAI6YI0qwcfzzIa+mHGaE4nLLwrHL11uDih/p?= =?iso-8859-1?q?chffFpzY7Y1D4IiqWNBgoYJo3yDxD6IMubF0vsKMt3xzWl8Yf8BuqP91X82S?= =?iso-8859-1?q?0kz3e97zvwTADUIA8SE64iG7tWegCd9pVqk4JaZdZUNL+H3arij8BFLgDaRi?= =?iso-8859-1?q?uR4nNdw3j+GoN3Y0gEvu7NT0V60y9jJOhGLSgJybsQHMQI0Gb5OSi8D2GDMq?= =?iso-8859-1?q?bbsnx4Jjk+YLzyj+3wlXTxh8F59GoOOmjkUcwc0eFeE4G2sjGUZDe2dGwYT8?= =?iso-8859-1?q?w6qwEqYT4NR2iGAAVaDDbp8CcI4ahkiXgbNJC5aBZnc/97OGfVvfJAsy/kx1?= =?iso-8859-1?q?cl07iePRrjEQVAu9gnhx5pd/phExbWx7le+piCUyZAEkRmYuaO31et5gg5JE?= =?iso-8859-1?q?k/iGH0UM6p+Cx2d3Ecy68DvnmXhmA/As8FTvmfQ7Rest3HvwMLS59Xv/VtCX?= =?i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bUSF/Fyh3gtCZUZ5c3Y4Hoh4VQOJs7uRlaKo1dCfuL77K1Mi9P9zdhS?= =?iso-8859-1?q?97ejcvR1EHrreH+zjJJAzDuTbQZztkGXaWSBqW2duhMS7yhPv8wCVv7Vhl49?= =?iso-8859-1?q?l0upbBJ980CtGeIS87kOlsbFkH4m4gHE6EF79oPGLGpVuhMYmeVCNeWEN68k?= =?iso-8859-1?q?RudJnXujfCZ3TSNkCT6CeFd2WURDlyBDni6Rzmd3WiKvrnCiLMjNy6ayghXB?= =?iso-8859-1?q?9W8EFdIHEh89VeuGrj01VPQ5iY4rmm+Y7r9SCqw=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: 89b834b2-2eed-4383-4e94-08dab77ab482 X-MS-Exchange-CrossTenant-originalarrivaltime: 26 Oct 2022 17:51:26.8053 (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: LkF7mNFd6sNLpCL8RG/JHpPXW1nJwn56EAvnCofHbBy4KWARf1fGkwAuedlknOIg/y7iavWZ/ioz3+XCgRvx7h41qP5r6tPIWwr0TWgSUFs= X-MS-Exchange-Transport-CrossTenantHeadersStamped: AS8PR03MB9069 X-Proofpoint-ORIG-GUID: NK7P8RcS9b-XtnZgntZ4IxKo97dJ8N9s X-Proofpoint-GUID: NK7P8RcS9b-XtnZgntZ4IxKo97dJ8N9s X-Proofpoint-Virus-Version: vendor=baseguard engine=ICAP:2.0.205,Aquarius:18.0.895,Hydra:6.0.545,FMLib:17.11.122.1 definitions=2022-10-26_07,2022-10-26_01,2022-06-22_01 X-Proofpoint-Spam-Details: rule=outbound_notspam policy=outbound score=0 lowpriorityscore=0 bulkscore=0 impostorscore=0 suspectscore=0 mlxscore=0 mlxlogscore=940 adultscore=0 clxscore=1011 phishscore=0 malwarescore=0 spamscore=0 priorityscore=1501 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.12.0-2209130000 definitions=main-2210260101 Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.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 Fimware 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 Oleksii Moisieiev (2): dt-bindings: Update scmi node description dt-bindings: Document common device controller bindings .../feature-domain-controller.yaml | 80 +++++++++++++++++++ .../bindings/firmware/arm,scmi.yaml | 28 +++++++ 2 files changed, 108 insertions(+) create mode 100644 Documentation/devicetree/bindings/feature-domains/feature-domain-controller.yaml