[PATCH 06/13] dt-bindings: clock: airoha: make reg optional for Airoha EN7581

Christian Marangi
2025-03-09T13:30:49Z

The Airoha EN7581 clock-controller registers are placed in the SCU
(System Controller Unit). Now that additional pheriperals are supported
for the SCU, a dedicated SCU node is created and the clock-controller is
moved as a child of such node hence the register property is taken from
the parent node.

To support this, make the reg property optional and provide an
additional example for this case.

Driver supports both old and new implementation by checking the presence
of the reg property and parsing the register accordingly.

Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
---
.../bindings/clock/airoha,en7523-scu.yaml | 13 ++++++++++++-
1 file changed, 12 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
index fe2c5c1baf43..84e6c3d43868 100644
--- a/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
+++ b/Documentation/devicetree/bindings/clock/airoha,en7523-scu.yaml
@@ -51,7 +51,6 @@ properties:

required:
- compatible
- - reg
- '#clock-cells'

allOf:
@@ -66,6 +65,9 @@ allOf:

'#reset-cells': false

+ required:
+ - reg
+
- if:
properties:
compatible:
@@ -99,3 +101,12 @@ examples:
#reset-cells = <1>;
};
};
+
+ # Example with clock-controller in SCU MFD
+ - |
+ clock-controller {
+ compatible = "airoha,en7581-scu";
+
+ #clock-cells = <1>;
+ #reset-cells = <1>;
+ };
--
2.48.1