diff mbox series

[1/2] dt-bindings: firmware: arm, scmi: define support for name based regulators

Message ID 2d78b0f19991f8028d9be913be0a5aefd7d1ee17.1639099631.git.quic_collinsd@quicinc.com (mailing list archive)
State New, archived
Headers show
Series regulator: scmi: add support for registering SCMI regulators by name | expand

Commit Message

David Collins Dec. 10, 2021, 1:54 a.m. UTC
Allow SCMI regulator subnodes to be specified either by ID using
the "reg" property or by name using the "regulator-name" property.

Name based SCMI regulator specification helps ensure that an SCMI
agent doesn't need to be aware of the numbering scheme used for
Voltage Domains by the SCMI platform.  It also ensures that the
correct Voltage Domain is selected for a given physical regulator.
This cannot be guaranteed with numeric Voltage Domain IDs alone.

Signed-off-by: David Collins <quic_collinsd@quicinc.com>
---
 .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 ++++++++---
 1 file changed, 8 insertions(+), 3 deletions(-)

Comments

Rob Herring (Arm) Dec. 15, 2021, 7:51 p.m. UTC | #1
On Thu, 09 Dec 2021 17:54:41 -0800, David Collins wrote:
> Allow SCMI regulator subnodes to be specified either by ID using
> the "reg" property or by name using the "regulator-name" property.
> 
> Name based SCMI regulator specification helps ensure that an SCMI
> agent doesn't need to be aware of the numbering scheme used for
> Voltage Domains by the SCMI platform.  It also ensures that the
> correct Voltage Domain is selected for a given physical regulator.
> This cannot be guaranteed with numeric Voltage Domain IDs alone.
> 
> Signed-off-by: David Collins <quic_collinsd@quicinc.com>
> ---
>  .../devicetree/bindings/firmware/arm,scmi.yaml        | 11 ++++++++---
>  1 file changed, 8 insertions(+), 3 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
index 5c4c6782e052..bc4a84fe25d2 100644
--- a/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
+++ b/Documentation/devicetree/bindings/firmware/arm,scmi.yaml
@@ -155,7 +155,7 @@  properties:
           The list of all regulators provided by this SCMI controller.
 
         patternProperties:
-          '^regulators@[0-9a-f]+$':
+          '^regulator.+$':
             type: object
             $ref: "../regulator/regulator.yaml#"
 
@@ -164,8 +164,13 @@  properties:
                 maxItems: 1
                 description: Identifier for the voltage regulator.
 
-            required:
-              - reg
+              regulator-name: true
+
+            anyOf:
+              - required:
+                  - reg
+              - required:
+                  - regulator-name
 
 additionalProperties: false