Besides the MT8183's MMC controller and all its compatible derivatives,
the recently added MT7986 and MT8196 also require two register ranges.
This is based on the actual device trees.
Properly enforce this in the binding.
Fixes: 4a8bd2b07d88 ("dt-bindings: mmc: mtk-sd: Add mt7988 SoC")
Fixes: 58927c9dc4ab ("dt-bindings: mmc: mtk-sd: Add support for MT8196")
Cc: Frank Wunderlich <frank-w@public-files.de>
Cc: Andy-ld Lu <andy-ld.lu@mediatek.com>
Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
---
Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 9 ++++++++-
1 file changed, 8 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index f86ebd81f5a5..9ea035928563 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -235,11 +235,18 @@ allOf:
properties:
compatible:
contains:
- const: mediatek,mt8183-mmc
+ enum:
+ - mediatek,mt7986-mmc
+ - mediatek,mt8183-mmc
+ - mediatek,mt8196-mmc
then:
properties:
reg:
minItems: 2
+ else:
+ properties:
+ reg:
+ maxItems: 1
- if:
properties:
--
2.47.0.338.g60cca15819-goog
Il 04/12/24 10:28, Chen-Yu Tsai ha scritto:
> Besides the MT8183's MMC controller and all its compatible derivatives,
> the recently added MT7986 and MT8196 also require two register ranges.
> This is based on the actual device trees.
>
> Properly enforce this in the binding.
>
> Fixes: 4a8bd2b07d88 ("dt-bindings: mmc: mtk-sd: Add mt7988 SoC")
> Fixes: 58927c9dc4ab ("dt-bindings: mmc: mtk-sd: Add support for MT8196")
> Cc: Frank Wunderlich <frank-w@public-files.de>
> Cc: Andy-ld Lu <andy-ld.lu@mediatek.com>
> Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno@collabora.com>
Am 4. Dezember 2024 10:28:52 MEZ schrieb Chen-Yu Tsai <wenst@chromium.org>:
>Besides the MT8183's MMC controller and all its compatible derivatives,
>the recently added MT7986 and MT8196 also require two register ranges.
>This is based on the actual device trees.
Hi
Mt7988 is similar to mt7986 (only using different clock settings) and using 2 reg too.
Currently there is no mmc node in mt7988 dts (i currently upstreaming it) so i guess this is why you have not yet noticed it.
See this for more:
https://patchwork.kernel.org/project/linux-mediatek/patch/20241202122602.30734-3-linux@fw-web.de/
Maybe you can add mt7988 compatible here too in v2.
Regards Frank
>Properly enforce this in the binding.
>
>Fixes: 4a8bd2b07d88 ("dt-bindings: mmc: mtk-sd: Add mt7988 SoC")
>Fixes: 58927c9dc4ab ("dt-bindings: mmc: mtk-sd: Add support for MT8196")
>Cc: Frank Wunderlich <frank-w@public-files.de>
>Cc: Andy-ld Lu <andy-ld.lu@mediatek.com>
>Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
>---
> Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 9 ++++++++-
> 1 file changed, 8 insertions(+), 1 deletion(-)
>
>diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>index f86ebd81f5a5..9ea035928563 100644
>--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
>@@ -235,11 +235,18 @@ allOf:
> properties:
> compatible:
> contains:
>- const: mediatek,mt8183-mmc
>+ enum:
>+ - mediatek,mt7986-mmc
>+ - mediatek,mt8183-mmc
>+ - mediatek,mt8196-mmc
> then:
> properties:
> reg:
> minItems: 2
>+ else:
>+ properties:
>+ reg:
>+ maxItems: 1
>
> - if:
> properties:
regards Frank
On Wed, Dec 4, 2024 at 6:38 PM Frank Wunderlich <frank-w@public-files.de> wrote:
>
> Am 4. Dezember 2024 10:28:52 MEZ schrieb Chen-Yu Tsai <wenst@chromium.org>:
> >Besides the MT8183's MMC controller and all its compatible derivatives,
> >the recently added MT7986 and MT8196 also require two register ranges.
> >This is based on the actual device trees.
>
> Hi
>
> Mt7988 is similar to mt7986 (only using different clock settings) and using 2 reg too.
>
> Currently there is no mmc node in mt7988 dts (i currently upstreaming it) so i guess this is why you have not yet noticed it.
>
> See this for more:
>
> https://patchwork.kernel.org/project/linux-mediatek/patch/20241202122602.30734-3-linux@fw-web.de/
I think I noticed it at the beginning, but it then slipped my mind. I
might have gotten it mixed up with mt7986.
> Maybe you can add mt7988 compatible here too in v2.
Will do.
Thanks
ChenYu
> Regards Frank
>
> >Properly enforce this in the binding.
> >
> >Fixes: 4a8bd2b07d88 ("dt-bindings: mmc: mtk-sd: Add mt7988 SoC")
> >Fixes: 58927c9dc4ab ("dt-bindings: mmc: mtk-sd: Add support for MT8196")
> >Cc: Frank Wunderlich <frank-w@public-files.de>
> >Cc: Andy-ld Lu <andy-ld.lu@mediatek.com>
> >Signed-off-by: Chen-Yu Tsai <wenst@chromium.org>
> >---
> > Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 9 ++++++++-
> > 1 file changed, 8 insertions(+), 1 deletion(-)
> >
> >diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >index f86ebd81f5a5..9ea035928563 100644
> >--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
> >@@ -235,11 +235,18 @@ allOf:
> > properties:
> > compatible:
> > contains:
> >- const: mediatek,mt8183-mmc
> >+ enum:
> >+ - mediatek,mt7986-mmc
> >+ - mediatek,mt8183-mmc
> >+ - mediatek,mt8196-mmc
> > then:
> > properties:
> > reg:
> > minItems: 2
> >+ else:
> >+ properties:
> >+ reg:
> >+ maxItems: 1
> >
> > - if:
> > properties:
>
>
> regards Frank
© 2016 - 2025 Red Hat, Inc.