Skip to contentSkip to conversation

dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation

PATCH Superseded [email protected] 2 participants 4 messages Feb 24 – Feb 25

Subsystems (2)

v3 of 4 Superseded Latest is v4 →

lore
Share & tools
lore
#0 lore raw

PATCH v3 1/1 dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation

From: Huan He <[email protected]>

The binding defines tuple-style reset-names items for some compatibles, which implicitly enforces a fixed array length via JSON Schema.

Defining global maxItems for resets and reset-names causes these constraints to be intersected via allOf, resulting in an effective minItems equal to the global maxItems. This leads to dtbs_check failures reporting reset arrays as too short, even when the DTS provides the correct number of entries.

Fixes 30009a21f257 ("dt-bindings: mmc: sdhci-of-dwcmshc: Add Eswin EIC7700")

---
Changes in v3:
- Add minItems: 5 in 'else' branch for non-eswin,eic7700-dwcmshc compatibles

Changes in v2:
- Keep the global maxItems constraints and add minItems: 4 for both resets and reset-names properties
- Update commit message

- Link to v1: https://lore.kernel.org/all/[email protected]/

---
 Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +3 -0
index 7e7c55dc2440..5cebe5eb1efb 100644
@@ -50,9 +50,11 @@ properties:
     maxItems: 1
 
   resets:
+    minItems: 4
     maxItems: 5
 
   reset-names:
+    minItems: 4
     maxItems: 5
 
   rockchip,txclk-tapnum:
@@ -146,6 +148,7 @@ allOf:
     else:
       properties:
         resets:
+          minItems: 5
           maxItems: 5
         reset-names:
           items:
Signature · 1 line
2.25.1
#1 lore raw
Quoted 12 lines · On Tue, Feb 24, 2026 at 05:23:37PM +0800, [email protected] wrote:

From: Huan He <[email protected]>

The binding defines tuple-style reset-names items for some compatibles, which implicitly enforces a fixed array length via JSON Schema.

Defining global maxItems for resets and reset-names causes these constraints to be intersected via allOf, resulting in an effective minItems equal to the global maxItems. This leads to dtbs_check failures reporting reset arrays as too short, even when the DTS provides the correct number of entries.

Quoted 3 lines
Fixes 30009a21f257 ("dt-bindings: mmc: sdhci-of-dwcmshc: Add Eswin EIC7700")

Signoff chain looks wrong. You're author and submitter, what did Pritesh do?
Content looks okay to me.

Quoted 43 lines

---
Changes in v3:
- Add minItems: 5 in 'else' branch for non-eswin,eic7700-dwcmshc compatibles

Changes in v2:
- Keep the global maxItems constraints and add minItems: 4 for both resets and reset-names properties
- Update commit message

- Link to v1: https://lore.kernel.org/all/[email protected]/

---
 Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++
 1 file changed, 3 insertions(+)
Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml +3 -0
index 7e7c55dc2440..5cebe5eb1efb 100644
@@ -50,9 +50,11 @@ properties:
     maxItems: 1
 
   resets:
+    minItems: 4
     maxItems: 5
 
   reset-names:
+    minItems: 4
     maxItems: 5
 
   rockchip,txclk-tapnum:
@@ -146,6 +148,7 @@ allOf:
     else:
       properties:
         resets:
+          minItems: 5
           maxItems: 5
         reset-names:
           items:
Signature · 1 line
2.25.1
author
#2 lore raw
Quoted 10 lines
Quoted 10 lines

The binding defines tuple-style reset-names items for some compatibles, which implicitly enforces a fixed array length via JSON Schema.

Defining global maxItems for resets and reset-names causes these constraints to be intersected via allOf, resulting in an effective minItems equal to the global maxItems. This leads to dtbs_check failures reporting reset arrays as too short, even when the DTS provides the correct number of entries.

Quoted 6 lines
Quoted 3 lines
Fixes 30009a21f257 ("dt-bindings: mmc: sdhci-of-dwcmshc: Add Eswin EIC7700")

Signoff chain looks wrong. You're author and submitter, what did Pritesh do?

Thank you very much for taking the time to review the patch and for your valuable feedback.

Internally, Pritesh provided the initial version of this fix, and I have made subsequent updates and refinements before submitting it to the community.

Best regards,
Huan He

#3 lore raw
Quoted 17 lines · Huan He
Quoted 10 lines
Quoted 10 lines

The binding defines tuple-style reset-names items for some compatibles, which implicitly enforces a fixed array length via JSON Schema.

Defining global maxItems for resets and reset-names causes these constraints to be intersected via allOf, resulting in an effective minItems equal to the global maxItems. This leads to dtbs_check failures reporting reset arrays as too short, even when the DTS provides the correct number of entries.

Quoted 6 lines
Quoted 3 lines
Fixes 30009a21f257 ("dt-bindings: mmc: sdhci-of-dwcmshc: Add Eswin EIC7700")

Signoff chain looks wrong. You're author and submitter, what did Pritesh do?

Quoted 6 lines

Thank you very much for taking the time to review the patch and for your valuable feedback.

Internally, Pritesh provided the initial version of this fix, and I have made subsequent updates and refinements before submitting it to the community.

Then you need to add a Co-developed-by tag for them in addition to the Signed-off-by.