[PATCH v5 1/6] dt-bindings: reset: syscon-reboot: Add reg property

Chris Packham posted 6 patches 2 months ago
There is a newer version of this series
[PATCH v5 1/6] dt-bindings: reset: syscon-reboot: Add reg property
Posted by Chris Packham 2 months ago
The syscon-reboot binding used 'offset' for historical reasons. Having a
reg property is appropriate when these nodes are children of a MMIO bus.
Add a reg property and modify the constraints so that one of 'reg' or
'offset' is expected.

Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
---

Notes:
    Changes in v5:
    - New, suggested by Krzysztof

 .../bindings/power/reset/syscon-reboot.yaml           | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
index 75061124d9a8..19d3093e6cd2 100644
--- a/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
+++ b/Documentation/devicetree/bindings/power/reset/syscon-reboot.yaml
@@ -31,6 +31,10 @@ properties:
     $ref: /schemas/types.yaml#/definitions/uint32
     description: Offset in the register map for the reboot register (in bytes).
 
+  reg:
+    maxItems: 1
+    description: Base address and size for the reboot register.
+
   regmap:
     $ref: /schemas/types.yaml#/definitions/phandle
     deprecated: true
@@ -45,9 +49,14 @@ properties:
   priority:
     default: 192
 
+oneOf:
+  - required:
+      - offset
+  - required:
+      - reg
+
 required:
   - compatible
-  - offset
 
 additionalProperties: false
 
-- 
2.46.2
Re: [PATCH v5 1/6] dt-bindings: reset: syscon-reboot: Add reg property
Posted by Krzysztof Kozlowski 2 months ago
On Thu, Sep 26, 2024 at 09:58:42AM +1200, Chris Packham wrote:
> The syscon-reboot binding used 'offset' for historical reasons. Having a
> reg property is appropriate when these nodes are children of a MMIO bus.
> Add a reg property and modify the constraints so that one of 'reg' or
> 'offset' is expected.
> 
> Signed-off-by: Chris Packham <chris.packham@alliedtelesis.co.nz>
> ---
> 
> Notes:
>     Changes in v5:
>     - New, suggested by Krzysztof

Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org>

Best regards,
Krzysztof