* [PATCH v2 0/2] Add mmc support for mt7988
@ 2024-10-06 15:34 Frank Wunderlich
2024-10-06 15:34 ` [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC Frank Wunderlich
2024-10-06 15:34 ` [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988 Frank Wunderlich
0 siblings, 2 replies; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-06 15:34 UTC (permalink / raw)
To: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei
Cc: Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
From: Frank Wunderlich <frank-w@public-files.de>
Add MMC-Support for MT798 SoC
changes in v2:
- corrected minItems to require all 4 clocks
Frank Wunderlich (2):
dt-bindings: mmc: mtk-sd: Add mt7988 SoC
mmc: mtk-sd: add support for mt7988
.../devicetree/bindings/mmc/mtk-sd.yaml | 24 +++++++++++++++++++
drivers/mmc/host/mtk-sd.c | 14 +++++++++++
2 files changed, 38 insertions(+)
--
2.43.0
^ permalink raw reply [flat|nested] 16+ messages in thread
* [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-06 15:34 [PATCH v2 0/2] Add mmc support for mt7988 Frank Wunderlich
@ 2024-10-06 15:34 ` Frank Wunderlich
2024-10-07 5:55 ` Krzysztof Kozlowski
2024-10-07 8:00 ` AngeloGioacchino Del Regno
2024-10-06 15:34 ` [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988 Frank Wunderlich
1 sibling, 2 replies; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-06 15:34 UTC (permalink / raw)
To: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei
Cc: Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
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
+ 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:
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
2024-10-06 15:34 [PATCH v2 0/2] Add mmc support for mt7988 Frank Wunderlich
2024-10-06 15:34 ` [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC Frank Wunderlich
@ 2024-10-06 15:34 ` Frank Wunderlich
2024-10-07 7:58 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-06 15:34 UTC (permalink / raw)
To: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei
Cc: Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
From: Frank Wunderlich <frank-w@public-files.de>
Add support for mmc on MT7988 SoC.
Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
index 89018b6c97b9..6d5afe51a61d 100644
--- a/drivers/mmc/host/mtk-sd.c
+++ b/drivers/mmc/host/mtk-sd.c
@@ -571,6 +571,19 @@ static const struct mtk_mmc_compatible mt7986_compat = {
.support_64g = true,
};
+static const struct mtk_mmc_compatible mt7988_compat = {
+ .clk_div_bits = 12,
+ .recheck_sdio_irq = true,
+ .hs400_tune = false,
+ .pad_tune_reg = MSDC_PAD_TUNE0,
+ .async_fifo = true,
+ .data_tune = true,
+ .busy_check = true,
+ .stop_clk_fix = true,
+ .enhance_rx = true,
+ .support_64g = true,
+};
+
static const struct mtk_mmc_compatible mt8135_compat = {
.clk_div_bits = 8,
.recheck_sdio_irq = true,
@@ -629,6 +642,7 @@ static const struct of_device_id msdc_of_ids[] = {
{ .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat},
{ .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
{ .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat},
+ { .compatible = "mediatek,mt7988-mmc", .data = &mt7988_compat},
{ .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
{ .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
{ .compatible = "mediatek,mt8183-mmc", .data = &mt8183_compat},
--
2.43.0
^ permalink raw reply related [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-06 15:34 ` [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC Frank Wunderlich
@ 2024-10-07 5:55 ` Krzysztof Kozlowski
2024-10-07 6:59 ` Aw: " Frank Wunderlich
2024-10-07 8:00 ` AngeloGioacchino Del Regno
1 sibling, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-07 5:55 UTC (permalink / raw)
To: Frank Wunderlich
Cc: Chaotian Jing, Ulf Hansson, Rob Herring, Krzysztof Kozlowski,
Conor Dooley, Matthias Brugger, AngeloGioacchino Del Regno,
Wenbin Mei, Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 5:55 ` Krzysztof Kozlowski
@ 2024-10-07 6:59 ` Frank Wunderlich
2024-10-07 7:04 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-07 6:59 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Wenbin Mei, linux-mmc, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek, daniel, john,
eladwf, ansuelsmth
> 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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 6:59 ` Aw: " Frank Wunderlich
@ 2024-10-07 7:04 ` Krzysztof Kozlowski
2024-10-07 7:56 ` Aw: " Frank Wunderlich
0 siblings, 1 reply; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-07 7:04 UTC (permalink / raw)
To: Frank Wunderlich
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Wenbin Mei, linux-mmc, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek, daniel, john,
eladwf, ansuelsmth
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Aw: Re: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 7:04 ` Krzysztof Kozlowski
@ 2024-10-07 7:56 ` Frank Wunderlich
2024-10-07 11:13 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-07 7:56 UTC (permalink / raw)
To: Krzysztof Kozlowski
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Wenbin Mei, linux-mmc, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek, daniel, john,
eladwf, ansuelsmth
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
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
2024-10-06 15:34 ` [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988 Frank Wunderlich
@ 2024-10-07 7:58 ` AngeloGioacchino Del Regno
2024-10-07 8:37 ` Aw: " Frank Wunderlich
0 siblings, 1 reply; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-10-07 7:58 UTC (permalink / raw)
To: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei
Cc: Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
Il 06/10/24 17:34, Frank Wunderlich ha scritto:
> From: Frank Wunderlich <frank-w@public-files.de>
>
> Add support for mmc on MT7988 SoC.
>
> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
There's no need to add yet one more duplicate mtk_mmc_compatible platform
data, nor one more compatible string to this driver, as this is exactly
the same as mt7986.
Please reuse the MT7986 compatible; in DT you'll have:
compatible = "mediatek,mt7988-mmc", "mediatek,mt7986-mmc";
Cheers,
Angelo
> ---
> drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++
> 1 file changed, 14 insertions(+)
>
> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> index 89018b6c97b9..6d5afe51a61d 100644
> --- a/drivers/mmc/host/mtk-sd.c
> +++ b/drivers/mmc/host/mtk-sd.c
> @@ -571,6 +571,19 @@ static const struct mtk_mmc_compatible mt7986_compat = {
> .support_64g = true,
> };
>
> +static const struct mtk_mmc_compatible mt7988_compat = {
> + .clk_div_bits = 12,
> + .recheck_sdio_irq = true,
> + .hs400_tune = false,
> + .pad_tune_reg = MSDC_PAD_TUNE0,
> + .async_fifo = true,
> + .data_tune = true,
> + .busy_check = true,
> + .stop_clk_fix = true,
> + .enhance_rx = true,
> + .support_64g = true,
> +};
> +
> static const struct mtk_mmc_compatible mt8135_compat = {
> .clk_div_bits = 8,
> .recheck_sdio_irq = true,
> @@ -629,6 +642,7 @@ static const struct of_device_id msdc_of_ids[] = {
> { .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat},
> { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
> { .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat},
> + { .compatible = "mediatek,mt7988-mmc", .data = &mt7988_compat},
> { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
> { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
> { .compatible = "mediatek,mt8183-mmc", .data = &mt8183_compat},
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-06 15:34 ` [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC Frank Wunderlich
2024-10-07 5:55 ` Krzysztof Kozlowski
@ 2024-10-07 8:00 ` AngeloGioacchino Del Regno
2024-10-07 8:33 ` Aw: " Frank Wunderlich
2024-10-07 11:36 ` Daniel Golle
1 sibling, 2 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-10-07 8:00 UTC (permalink / raw)
To: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei
Cc: Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, daniel, john, eladwf,
ansuelsmth
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:
^ permalink raw reply [flat|nested] 16+ messages in thread
* Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 8:00 ` AngeloGioacchino Del Regno
@ 2024-10-07 8:33 ` Frank Wunderlich
2024-10-07 10:12 ` AngeloGioacchino Del Regno
2024-10-07 11:36 ` Daniel Golle
1 sibling, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-07 8:33 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, daniel, john, eladwf, ansuelsmth
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:
>
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Aw: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
2024-10-07 7:58 ` AngeloGioacchino Del Regno
@ 2024-10-07 8:37 ` Frank Wunderlich
2024-10-07 10:14 ` AngeloGioacchino Del Regno
0 siblings, 1 reply; 16+ messages in thread
From: Frank Wunderlich @ 2024-10-07 8:37 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, daniel, john, eladwf, ansuelsmth
Hi
> Gesendet: Montag, 07. Oktober 2024 um 09:58 Uhr
> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
> Betreff: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
>
> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
> > From: Frank Wunderlich <frank-w@public-files.de>
> >
> > Add support for mmc on MT7988 SoC.
> >
> > Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>
> There's no need to add yet one more duplicate mtk_mmc_compatible platform
> data, nor one more compatible string to this driver, as this is exactly
> the same as mt7986.
>
> Please reuse the MT7986 compatible; in DT you'll have:
>
> compatible = "mediatek,mt7988-mmc", "mediatek,mt7986-mmc";
as explained in binding, the clock config is completely different (except first 2 also required by driver - 3-7 are optional there). mt7988 uses axi and ahb clocks.
but i could of course use the mt7988 compatible with mt7986 compat data...but looked dirty to me so just copied the block (to allow later changes if needed).
> Cheers,
> Angelo
>
> > ---
> > drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++
> > 1 file changed, 14 insertions(+)
> >
> > diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
> > index 89018b6c97b9..6d5afe51a61d 100644
> > --- a/drivers/mmc/host/mtk-sd.c
> > +++ b/drivers/mmc/host/mtk-sd.c
> > @@ -571,6 +571,19 @@ static const struct mtk_mmc_compatible mt7986_compat = {
> > .support_64g = true,
> > };
> >
> > +static const struct mtk_mmc_compatible mt7988_compat = {
> > + .clk_div_bits = 12,
> > + .recheck_sdio_irq = true,
> > + .hs400_tune = false,
> > + .pad_tune_reg = MSDC_PAD_TUNE0,
> > + .async_fifo = true,
> > + .data_tune = true,
> > + .busy_check = true,
> > + .stop_clk_fix = true,
> > + .enhance_rx = true,
> > + .support_64g = true,
> > +};
> > +
> > static const struct mtk_mmc_compatible mt8135_compat = {
> > .clk_div_bits = 8,
> > .recheck_sdio_irq = true,
> > @@ -629,6 +642,7 @@ static const struct of_device_id msdc_of_ids[] = {
> > { .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat},
> > { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
> > { .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat},
> > + { .compatible = "mediatek,mt7988-mmc", .data = &mt7988_compat},
> > { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
> > { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
> > { .compatible = "mediatek,mt8183-mmc", .data = &mt8183_compat},
>
>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Aw: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 8:33 ` Aw: " Frank Wunderlich
@ 2024-10-07 10:12 ` AngeloGioacchino Del Regno
0 siblings, 0 replies; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-10-07 10:12 UTC (permalink / raw)
To: Frank Wunderlich
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, daniel, john, eladwf, ansuelsmth
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:
>>
>>
>>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Aw: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
2024-10-07 8:37 ` Aw: " Frank Wunderlich
@ 2024-10-07 10:14 ` AngeloGioacchino Del Regno
2024-10-07 11:30 ` Krzysztof Kozlowski
0 siblings, 1 reply; 16+ messages in thread
From: AngeloGioacchino Del Regno @ 2024-10-07 10:14 UTC (permalink / raw)
To: Frank Wunderlich
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, daniel, john, eladwf, ansuelsmth
Il 07/10/24 10:37, Frank Wunderlich ha scritto:
> Hi
>
>> Gesendet: Montag, 07. Oktober 2024 um 09:58 Uhr
>> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
>> Betreff: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
>>
>> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> Add support for mmc on MT7988 SoC.
>>>
>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>
>> There's no need to add yet one more duplicate mtk_mmc_compatible platform
>> data, nor one more compatible string to this driver, as this is exactly
>> the same as mt7986.
>>
>> Please reuse the MT7986 compatible; in DT you'll have:
>>
>> compatible = "mediatek,mt7988-mmc", "mediatek,mt7986-mmc";
>
> as explained in binding, the clock config is completely different (except first 2 also required by driver - 3-7 are optional there). mt7988 uses axi and ahb clocks.
>
> but i could of course use the mt7988 compatible with mt7986 compat data...but looked dirty to me so just copied the block (to allow later changes if needed).
>
In case there will be any changes required *later*, you can always add new platform
data for the MT7988 compatible, as it's just only a code change and nothing else.
For now, since they're the same, just reuse mt7986_compat.
Reusing is way better than duplicating - here and everywhere else - especially when
this implies a 100% duplication.
>> Cheers,
>> Angelo
>>
>>> ---
>>> drivers/mmc/host/mtk-sd.c | 14 ++++++++++++++
>>> 1 file changed, 14 insertions(+)
>>>
>>> diff --git a/drivers/mmc/host/mtk-sd.c b/drivers/mmc/host/mtk-sd.c
>>> index 89018b6c97b9..6d5afe51a61d 100644
>>> --- a/drivers/mmc/host/mtk-sd.c
>>> +++ b/drivers/mmc/host/mtk-sd.c
>>> @@ -571,6 +571,19 @@ static const struct mtk_mmc_compatible mt7986_compat = {
>>> .support_64g = true,
>>> };
>>>
>>> +static const struct mtk_mmc_compatible mt7988_compat = {
>>> + .clk_div_bits = 12,
>>> + .recheck_sdio_irq = true,
>>> + .hs400_tune = false,
>>> + .pad_tune_reg = MSDC_PAD_TUNE0,
>>> + .async_fifo = true,
>>> + .data_tune = true,
>>> + .busy_check = true,
>>> + .stop_clk_fix = true,
>>> + .enhance_rx = true,
>>> + .support_64g = true,
>>> +};
>>> +
>>> static const struct mtk_mmc_compatible mt8135_compat = {
>>> .clk_div_bits = 8,
>>> .recheck_sdio_irq = true,
>>> @@ -629,6 +642,7 @@ static const struct of_device_id msdc_of_ids[] = {
>>> { .compatible = "mediatek,mt7620-mmc", .data = &mt7620_compat},
>>> { .compatible = "mediatek,mt7622-mmc", .data = &mt7622_compat},
>>> { .compatible = "mediatek,mt7986-mmc", .data = &mt7986_compat},
>>> + { .compatible = "mediatek,mt7988-mmc", .data = &mt7988_compat},
>>> { .compatible = "mediatek,mt8135-mmc", .data = &mt8135_compat},
>>> { .compatible = "mediatek,mt8173-mmc", .data = &mt8173_compat},
>>> { .compatible = "mediatek,mt8183-mmc", .data = &mt8183_compat},
>>
>>
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Aw: Re: Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 7:56 ` Aw: " Frank Wunderlich
@ 2024-10-07 11:13 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-07 11:13 UTC (permalink / raw)
To: Frank Wunderlich
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger,
AngeloGioacchino Del Regno, Wenbin Mei, linux-mmc, devicetree,
linux-kernel, linux-arm-kernel, linux-mediatek, daniel, john,
eladwf, ansuelsmth
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
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: Aw: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
2024-10-07 10:14 ` AngeloGioacchino Del Regno
@ 2024-10-07 11:30 ` Krzysztof Kozlowski
0 siblings, 0 replies; 16+ messages in thread
From: Krzysztof Kozlowski @ 2024-10-07 11:30 UTC (permalink / raw)
To: AngeloGioacchino Del Regno, Frank Wunderlich
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
linux-mmc, devicetree, linux-kernel, linux-arm-kernel,
linux-mediatek, daniel, john, eladwf, ansuelsmth
On 07/10/2024 12:14, AngeloGioacchino Del Regno wrote:
> Il 07/10/24 10:37, Frank Wunderlich ha scritto:
>> Hi
>>
>>> Gesendet: Montag, 07. Oktober 2024 um 09:58 Uhr
>>> Von: "AngeloGioacchino Del Regno" <angelogioacchino.delregno@collabora.com>
>>> Betreff: Re: [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988
>>>
>>> Il 06/10/24 17:34, Frank Wunderlich ha scritto:
>>>> From: Frank Wunderlich <frank-w@public-files.de>
>>>>
>>>> Add support for mmc on MT7988 SoC.
>>>>
>>>> Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
>>>
>>> There's no need to add yet one more duplicate mtk_mmc_compatible platform
>>> data, nor one more compatible string to this driver, as this is exactly
>>> the same as mt7986.
>>>
>>> Please reuse the MT7986 compatible; in DT you'll have:
>>>
>>> compatible = "mediatek,mt7988-mmc", "mediatek,mt7986-mmc";
>>
>> as explained in binding, the clock config is completely different (except first 2 also required by driver - 3-7 are optional there). mt7988 uses axi and ahb clocks.
>>
>> but i could of course use the mt7988 compatible with mt7986 compat data...but looked dirty to me so just copied the block (to allow later changes if needed).
>>
>
> In case there will be any changes required *later*, you can always add new platform
> data for the MT7988 compatible, as it's just only a code change and nothing else.
>
> For now, since they're the same, just reuse mt7986_compat.
>
> Reusing is way better than duplicating - here and everywhere else - especially when
> this implies a 100% duplication.
If you use same match data, then entire change should be dropped because
it is redundant. Instead express compatibility in the bindings and use
fallback.
Best regards,
Krzysztof
^ permalink raw reply [flat|nested] 16+ messages in thread
* Re: [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC
2024-10-07 8:00 ` AngeloGioacchino Del Regno
2024-10-07 8:33 ` Aw: " Frank Wunderlich
@ 2024-10-07 11:36 ` Daniel Golle
1 sibling, 0 replies; 16+ messages in thread
From: Daniel Golle @ 2024-10-07 11:36 UTC (permalink / raw)
To: AngeloGioacchino Del Regno
Cc: Frank Wunderlich, Chaotian Jing, Ulf Hansson, Rob Herring,
Krzysztof Kozlowski, Conor Dooley, Matthias Brugger, Wenbin Mei,
Frank Wunderlich, linux-mmc, devicetree, linux-kernel,
linux-arm-kernel, linux-mediatek, john, eladwf, ansuelsmth
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.
^ permalink raw reply [flat|nested] 16+ messages in thread
end of thread, other threads:[~2024-10-07 11:36 UTC | newest]
Thread overview: 16+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2024-10-06 15:34 [PATCH v2 0/2] Add mmc support for mt7988 Frank Wunderlich
2024-10-06 15:34 ` [PATCH v2 1/2] dt-bindings: mmc: mtk-sd: Add mt7988 SoC Frank Wunderlich
2024-10-07 5:55 ` Krzysztof Kozlowski
2024-10-07 6:59 ` Aw: " Frank Wunderlich
2024-10-07 7:04 ` Krzysztof Kozlowski
2024-10-07 7:56 ` Aw: " Frank Wunderlich
2024-10-07 11:13 ` Krzysztof Kozlowski
2024-10-07 8:00 ` AngeloGioacchino Del Regno
2024-10-07 8:33 ` Aw: " Frank Wunderlich
2024-10-07 10:12 ` AngeloGioacchino Del Regno
2024-10-07 11:36 ` Daniel Golle
2024-10-06 15:34 ` [PATCH v2 2/2] mmc: mtk-sd: add support for mt7988 Frank Wunderlich
2024-10-07 7:58 ` AngeloGioacchino Del Regno
2024-10-07 8:37 ` Aw: " Frank Wunderlich
2024-10-07 10:14 ` AngeloGioacchino Del Regno
2024-10-07 11:30 ` Krzysztof Kozlowski
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).