diff mbox series

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

Message ID 20250309132959.19045-7-ansuelsmth@gmail.com (mailing list archive)
State New
Headers show
Series airoha: en7581: clk cleanup + USB support | expand

Commit Message

Christian Marangi March 9, 2025, 1:29 p.m. UTC
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 mbox series

Patch

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>;
+    };