[PATCH] dt-bindings: usb: qcom,snps-dwc3: Add missing clock constraints

From: Krzysztof Kozlowski

Date: Thu Mar 19 2026 - 05:24:05 EST


The top-level part defines variable number of clocks and each "if:then:"
block narrows them. It however narrows only the maxItems leaving
minItems undefined, which then takes different values depending on
dtschema being used.

Recommended style is to avoid ambiguity in such case, thus if top-level
part has broad constraints, then each "if:then:" must specify both upper
and lower limits.

Add missing constraints, mostly minItems but also maxItems for one
variant.

Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@xxxxxxxxxxxxxxxx>

---

Apologies for sending two patches for the same file one after another as
independent work. I do drive-by fixes when doing reviews and usually
post such fix immediately.
---
Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml | 7 +++++++
1 file changed, 7 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index 2b6a0939d98d..cddc88e2bad2 100644
--- a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
+++ b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
@@ -173,6 +173,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 3
maxItems: 3
clock-names:
items:
@@ -220,6 +221,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 5
maxItems: 5
clock-names:
items:
@@ -262,6 +264,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 4
maxItems: 4
clock-names:
items:
@@ -281,6 +284,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 4
maxItems: 4
clock-names:
items:
@@ -301,6 +305,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 9
maxItems: 9
clock-names:
items:
@@ -361,6 +366,7 @@ allOf:
properties:
clocks:
minItems: 6
+ maxItems: 6
clock-names:
items:
- const: cfg_noc
@@ -402,6 +408,7 @@ allOf:
then:
properties:
clocks:
+ minItems: 7
maxItems: 7
clock-names:
items:
--
2.51.0