* [PATCH] dt-bindings: access-controllers: add controller configuration property
@ 2024-07-16 16:14 Gatien Chevallier
2024-08-20 9:35 ` Gatien CHEVALLIER
0 siblings, 1 reply; 2+ messages in thread
From: Gatien Chevallier @ 2024-07-16 16:14 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Oleksii Moisieiev, Alexandre Torgue, devicetree, linux-kernel,
Gatien Chevallier
Add a pattern property that allows to define several controller
configuration in the device tree. It allows run-time controller
reconfiguration for an authorized entity as in OP-TEE OS [1].
Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
Link: https://github.com/OP-TEE/optee_os/pull/6946 [1]
---
.../access-controllers/access-controllers.yaml | 18 ++++++++++++++++++
1 file changed, 18 insertions(+)
diff --git a/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml b/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
index 99e2865f0e46..88824719bb73 100644
--- a/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
+++ b/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
@@ -58,6 +58,13 @@ properties:
A list of access controller specifiers, as defined by the
bindings of the access-controllers provider.
+patternProperties:
+ ".*(?<=)-access-conf$":
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+ description:
+ Contains a list of inseparable access controller specifiers that forms
+ an access controller configuration.
+
additionalProperties: true
examples:
@@ -81,4 +88,15 @@ examples:
<&bus_controller 1 3 5>;
access-controller-names = "clock", "bus";
};
+
+ uart5: serial@60200 {
+ reg = <0x60200 0x400>;
+ clocks = <&clk_serial2>;
+ access-controllers = <&bus_controller 0 0 0>, <&bus_controller 1 0 0>,
+ <&clock_controller 2 3>;
+ default-access-conf = <&bus_controller 0 10 0>,
+ <&bus_controller 1 10 0>;
+ shared-access-conf = <&bus_controller 0 256 4>,
+ <&bus_controller 1 256 4>;
+ };
};
--
2.25.1
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] dt-bindings: access-controllers: add controller configuration property
2024-07-16 16:14 [PATCH] dt-bindings: access-controllers: add controller configuration property Gatien Chevallier
@ 2024-08-20 9:35 ` Gatien CHEVALLIER
0 siblings, 0 replies; 2+ messages in thread
From: Gatien CHEVALLIER @ 2024-08-20 9:35 UTC (permalink / raw)
To: Rob Herring, Krzysztof Kozlowski, Conor Dooley
Cc: Oleksii Moisieiev, Alexandre Torgue, devicetree, linux-kernel
On 7/16/24 18:14, Gatien Chevallier wrote:
> Add a pattern property that allows to define several controller
> configuration in the device tree. It allows run-time controller
> reconfiguration for an authorized entity as in OP-TEE OS [1].
>
> Signed-off-by: Gatien Chevallier <gatien.chevallier@foss.st.com>
> Link: https://github.com/OP-TEE/optee_os/pull/6946 [1]
> ---
> .../access-controllers/access-controllers.yaml | 18 ++++++++++++++++++
> 1 file changed, 18 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml b/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
> index 99e2865f0e46..88824719bb73 100644
> --- a/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
> +++ b/Documentation/devicetree/bindings/access-controllers/access-controllers.yaml
> @@ -58,6 +58,13 @@ properties:
> A list of access controller specifiers, as defined by the
> bindings of the access-controllers provider.
>
> +patternProperties:
> + ".*(?<=)-access-conf$":
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> + description:
> + Contains a list of inseparable access controller specifiers that forms
> + an access controller configuration.
> +
> additionalProperties: true
>
> examples:
> @@ -81,4 +88,15 @@ examples:
> <&bus_controller 1 3 5>;
> access-controller-names = "clock", "bus";
> };
> +
> + uart5: serial@60200 {
> + reg = <0x60200 0x400>;
> + clocks = <&clk_serial2>;
> + access-controllers = <&bus_controller 0 0 0>, <&bus_controller 1 0 0>,
> + <&clock_controller 2 3>;
> + default-access-conf = <&bus_controller 0 10 0>,
> + <&bus_controller 1 10 0>;
> + shared-access-conf = <&bus_controller 0 256 4>,
> + <&bus_controller 1 256 4>;
> + };
> };
Hi,
Looking back at this, I think it would be coherent to declare a
dedicated cell definition for this property. It makes little sense
to base it on the #access-controllers-cells as there could be
different arguments. Maybe #access-conf-cells.
Then, I should change the description as this property should describe
a list of access controller configuration entries. This list can contain
references to one or more controller.
What are your thoughts?
Best regards,
Gatien
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2024-08-20 9:36 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-07-16 16:14 [PATCH] dt-bindings: access-controllers: add controller configuration property Gatien Chevallier
2024-08-20 9:35 ` Gatien CHEVALLIER
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).