Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

dt-bindings: document generic access controllers

Introducing of the generic access controllers bindings for the
access controller provider and consumer devices. Those bindings are
intended to allow a better handling of accesses to resources in a
hardware architecture supporting several compartments.

This patch is based on [1]. It is integrated in this patchset as it
provides a use-case for it.

Diffs with [1]:
- Rename feature-domain* properties to access-control* to narrow
down the scope of the binding
- YAML errors and typos corrected.
- Example updated
- Some rephrasing in the binding description

[1]: https://lore.kernel.org/lkml/0c0a82bb-18ae-d057-562b

Signed-off-by: Oleksii Moisieiev <Oleksii_Moisieiev@epam.com>
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Reviewed-by: Rob Herring <robh@kernel.org>
Signed-off-by: Alexandre Torgue <alexandre.torgue@foss.st.com>

authored by

Oleksii Moisieiev and committed by
Alexandre Torgue
d7218d3c 4cece764

+84
+84
Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: http://devicetree.org/schemas/access-controllers/access-controllers.yaml# 5 + $schema: http://devicetree.org/meta-schemas/core.yaml# 6 + 7 + title: Generic Domain Access Controllers 8 + 9 + maintainers: 10 + - Oleksii Moisieiev <oleksii_moisieiev@epam.com> 11 + 12 + description: |+ 13 + Common access controllers properties 14 + 15 + Access controllers are in charge of stating which of the hardware blocks under 16 + their responsibility (their domain) can be accesssed by which compartment. A 17 + compartment can be a cluster of CPUs (or coprocessors), a range of addresses 18 + or a group of hardware blocks. An access controller's domain is the set of 19 + resources covered by the access controller. 20 + 21 + This device tree binding can be used to bind devices to their access 22 + controller provided by access-controllers property. In this case, the device 23 + is a consumer and the access controller is the provider. 24 + 25 + An access controller can be represented by any node in the device tree and 26 + can provide one or more configuration parameters, needed to control parameters 27 + of the consumer device. A consumer node can refer to the provider by phandle 28 + and a set of phandle arguments, specified by '#access-controller-cells' 29 + property in the access controller node. 30 + 31 + Access controllers are typically used to set/read the permissions of a 32 + hardware block and grant access to it. Any of which depends on the access 33 + controller. The capabilities of each access controller are defined by the 34 + binding of the access controller device. 35 + 36 + Each node can be a consumer for the several access controllers. 37 + 38 + # always select the core schema 39 + select: true 40 + 41 + properties: 42 + "#access-controller-cells": 43 + description: 44 + Number of cells in an access-controllers specifier; 45 + Can be any value as specified by device tree binding documentation 46 + of a particular provider. The node is an access controller. 47 + 48 + access-controller-names: 49 + $ref: /schemas/types.yaml#/definitions/string-array 50 + description: 51 + A list of access-controllers names, sorted in the same order as 52 + access-controllers entries. Consumer drivers will use 53 + access-controller-names to match with existing access-controllers entries. 54 + 55 + access-controllers: 56 + $ref: /schemas/types.yaml#/definitions/phandle-array 57 + description: 58 + A list of access controller specifiers, as defined by the 59 + bindings of the access-controllers provider. 60 + 61 + additionalProperties: true 62 + 63 + examples: 64 + - | 65 + clock_controller: access-controllers@50000 { 66 + reg = <0x50000 0x400>; 67 + #access-controller-cells = <2>; 68 + }; 69 + 70 + bus_controller: bus@60000 { 71 + reg = <0x60000 0x10000>; 72 + #address-cells = <1>; 73 + #size-cells = <1>; 74 + ranges; 75 + #access-controller-cells = <3>; 76 + 77 + uart4: serial@60100 { 78 + reg = <0x60100 0x400>; 79 + clocks = <&clk_serial>; 80 + access-controllers = <&clock_controller 1 2>, 81 + <&bus_controller 1 3 5>; 82 + access-controller-names = "clock", "bus"; 83 + }; 84 + };