All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v4 0/2] dt-bindings: Intorduce domain-controller
@ 2022-07-07 10:25 Oleksii Moisieiev
  2022-07-07 10:25 ` [PATCH v4 2/2] dt-bindings: Update scmi node description Oleksii Moisieiev
                   ` (5 more replies)
  0 siblings, 6 replies; 16+ messages in thread
From: Oleksii Moisieiev @ 2022-07-07 10:25 UTC (permalink / raw)
  To: robh+dt
  Cc: Oleksii Moisieiev, mcoquelin.stm32, alexandre.torgue,
	linus.walleij, gregkh, devicetree, tomase, benjamin.gaignard,
	broonie, arnd, shawnguo, fabio.estevam, loic.pallardy,
	mark.rutland, Sudeep Holla, Cristian Marussi, Stefano Stabellini,
	linux-kernel

Introducing the domain controller provider/consumenr bindngs which allow to
divided system on chip into multiple domains that can be used to select
by who hardware blocks could be accessed.
A 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.

Device controllers are typically used to set the permissions of the hardware
block. The contents of the domain configuration properties are defined by the
binding for the individual domain controller device.

The 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].

Domains in Device-tree node example:
usb@e6590000
{
    domain-0 = <&scmi 19>; //Set domain id 19 to usb node
    clocks = <&scmi_clock 3>, <&scmi_clock 2>;
    resets = <&scmi_reset 10>, <&scmi_reset 9>;
    power-domains = <&scmi_power 0>;
};

&scmi {
    #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.

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
---

Oleksii Moisieiev (2):
  dt-bindings: Document common device controller bindings
  dt-bindings: Update scmi node description

 .../bindings/domains/domain-controller.yaml   | 80 +++++++++++++++++++
 .../bindings/firmware/arm,scmi.yaml           | 25 ++++++
 2 files changed, 105 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/domains/domain-controller.yaml

-- 
2.27.0

^ permalink raw reply	[flat|nested] 16+ messages in thread
* [PATCH v4 0/2] dt-bindings: Intorduce domain-controller
@ 2022-11-10  8:57 ` Oleksii Moisieiev
  0 siblings, 0 replies; 16+ messages in thread
From: Oleksii Moisieiev @ 2022-11-10  8:57 UTC (permalink / raw)
  To: robh+dt
  Cc: Oleksii Moisieiev, mcoquelin.stm32, alexandre.torgue,
	linus.walleij, gregkh, devicetree, tomase, benjamin.gaignard,
	broonie, arnd, shawnguo, fabio.estevam, loic.pallardy,
	mark.rutland, Sudeep Holla, Cristian Marussi, Stefano Stabellini,
	a.fatoum, peng.fan, linux-kernel, Krzysztof Kozlowski,
	linux-arm-kernel

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

-- 
2.25.1

^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2023-04-04  6:02 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-07-07 10:25 [PATCH v4 0/2] dt-bindings: Intorduce domain-controller Oleksii Moisieiev
2022-07-07 10:25 ` [PATCH v4 2/2] dt-bindings: Update scmi node description Oleksii Moisieiev
2022-07-07 10:25 ` [PATCH v4 1/2] dt-bindings: Document common device controller bindings Oleksii Moisieiev
2022-07-11 12:49 ` [PATCH v4 0/2] dt-bindings: Intorduce domain-controller Linus Walleij
2022-07-20 21:32 ` Rob Herring
2022-07-26  7:45   ` Linus Walleij
2022-08-15 16:37 ` Ahmad Fatoum
2022-08-17  7:09   ` Loic PALLARDY
2022-08-18  9:31     ` Oleksii Moisieiev
2022-08-18  9:05   ` Oleksii Moisieiev
2022-08-30  7:34     ` Ahmad Fatoum
2022-09-06  9:27       ` Oleksii Moisieiev
2022-09-01  9:28     ` Peng Fan
2023-04-04  6:02 ` Peng Fan
2022-11-10  8:57 Oleksii Moisieiev
2022-11-10  8:57 ` Oleksii Moisieiev

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.