Some Qualcomm SoCs such as apq8064 and msm8960 require a third "fs"
clock in addition to "iface" and "core", needed to propagate resets
through the controller and wrapper logic. Later SoCs such as msm8974
dropped this requirement and only use two clocks.

Signed-off-by: Antony Kurniawan Soemardi <[email protected]>
---
This patch updates the ci-hdrc-usb2 binding to allow up to 3 clocks for
qcom,ci-hdrc, to accommodate Qualcomm SoCs that require an additional
"fs" clock for reset propagation.

This is a prerequisite for the following patch series currently under
review:
  - ARM: dts: qcom: apq8064: Fix USB controller clocks [1]
  - ARM: dts: qcom: msm8960: add RPM clock controller and fix USB
    clocks [2]

Without this binding change, those series produce dtbs_check errors
due to the 3-clock entries in their respective device tree sources.

[1] 
https://lore.kernel.org/all/[email protected]/
[2] 
https://lore.kernel.org/all/[email protected]/
---
 .../devicetree/bindings/usb/ci-hdrc-usb2.yaml      | 29 ++++++++++++++++------
 1 file changed, 21 insertions(+), 8 deletions(-)

diff --git a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml 
b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
index 691d6cf02c27..5d18d47efaed 100644
--- a/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
+++ b/Documentation/devicetree/bindings/usb/ci-hdrc-usb2.yaml
@@ -43,14 +43,6 @@ properties:
               - nxp,s32g3-usb
           - const: nxp,s32g2-usb
 
-  clocks:
-    minItems: 1
-    maxItems: 2
-
-  clock-names:
-    minItems: 1
-    maxItems: 2
-
   operating-points-v2:
     description: A phandle to the OPP table containing the performance states.
     $ref: /schemas/types.yaml#/definitions/phandle
@@ -91,6 +83,27 @@ allOf:
   - $ref: chipidea,usb2-common.yaml#
   - $ref: usb-hcd.yaml#
   - $ref: usb-drd.yaml#
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: qcom,ci-hdrc
+    then:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 3
+        clock-names:
+          minItems: 1
+          maxItems: 3
+    else:
+      properties:
+        clocks:
+          minItems: 1
+          maxItems: 2
+        clock-names:
+          minItems: 1
+          maxItems: 2
 
 unevaluatedProperties: false
 

---
base-commit: 70390501d1944d4e5b8f7352be180fceb3a44132
change-id: 20260509-qcom-ci-hdrc-clock-fix-8ad5790ac636

Best regards,
--  
Antony Kurniawan Soemardi <[email protected]>


Reply via email to