diff mbox series

[v2,1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC

Message ID 20241006153447.41377-2-linux@fw-web.de (mailing list archive)
State New
Headers show
Series Add mmc support for mt7988 | expand

Commit Message

Frank Wunderlich (linux) Oct. 6, 2024, 3:34 p.m. UTC
From: Frank Wunderlich <frank-w@public-files.de>

Add binding definitions for mmc on MT7988 SoC.

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
v2:
- fixed minItems to 4
---
 .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
 1 file changed, 24 insertions(+)

Comments

Krzysztof Kozlowski Oct. 7, 2024, 5:55 a.m. UTC | #1
On Sun, Oct 06, 2024 at 05:34:45PM +0200, Frank Wunderlich wrote:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add binding definitions for mmc on MT7988 SoC.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v2:
> - fixed minItems to 4
> ---
>  .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
>  1 file changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index c532ec92d2d9..7380f72ea189 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -21,6 +21,7 @@ properties:
>            - mediatek,mt7620-mmc
>            - mediatek,mt7622-mmc
>            - mediatek,mt7986-mmc
> +          - mediatek,mt7988-mmc
>            - mediatek,mt8135-mmc
>            - mediatek,mt8173-mmc
>            - mediatek,mt8183-mmc
> @@ -263,6 +264,29 @@ allOf:
>              - const: bus_clk
>              - const: sys_cg
>  
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt7988-mmc
> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4

Drop

> +          items:
> +            - description: source clock
> +            - description: HCLK which used for host
> +            - description: Advanced eXtensible Interface
> +            - description: Advanced High-performance Bus clock
> +        clock-names:
> +          minItems: 3

This is still wrong... anyway, drop.

Best regards,
Krzysztof
Frank Wunderlich Oct. 7, 2024, 6:59 a.m. UTC | #2
> Gesendet: Montag, 07. Oktober 2024 um 07:55 Uhr
> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
> An: "Frank Wunderlich" <linux@fw-web.de>
> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>
> On Sun, Oct 06, 2024 at 05:34:45PM +0200, Frank Wunderlich wrote:
> > From: Frank Wunderlich <frank-w@public-files.de>
> >
> > Add binding definitions for mmc on MT7988 SoC.
> >
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > v2:
> > - fixed minItems to 4
> > ---
> >  .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
> >  1 file changed, 24 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index c532ec92d2d9..7380f72ea189 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -21,6 +21,7 @@ properties:
> >            - mediatek,mt7620-mmc
> >            - mediatek,mt7622-mmc
> >            - mediatek,mt7986-mmc
> > +          - mediatek,mt7988-mmc
> >            - mediatek,mt8135-mmc
> >            - mediatek,mt8173-mmc
> >            - mediatek,mt8183-mmc
> > @@ -263,6 +264,29 @@ allOf:
> >              - const: bus_clk
> >              - const: sys_cg
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - mediatek,mt7988-mmc
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 4
>
> Drop
>
> > +          items:
> > +            - description: source clock
> > +            - description: HCLK which used for host
> > +            - description: Advanced eXtensible Interface
> > +            - description: Advanced High-performance Bus clock
> > +        clock-names:
> > +          minItems: 3
>
> This is still wrong... anyway, drop.

arg, sorry again...i should triple-check all before resending.

but dropping means the global 2 is used (making axi+ahb optional), or am i wrong? afaik "minItems: 4" is right here

> Best regards,
> Krzysztof
>

regards Frank
Krzysztof Kozlowski Oct. 7, 2024, 7:04 a.m. UTC | #3
On 07/10/2024 08:59, Frank Wunderlich wrote:
>> Gesendet: Montag, 07. Oktober 2024 um 07:55 Uhr
>> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
>> An: "Frank Wunderlich" <linux@fw-web.de>
>> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>>
>> On Sun, Oct 06, 2024 at 05:34:45PM +0200, Frank Wunderlich wrote:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add binding definitions for mmc on MT7988 SoC.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> ---
>>> v2:
>>> - fixed minItems to 4
>>> ---
>>>  .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
>>>  1 file changed, 24 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> index c532ec92d2d9..7380f72ea189 100644
>>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> @@ -21,6 +21,7 @@ properties:
>>>            - mediatek,mt7620-mmc
>>>            - mediatek,mt7622-mmc
>>>            - mediatek,mt7986-mmc
>>> +          - mediatek,mt7988-mmc
>>>            - mediatek,mt8135-mmc
>>>            - mediatek,mt8173-mmc
>>>            - mediatek,mt8183-mmc
>>> @@ -263,6 +264,29 @@ allOf:
>>>              - const: bus_clk
>>>              - const: sys_cg
>>>
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - mediatek,mt7988-mmc
>>> +    then:
>>> +      properties:
>>> +        clocks:
>>> +          minItems: 4
>>
>> Drop

Drop this line.

>>
>>> +          items:
>>> +            - description: source clock
>>> +            - description: HCLK which used for host
>>> +            - description: Advanced eXtensible Interface
>>> +            - description: Advanced High-performance Bus clock
>>> +        clock-names:
>>> +          minItems: 3
>>
>> This is still wrong... anyway, drop.
> 
> arg, sorry again...i should triple-check all before resending.

Drop this line.

> 
> but dropping means the global 2 is used (making axi+ahb optional), or am i wrong? afaik "minItems: 4" is right here

How minItems:4 is right here?

Best regards,
Krzysztof
Frank Wunderlich Oct. 7, 2024, 7:56 a.m. UTC | #4
Hi
> Gesendet: Montag, 07. Oktober 2024 um 09:04 Uhr
> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
> Betreff: Re: Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>
> On 07/10/2024 08:59, Frank Wunderlich wrote:
> >> Gesendet: Montag, 07. Oktober 2024 um 07:55 Uhr
> >> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
> >> An: "Frank Wunderlich" <linux@fw-web.de>
> >> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
> >>
> >> On Sun, Oct 06, 2024 at 05:34:45PM +0200, Frank Wunderlich wrote:
> >>> From: Frank Wunderlich <frank-w@public-files.de>
> >>>
> >>> Add binding definitions for mmc on MT7988 SoC.
> >>>
> >>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> >>> ---
> >>> v2:
> >>> - fixed minItems to 4
> >>> ---
> >>>  .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
> >>>  1 file changed, 24 insertions(+)
> >>>
> >>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >>> index c532ec92d2d9..7380f72ea189 100644
> >>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >>> @@ -21,6 +21,7 @@ properties:
> >>>            - mediatek,mt7620-mmc
> >>>            - mediatek,mt7622-mmc
> >>>            - mediatek,mt7986-mmc
> >>> +          - mediatek,mt7988-mmc
> >>>            - mediatek,mt8135-mmc
> >>>            - mediatek,mt8173-mmc
> >>>            - mediatek,mt8183-mmc
> >>> @@ -263,6 +264,29 @@ allOf:
> >>>              - const: bus_clk
> >>>              - const: sys_cg
> >>>
> >>> +  - if:
> >>> +      properties:
> >>> +        compatible:
> >>> +          contains:
> >>> +            enum:
> >>> +              - mediatek,mt7988-mmc
> >>> +    then:
> >>> +      properties:
> >>> +        clocks:
> >>> +          minItems: 4
> >>
> >> Drop
>
> Drop this line.
>
> >>
> >>> +          items:
> >>> +            - description: source clock
> >>> +            - description: HCLK which used for host
> >>> +            - description: Advanced eXtensible Interface
> >>> +            - description: Advanced High-performance Bus clock
> >>> +        clock-names:
> >>> +          minItems: 3
> >>
> >> This is still wrong... anyway, drop.
> >
> > arg, sorry again...i should triple-check all before resending.
>
> Drop this line.
>
> >
> > but dropping means the global 2 is used (making axi+ahb optional), or am i wrong? afaik "minItems: 4" is right here
>
> How minItems:4 is right here?

mt7988 needs all 4 clocks, tested with only first 2 (based on global minitems) and got this (similar with first 3 clocks):

[   10.826271] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd/data/mrq
[   10.833485] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting mrq=(____ptrval____) cmd=18
[   10.842006] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd=23
[   10.848704] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=18 arg=00036402; host->error=0x00000002
[   15.866269] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd/data/mrq
[   15.873480] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting mrq=(____ptrval____) cmd=13
[   15.881998] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd=13
[   15.888694] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=13 arg=00010000; host->error=0x00000002

so minItems:4 is imho right here

> Best regards,
> Krzysztof
>
>
AngeloGioacchino Del Regno Oct. 7, 2024, 8 a.m. UTC | #5
Il 06/10/24 17:34, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
> 
> Add binding definitions for mmc on MT7988 SoC.
> 
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> ---
> v2:
> - fixed minItems to 4
> ---
>   .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
>   1 file changed, 24 insertions(+)
> 
> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> index c532ec92d2d9..7380f72ea189 100644
> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> @@ -21,6 +21,7 @@ properties:
>             - mediatek,mt7620-mmc
>             - mediatek,mt7622-mmc
>             - mediatek,mt7986-mmc
> +          - mediatek,mt7988-mmc
>             - mediatek,mt8135-mmc
>             - mediatek,mt8173-mmc
>             - mediatek,mt8183-mmc
> @@ -263,6 +264,29 @@ allOf:
>               - const: bus_clk
>               - const: sys_cg
>   
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            enum:
> +              - mediatek,mt7988-mmc

Are you really sure that you can't reuse the MT7986 compatible?

Cheers,
Angelo

> +    then:
> +      properties:
> +        clocks:
> +          minItems: 4
> +          items:
> +            - description: source clock
> +            - description: HCLK which used for host
> +            - description: Advanced eXtensible Interface
> +            - description: Advanced High-performance Bus clock
> +        clock-names:
> +          minItems: 3
> +          items:
> +            - const: source
> +            - const: hclk
> +            - const: axi_cg
> +            - const: ahb_cg
> +
>     - if:
>         properties:
>           compatible:
Frank Wunderlich Oct. 7, 2024, 8:33 a.m. UTC | #6
Hi

> Gesendet: Montag, 07. Oktober 2024 um 10:00 Uhr
> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>
> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
> > From: Frank Wunderlich <frank-w@public-files.de>
> >
> > Add binding definitions for mmc on MT7988 SoC.
> >
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > v2:
> > - fixed minItems to 4
> > ---
> >   .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
> >   1 file changed, 24 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index c532ec92d2d9..7380f72ea189 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -21,6 +21,7 @@ properties:
> >             - mediatek,mt7620-mmc
> >             - mediatek,mt7622-mmc
> >             - mediatek,mt7986-mmc
> > +          - mediatek,mt7988-mmc
> >             - mediatek,mt8135-mmc
> >             - mediatek,mt8173-mmc
> >             - mediatek,mt8183-mmc
> > @@ -263,6 +264,29 @@ allOf:
> >               - const: bus_clk
> >               - const: sys_cg
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - mediatek,mt7988-mmc
>
> Are you really sure that you can't reuse the MT7986 compatible?

have not found a way to reuse mt7986 binding because clock-config is different...
from driver view we can use the mt7986 compatible, but from binding view it is different.

regards Frank

> Cheers,
> Angelo
>
> > +    then:
> > +      properties:
> > +        clocks:
> > +          minItems: 4
> > +          items:
> > +            - description: source clock
> > +            - description: HCLK which used for host
> > +            - description: Advanced eXtensible Interface
> > +            - description: Advanced High-performance Bus clock
> > +        clock-names:
> > +          minItems: 3
> > +          items:
> > +            - const: source
> > +            - const: hclk
> > +            - const: axi_cg
> > +            - const: ahb_cg
> > +
> >     - if:
> >         properties:
> >           compatible:
>
>
>
AngeloGioacchino Del Regno Oct. 7, 2024, 10:12 a.m. UTC | #7
Il 07/10/24 10:33, Frank Wunderlich ha scritto:
> Hi
> 
>> Gesendet: Montag, 07. Oktober 2024 um 10:00 Uhr
>> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
>> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>>
>> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add binding definitions for mmc on MT7988 SoC.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>> ---
>>> v2:
>>> - fixed minItems to 4
>>> ---
>>>    .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
>>>    1 file changed, 24 insertions(+)
>>>
>>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> index c532ec92d2d9..7380f72ea189 100644
>>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>> @@ -21,6 +21,7 @@ properties:
>>>              - mediatek,mt7620-mmc
>>>              - mediatek,mt7622-mmc
>>>              - mediatek,mt7986-mmc
>>> +          - mediatek,mt7988-mmc
>>>              - mediatek,mt8135-mmc
>>>              - mediatek,mt8173-mmc
>>>              - mediatek,mt8183-mmc
>>> @@ -263,6 +264,29 @@ allOf:
>>>                - const: bus_clk
>>>                - const: sys_cg
>>>
>>> +  - if:
>>> +      properties:
>>> +        compatible:
>>> +          contains:
>>> +            enum:
>>> +              - mediatek,mt7988-mmc
>>
>> Are you really sure that you can't reuse the MT7986 compatible?
> 
> have not found a way to reuse mt7986 binding because clock-config is different...
> from driver view we can use the mt7986 compatible, but from binding view it is different.
> 

Okay, that's fair.

> regards Frank
> 
>> Cheers,
>> Angelo
>>
>>> +    then:
>>> +      properties:
>>> +        clocks:
>>> +          minItems: 4
>>> +          items:
>>> +            - description: source clock
>>> +            - description: HCLK which used for host
>>> +            - description: Advanced eXtensible Interface
>>> +            - description: Advanced High-performance Bus clock
>>> +        clock-names:
>>> +          minItems: 3
>>> +          items:
>>> +            - const: source
>>> +            - const: hclk
>>> +            - const: axi_cg
>>> +            - const: ahb_cg
>>> +
>>>      - if:
>>>          properties:
>>>            compatible:
>>
>>
>>
Krzysztof Kozlowski Oct. 7, 2024, 11:13 a.m. UTC | #8
On 07/10/2024 09:56, Frank Wunderlich wrote:
> Hi
>> Gesendet: Montag, 07. Oktober 2024 um 09:04 Uhr
>> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
>> Betreff: Re: Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>>
>> On 07/10/2024 08:59, Frank Wunderlich wrote:
>>>> Gesendet: Montag, 07. Oktober 2024 um 07:55 Uhr
>>>> Von: "Krzysztof Kozlowski" <krzk@kernel.org>
>>>> An: "Frank Wunderlich" <linux@fw-web.de>
>>>> Betreff: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
>>>>
>>>> On Sun, Oct 06, 2024 at 05:34:45PM +0200, Frank Wunderlich wrote:
>>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>>>
>>>>> Add binding definitions for mmc on MT7988 SoC.
>>>>>
>>>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>>>> ---
>>>>> v2:
>>>>> - fixed minItems to 4
>>>>> ---
>>>>>  .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
>>>>>  1 file changed, 24 insertions(+)
>>>>>
>>>>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>>>> index c532ec92d2d9..7380f72ea189 100644
>>>>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>>>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>>>>> @@ -21,6 +21,7 @@ properties:
>>>>>            - mediatek,mt7620-mmc
>>>>>            - mediatek,mt7622-mmc
>>>>>            - mediatek,mt7986-mmc
>>>>> +          - mediatek,mt7988-mmc
>>>>>            - mediatek,mt8135-mmc
>>>>>            - mediatek,mt8173-mmc
>>>>>            - mediatek,mt8183-mmc
>>>>> @@ -263,6 +264,29 @@ allOf:
>>>>>              - const: bus_clk
>>>>>              - const: sys_cg
>>>>>
>>>>> +  - if:
>>>>> +      properties:
>>>>> +        compatible:
>>>>> +          contains:
>>>>> +            enum:
>>>>> +              - mediatek,mt7988-mmc
>>>>> +    then:
>>>>> +      properties:
>>>>> +        clocks:
>>>>> +          minItems: 4
>>>>
>>>> Drop
>>
>> Drop this line.
>>
>>>>
>>>>> +          items:
>>>>> +            - description: source clock
>>>>> +            - description: HCLK which used for host
>>>>> +            - description: Advanced eXtensible Interface
>>>>> +            - description: Advanced High-performance Bus clock
>>>>> +        clock-names:
>>>>> +          minItems: 3
>>>>
>>>> This is still wrong... anyway, drop.
>>>
>>> arg, sorry again...i should triple-check all before resending.
>>
>> Drop this line.
>>
>>>
>>> but dropping means the global 2 is used (making axi+ahb optional), or am i wrong? afaik "minItems: 4" is right here
>>
>> How minItems:4 is right here?
> 
> mt7988 needs all 4 clocks, tested with only first 2 (based on global minitems) and got this (similar with first 3 clocks):
> 
> [   10.826271] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd/data/mrq
> [   10.833485] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting mrq=(____ptrval____) cmd=18
> [   10.842006] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd=23
> [   10.848704] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=18 arg=00036402; host->error=0x00000002
> [   15.866269] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd/data/mrq
> [   15.873480] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting mrq=(____ptrval____) cmd=13
> [   15.881998] mtk-msdc 11230000.mmc: msdc_request_timeout: aborting cmd=13
> [   15.888694] mtk-msdc 11230000.mmc: msdc_track_cmd_data: cmd=13 arg=00010000; host->error=0x00000002
> 
> so minItems:4 is imho right here

So the list has 5 items? Then your binding is incomplete.

Best regards,
Krzysztof
Daniel Golle Oct. 7, 2024, 11:36 a.m. UTC | #9
On Mon, Oct 07, 2024 at 10:00:49AM +0200, AngeloGioacchino Del Regno wrote:
> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
> > From: Frank Wunderlich <frank-w@public-files.de>
> > 
> > Add binding definitions for mmc on MT7988 SoC.
> > 
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
> > ---
> > v2:
> > - fixed minItems to 4
> > ---
> >   .../devicetree/bindings/mmc/mtk-sd.yaml       | 24 +++++++++++++++++++
> >   1 file changed, 24 insertions(+)
> > 
> > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > index c532ec92d2d9..7380f72ea189 100644
> > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> > @@ -21,6 +21,7 @@ properties:
> >             - mediatek,mt7620-mmc
> >             - mediatek,mt7622-mmc
> >             - mediatek,mt7986-mmc
> > +          - mediatek,mt7988-mmc
> >             - mediatek,mt8135-mmc
> >             - mediatek,mt8173-mmc
> >             - mediatek,mt8183-mmc
> > @@ -263,6 +264,29 @@ allOf:
> >               - const: bus_clk
> >               - const: sys_cg
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            enum:
> > +              - mediatek,mt7988-mmc
> 
> Are you really sure that you can't reuse the MT7986 compatible?

In OpenWrt we are doing exactly that. The MMC controller of
MT7988 (and MT7981) seems 100% the same as in MT7986 and hence
works just fine with the mediatek,mt7986-mmc compatible.
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index c532ec92d2d9..7380f72ea189 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -21,6 +21,7 @@  properties:
           - mediatek,mt7620-mmc
           - mediatek,mt7622-mmc
           - mediatek,mt7986-mmc
+          - mediatek,mt7988-mmc
           - mediatek,mt8135-mmc
           - mediatek,mt8173-mmc
           - mediatek,mt8183-mmc
@@ -263,6 +264,29 @@  allOf:
             - const: bus_clk
             - const: sys_cg
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            enum:
+              - mediatek,mt7988-mmc
+    then:
+      properties:
+        clocks:
+          minItems: 4
+          items:
+            - description: source clock
+            - description: HCLK which used for host
+            - description: Advanced eXtensible Interface
+            - description: Advanced High-performance Bus clock
+        clock-names:
+          minItems: 3
+          items:
+            - const: source
+            - const: hclk
+            - const: axi_cg
+            - const: ahb_cg
+
   - if:
       properties:
         compatible: