public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation
@ 2026-02-24  9:23 hehuan1
  2026-02-24 18:01 ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: hehuan1 @ 2026-02-24  9:23 UTC (permalink / raw)
  To: ulf.hansson, robh, krzk+dt, conor+dt, jszhang, linux-mmc,
	devicetree, linux-kernel
  Cc: ningyu, linmin, pinkesh.vaghela, xuxiang, Huan He, Pritesh Patel

From: Huan He <hehuan1@eswincomputing.com>

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")
Signed-off-by: Pritesh Patel <pritesh.patel@einfochips.com>
Signed-off-by: Huan He <hehuan1@eswincomputing.com>

---
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/20260211094736.88-1-hehuan1@eswincomputing.com/
---
 Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
index 7e7c55dc2440..5cebe5eb1efb 100644
--- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
+++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
@@ -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:
-- 
2.25.1


^ permalink raw reply related	[flat|nested] 4+ messages in thread

* Re: [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation
  2026-02-24  9:23 [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation hehuan1
@ 2026-02-24 18:01 ` Conor Dooley
  2026-02-25  3:24   ` Huan He
  0 siblings, 1 reply; 4+ messages in thread
From: Conor Dooley @ 2026-02-24 18:01 UTC (permalink / raw)
  To: hehuan1
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, jszhang, linux-mmc,
	devicetree, linux-kernel, ningyu, linmin, pinkesh.vaghela,
	xuxiang, Pritesh Patel

[-- Attachment #1: Type: text/plain, Size: 2148 bytes --]

On Tue, Feb 24, 2026 at 05:23:37PM +0800, hehuan1@eswincomputing.com wrote:
> From: Huan He <hehuan1@eswincomputing.com>
> 
> 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")
> Signed-off-by: Pritesh Patel <pritesh.patel@einfochips.com>
> Signed-off-by: Huan He <hehuan1@eswincomputing.com>

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

> 
> ---
> 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/20260211094736.88-1-hehuan1@eswincomputing.com/
> ---
>  Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml | 3 +++
>  1 file changed, 3 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> index 7e7c55dc2440..5cebe5eb1efb 100644
> --- a/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> +++ b/Documentation/devicetree/bindings/mmc/snps,dwcmshc-sdhci.yaml
> @@ -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:
> -- 
> 2.25.1
> 

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation
  2026-02-24 18:01 ` Conor Dooley
@ 2026-02-25  3:24   ` Huan He
  2026-02-25 17:55     ` Conor Dooley
  0 siblings, 1 reply; 4+ messages in thread
From: Huan He @ 2026-02-25  3:24 UTC (permalink / raw)
  To: Conor Dooley
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, jszhang, linux-mmc,
	devicetree, linux-kernel, ningyu, linmin, pinkesh.vaghela,
	xuxiang, Pritesh Patel

> > 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")
> > Signed-off-by: Pritesh Patel <pritesh.patel@einfochips.com>
> > Signed-off-by: Huan He <hehuan1@eswincomputing.com>
> 
> 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

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Re: [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation
  2026-02-25  3:24   ` Huan He
@ 2026-02-25 17:55     ` Conor Dooley
  0 siblings, 0 replies; 4+ messages in thread
From: Conor Dooley @ 2026-02-25 17:55 UTC (permalink / raw)
  To: Huan He
  Cc: ulf.hansson, robh, krzk+dt, conor+dt, jszhang, linux-mmc,
	devicetree, linux-kernel, ningyu, linmin, pinkesh.vaghela,
	xuxiang, Pritesh Patel

[-- Attachment #1: Type: text/plain, Size: 1227 bytes --]

On Wed, Feb 25, 2026 at 11:24:29AM +0800, Huan He wrote:
> > > 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")
> > > Signed-off-by: Pritesh Patel <pritesh.patel@einfochips.com>
> > > Signed-off-by: Huan He <hehuan1@eswincomputing.com>
> > 
> > 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.

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

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 228 bytes --]

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2026-02-25 17:55 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-02-24  9:23 [PATCH v3] dt-bindings: mmc: dwcmshc-sdhci: Fix resets array validation hehuan1
2026-02-24 18:01 ` Conor Dooley
2026-02-25  3:24   ` Huan He
2026-02-25 17:55     ` Conor Dooley

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox