Linux MultiMedia Card development
 help / color / mirror / Atom feed
* [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required
@ 2026-03-06 11:27 Ulf Hansson
  2026-03-06 11:50 ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2026-03-06 11:27 UTC (permalink / raw)
  To: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree
  Cc: Jaehoon Chung, linux-mmc, Ulf Hansson, linux-kernel, Ping Gao,
	Krzysztof Kozlowski

The current binding allows one or two clocks to be specified, which is
wrong, as both clocks are needed. This is also confirmed by looking at the
exiting upstream DTS files. Let's update the binding to fix this.

Cc: Ping Gao <ping.gao@samsung.com>
Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
---
 .../devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml          | 1 +
 1 file changed, 1 insertion(+)

diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
index 27c4060f2f91..3e560dde714e 100644
--- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
+++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
@@ -42,6 +42,7 @@ properties:
     maxItems: 1
 
   clocks:
+    minItems: 2
     maxItems: 2
     description:
       Handle to "biu" and "ciu" clocks for the
-- 
2.43.0


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

* Re: [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required
  2026-03-06 11:27 [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required Ulf Hansson
@ 2026-03-06 11:50 ` Krzysztof Kozlowski
  2026-03-06 12:55   ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-06 11:50 UTC (permalink / raw)
  To: Ulf Hansson, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	devicetree
  Cc: Jaehoon Chung, linux-mmc, linux-kernel, Ping Gao

On 06/03/2026 12:27, Ulf Hansson wrote:
> The current binding allows one or two clocks to be specified, which is

It allows only 2 clocks, unless you meant that referenced dw-mshc schema
allows one clock. I don't see it there, so I am a bit confused.

> wrong, as both clocks are needed. This is also confirmed by looking at the
> exiting upstream DTS files. Let's update the binding to fix this.
> 
> Cc: Ping Gao <ping.gao@samsung.com>
> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> ---
>  .../devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml          | 1 +
>  1 file changed, 1 insertion(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> index 27c4060f2f91..3e560dde714e 100644
> --- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> +++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> @@ -42,6 +42,7 @@ properties:
>      maxItems: 1
>  
>    clocks:
> +    minItems: 2

That's redundant, 2 clocks are already implied.

>      maxItems: 2
Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required
  2026-03-06 11:50 ` Krzysztof Kozlowski
@ 2026-03-06 12:55   ` Ulf Hansson
  2026-03-06 13:08     ` Krzysztof Kozlowski
  0 siblings, 1 reply; 5+ messages in thread
From: Ulf Hansson @ 2026-03-06 12:55 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	Jaehoon Chung, linux-mmc, linux-kernel, Ping Gao

On Fri, 6 Mar 2026 at 12:50, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 06/03/2026 12:27, Ulf Hansson wrote:
> > The current binding allows one or two clocks to be specified, which is
>
> It allows only 2 clocks, unless you meant that referenced dw-mshc schema
> allows one clock. I don't see it there, so I am a bit confused.
>
> > wrong, as both clocks are needed. This is also confirmed by looking at the
> > exiting upstream DTS files. Let's update the binding to fix this.
> >
> > Cc: Ping Gao <ping.gao@samsung.com>
> > Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
> > Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> > ---
> >  .../devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml          | 1 +
> >  1 file changed, 1 insertion(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> > index 27c4060f2f91..3e560dde714e 100644
> > --- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> > @@ -42,6 +42,7 @@ properties:
> >      maxItems: 1
> >
> >    clocks:
> > +    minItems: 2
>
> That's redundant, 2 clocks are already implied.

Doesn't maxItems mean the maximum number of clocks? And since clocks
are required, it means that it's perfectly fine to only have one?

My points is, we seems to be requiring *exactly* two clocks, no?

>
> >      maxItems: 2
> Best regards,
> Krzysztof

Kind regards
Uffe

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

* Re: [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required
  2026-03-06 12:55   ` Ulf Hansson
@ 2026-03-06 13:08     ` Krzysztof Kozlowski
  2026-03-09 12:20       ` Ulf Hansson
  0 siblings, 1 reply; 5+ messages in thread
From: Krzysztof Kozlowski @ 2026-03-06 13:08 UTC (permalink / raw)
  To: Ulf Hansson
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	Jaehoon Chung, linux-mmc, linux-kernel, Ping Gao

On 06/03/2026 13:55, Ulf Hansson wrote:
> On Fri, 6 Mar 2026 at 12:50, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>>
>> On 06/03/2026 12:27, Ulf Hansson wrote:
>>> The current binding allows one or two clocks to be specified, which is
>>
>> It allows only 2 clocks, unless you meant that referenced dw-mshc schema
>> allows one clock. I don't see it there, so I am a bit confused.
>>
>>> wrong, as both clocks are needed. This is also confirmed by looking at the
>>> exiting upstream DTS files. Let's update the binding to fix this.
>>>
>>> Cc: Ping Gao <ping.gao@samsung.com>
>>> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
>>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
>>> ---
>>>  .../devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml          | 1 +
>>>  1 file changed, 1 insertion(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
>>> index 27c4060f2f91..3e560dde714e 100644
>>> --- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
>>> @@ -42,6 +42,7 @@ properties:
>>>      maxItems: 1
>>>
>>>    clocks:
>>> +    minItems: 2
>>
>> That's redundant, 2 clocks are already implied.
> 
> Doesn't maxItems mean the maximum number of clocks? And since clocks
> are required, it means that it's perfectly fine to only have one?
> 
> My points is, we seems to be requiring *exactly* two clocks, no?

minItems is already (implied) at 2, so I don't see what is different
here. You can open any other binding and see exactly same pattern
everywhere, so that's why it would be good to see here explanation why
this binding is different than others. IOW, what set here the number of
items to 1?

Best regards,
Krzysztof

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

* Re: [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required
  2026-03-06 13:08     ` Krzysztof Kozlowski
@ 2026-03-09 12:20       ` Ulf Hansson
  0 siblings, 0 replies; 5+ messages in thread
From: Ulf Hansson @ 2026-03-09 12:20 UTC (permalink / raw)
  To: Krzysztof Kozlowski
  Cc: Rob Herring, Krzysztof Kozlowski, Conor Dooley, devicetree,
	Jaehoon Chung, linux-mmc, linux-kernel, Ping Gao

On Fri, 6 Mar 2026 at 14:08, Krzysztof Kozlowski <krzk@kernel.org> wrote:
>
> On 06/03/2026 13:55, Ulf Hansson wrote:
> > On Fri, 6 Mar 2026 at 12:50, Krzysztof Kozlowski <krzk@kernel.org> wrote:
> >>
> >> On 06/03/2026 12:27, Ulf Hansson wrote:
> >>> The current binding allows one or two clocks to be specified, which is
> >>
> >> It allows only 2 clocks, unless you meant that referenced dw-mshc schema
> >> allows one clock. I don't see it there, so I am a bit confused.
> >>
> >>> wrong, as both clocks are needed. This is also confirmed by looking at the
> >>> exiting upstream DTS files. Let's update the binding to fix this.
> >>>
> >>> Cc: Ping Gao <ping.gao@samsung.com>
> >>> Reported-by: Krzysztof Kozlowski <krzk@kernel.org>
> >>> Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
> >>> ---
> >>>  .../devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml          | 1 +
> >>>  1 file changed, 1 insertion(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> >>> index 27c4060f2f91..3e560dde714e 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> >>> +++ b/Documentation/devicetree/bindings/mmc/samsung,exynos-dw-mshc.yaml
> >>> @@ -42,6 +42,7 @@ properties:
> >>>      maxItems: 1
> >>>
> >>>    clocks:
> >>> +    minItems: 2
> >>
> >> That's redundant, 2 clocks are already implied.
> >
> > Doesn't maxItems mean the maximum number of clocks? And since clocks
> > are required, it means that it's perfectly fine to only have one?
> >
> > My points is, we seems to be requiring *exactly* two clocks, no?
>
> minItems is already (implied) at 2, so I don't see what is different
> here. You can open any other binding and see exactly same pattern
> everywhere, so that's why it would be good to see here explanation why
> this binding is different than others. IOW, what set here the number of
> items to 1?

Apologize for the noise and thanks for clarifying!

I just didn't know that omitting minItems implies that it takes the
same value as maxItems.

Actually, there are quite a number of bindings that do specify the
same value for minItems and maxItems, but I assume those could be
simplified then.

Kind regards
Uffe

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

end of thread, other threads:[~2026-03-09 12:20 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2026-03-06 11:27 [PATCH] dt-bindings: mmc: samsung,exynos-dw-mshc: Make both clocks required Ulf Hansson
2026-03-06 11:50 ` Krzysztof Kozlowski
2026-03-06 12:55   ` Ulf Hansson
2026-03-06 13:08     ` Krzysztof Kozlowski
2026-03-09 12:20       ` Ulf Hansson

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