diff mbox series

[v12,2/3] dt-bindings: mmc: mtk-sd: increase reg maxItems

Message ID 20220329114540.17140-3-tinghan.shen@mediatek.com (mailing list archive)
State New, archived
Headers show
Series Add basic SoC support for mediatek mt8195 | expand

Commit Message

Tinghan Shen March 29, 2022, 11:45 a.m. UTC
Add optional host top register base for the reg binding description.

Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
---
 Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

Comments

AngeloGioacchino Del Regno March 29, 2022, 12:43 p.m. UTC | #1
Il 29/03/22 13:45, Tinghan Shen ha scritto:
> Add optional host top register base for the reg binding description.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> ---
>   Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index 7032f7adf3ca..6d41bcec900f 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -40,7 +40,8 @@ properties:
>             - const: mediatek,mt8183-mmc
>   
>     reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2

it's just maxItems... adding minItems: 1 is not required.

>   
>     clocks:
>       description:
Matthias Brugger March 29, 2022, 2:27 p.m. UTC | #2
On 29/03/2022 13:45, Tinghan Shen wrote:
> Add optional host top register base for the reg binding description.
> 

Is this based a on a new version of the IP? Shall we make the second reg 
mandatory for the new HW? If I remember correctly the reg needs to be restored 
after power save event. So I suppose mmc won't work if that's not done. So 
optional wouldn't be the right approach.

Can you please clarify if that's the case.

Thanks,
Matthias

> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> ---
>   Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index 7032f7adf3ca..6d41bcec900f 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -40,7 +40,8 @@ properties:
>             - const: mediatek,mt8183-mmc
>   
>     reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2
>   
>     clocks:
>       description:
Rob Herring March 29, 2022, 7:10 p.m. UTC | #3
On Tue, Mar 29, 2022 at 7:43 AM AngeloGioacchino Del Regno
<angelogioacchino.delregno@collabora.com> wrote:
>
> Il 29/03/22 13:45, Tinghan Shen ha scritto:
> > Add optional host top register base for the reg binding description.
> >
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > ---
> >   Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index 7032f7adf3ca..6d41bcec900f 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -40,7 +40,8 @@ properties:
> >             - const: mediatek,mt8183-mmc
> >
> >     reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
>
> it's just maxItems... adding minItems: 1 is not required.

If 1 entry is still valid, then minItems is required. If not, then
it's an ABI break.

Rob
Rob Herring March 29, 2022, 8:38 p.m. UTC | #4
On Tue, Mar 29, 2022 at 07:45:39PM +0800, Tinghan Shen wrote:
> Add optional host top register base for the reg binding description.
> 
> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> ---
>  Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index 7032f7adf3ca..6d41bcec900f 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -40,7 +40,8 @@ properties:
>            - const: mediatek,mt8183-mmc
>  
>    reg:
> -    maxItems: 1
> +    minItems: 1
> +    maxItems: 2

If more than 1 entry, then you need to define what each one is.

>  
>    clocks:
>      description:
> -- 
> 2.18.0
> 
>
Tinghan Shen March 30, 2022, 7:25 a.m. UTC | #5
Hi Rob,

On Tue, 2022-03-29 at 15:38 -0500, Rob Herring wrote:
> On Tue, Mar 29, 2022 at 07:45:39PM +0800, Tinghan Shen wrote:
> > Add optional host top register base for the reg binding description.
> > 
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > ---
> >  Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
> >  1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index 7032f7adf3ca..6d41bcec900f 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -40,7 +40,8 @@ properties:
> >            - const: mediatek,mt8183-mmc
> >  
> >    reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> 
> If more than 1 entry, then you need to define what each one is.

Ok. I'll add definitions at next version.
Thank you.


Best regards,
Tinghan

> 
> >  
> >    clocks:
> >      description:
> > -- 
> > 2.18.0
> > 
> >
Tinghan Shen March 30, 2022, 7:33 a.m. UTC | #6
Hi Matthias,

On Tue, 2022-03-29 at 16:27 +0200, Matthias Brugger wrote:
> 
> On 29/03/2022 13:45, Tinghan Shen wrote:
> > Add optional host top register base for the reg binding description.
> > 
> 
> Is this based a on a new version of the IP? Shall we make the second reg 
> mandatory for the new HW? If I remember correctly the reg needs to be restored 
> after power save event. So I suppose mmc won't work if that's not done. So 
> optional wouldn't be the right approach.
> 
> Can you please clarify if that's the case.

Yes. This change is introduced since mt8183, and the host top register 
is required for mt8183. 

We'll try to describe this change clearly in bindings in next version.


Best regards,
Tinghan

> 
> Thanks,
> Matthias
> 
> > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
> > ---
> >   Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
> >   1 file changed, 2 insertions(+), 1 deletion(-)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index 7032f7adf3ca..6d41bcec900f 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -40,7 +40,8 @@ properties:
> >             - const: mediatek,mt8183-mmc
> >   
> >     reg:
> > -    maxItems: 1
> > +    minItems: 1
> > +    maxItems: 2
> >   
> >     clocks:
> >       description:
AngeloGioacchino Del Regno March 30, 2022, 8:20 a.m. UTC | #7
Il 29/03/22 21:10, Rob Herring ha scritto:
> On Tue, Mar 29, 2022 at 7:43 AM AngeloGioacchino Del Regno
> <angelogioacchino.delregno@collabora.com> wrote:
>>
>> Il 29/03/22 13:45, Tinghan Shen ha scritto:
>>> Add optional host top register base for the reg binding description.
>>>
>>> Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com>
>>> Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com>
>>> ---
>>>    Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 3 ++-
>>>    1 file changed, 2 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> index 7032f7adf3ca..6d41bcec900f 100644
>>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> @@ -40,7 +40,8 @@ properties:
>>>              - const: mediatek,mt8183-mmc
>>>
>>>      reg:
>>> -    maxItems: 1
>>> +    minItems: 1
>>> +    maxItems: 2
>>
>> it's just maxItems... adding minItems: 1 is not required.
> 
> If 1 entry is still valid, then minItems is required. If not, then
> it's an ABI break.
> 
> Rob


Right. Sorry for that and thanks for the explaination, Rob.

Cheers,
Angelo
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index 7032f7adf3ca..6d41bcec900f 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -40,7 +40,8 @@  properties:
           - const: mediatek,mt8183-mmc
 
   reg:
-    maxItems: 1
+    minItems: 1
+    maxItems: 2
 
   clocks:
     description: