[PATCH v2 2/5] dt-bindings: usb: qcom,snps-dwc3: Add missing clocks and interrupts constraints

From: Krzysztof Kozlowski

Date: Mon Mar 23 2026 - 05:01:24 EST


The top-level part defines variable number of clocks and interrupts, 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>

---

Changes in v2:
1. Narrow also interrupts for qcom,ipq5018-dwc3/qcom,ipq5332-dwc3
---
Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml b/Documentation/devicetree/bindings/usb/qcom,snps-dwc3.yaml
index 2b6a0939d98d..1ad2b52955ee 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:
@@ -470,6 +477,7 @@ allOf:
then:
properties:
interrupts:
+ minItems: 4
maxItems: 4
interrupt-names:
items:

--
2.51.0