MediaTek has a new version of mmc IP since mt8183. Some IO registers
are moved to top to improve hardware design and named as "host top
registers".
Add host top register in the reg binding description for mt8183 and
successors.
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 | 15 ++++++++++++++-
1 file changed, 14 insertions(+), 1 deletion(-)
diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
index 297ada03e3de..2a2e9fa8c188 100644
--- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
+++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml
@@ -40,7 +40,10 @@ properties:
- const: mediatek,mt8183-mmc
reg:
- maxItems: 1
+ minItems: 1
+ items:
+ - description: base register (required).
+ - description: top base register (required for MT8183).
clocks:
description:
@@ -168,6 +171,16 @@ required:
- vmmc-supply
- vqmmc-supply
+if:
+ properties:
+ compatible:
+ contains:
+ const: mediatek,mt8183-mmc
+then:
+ properties:
+ reg:
+ minItems: 2
+
unevaluatedProperties: false
examples:
--
2.18.0
On 30/03/2022 11:45, Tinghan Shen wrote: > MediaTek has a new version of mmc IP since mt8183. Some IO registers > are moved to top to improve hardware design and named as "host top > registers". > > Add host top register in the reg binding description for mt8183 and > successors. > > 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 | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > index 297ada03e3de..2a2e9fa8c188 100644 > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > @@ -40,7 +40,10 @@ properties: > - const: mediatek,mt8183-mmc > > reg: > - maxItems: 1 > + minItems: 1 From my understanding adding minItems is correct, but you need to add also maxItems: 2 as there can't be more then two register entries. Regards, Matthias > + items: > + - description: base register (required). > + - description: top base register (required for MT8183). > > clocks: > description: > @@ -168,6 +171,16 @@ required: > - vmmc-supply > - vqmmc-supply > > +if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8183-mmc > +then: > + properties: > + reg: > + minItems: 2 > + > unevaluatedProperties: false > > examples:
Hi Matthias, On Thu, 2022-03-31 at 12:54 +0200, Matthias Brugger wrote: > > On 30/03/2022 11:45, Tinghan Shen wrote: > > MediaTek has a new version of mmc IP since mt8183. Some IO registers > > are moved to top to improve hardware design and named as "host top > > registers". > > > > Add host top register in the reg binding description for mt8183 and > > successors. > > > > 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 | 15 ++++++++++++++- > > 1 file changed, 14 insertions(+), 1 deletion(-) > > > > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > > b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > > index 297ada03e3de..2a2e9fa8c188 100644 > > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > > @@ -40,7 +40,10 @@ properties: > > - const: mediatek,mt8183-mmc > > > > reg: > > - maxItems: 1 > > + minItems: 1 > > From my understanding adding minItems is correct, but you need to add also > maxItems: 2 as there can't be more then two register entries. > > Regards, > Matthias > After add "maxItems: 2", I get following message when doing dt_binding_check. from this message, it looks like that maxItems is not necessary. /proj/mtk15399/2cros/src/third_party/kernel/v5.10/Documentation/devicetree/bindings/mmc/mtk-sd.yaml: properties:reg: {'minItems': 1, 'maxItems': 2, 'items': [{'description': 'base register (required).'}, {'description': 'top base register (required for MT8183).'}]} should not be valid under {'required': ['maxItems']} hint: "maxItems" is not needed with an "items" list from schema $id: http://devicetree.org/meta-schemas/items.yaml# SCHEMA Documentation/devicetree/bindings/processed-schema.json Best regards, Tinghan > > + items: > > + - description: base register (required). > > + - description: top base register (required for MT8183). > > > > clocks: > > description: > > @@ -168,6 +171,16 @@ required: > > - vmmc-supply > > - vqmmc-supply > > > > +if: > > + properties: > > + compatible: > > + contains: > > + const: mediatek,mt8183-mmc > > +then: > > + properties: > > + reg: > > + minItems: 2 > > + > > unevaluatedProperties: false > > > > examples:
On 01/04/2022 04:18, Tinghan Shen wrote: > Hi Matthias, > > On Thu, 2022-03-31 at 12:54 +0200, Matthias Brugger wrote: >> >> On 30/03/2022 11:45, Tinghan Shen wrote: >>> MediaTek has a new version of mmc IP since mt8183. Some IO registers >>> are moved to top to improve hardware design and named as "host top >>> registers". >>> >>> Add host top register in the reg binding description for mt8183 and >>> successors. >>> >>> 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 | 15 ++++++++++++++- >>> 1 file changed, 14 insertions(+), 1 deletion(-) >>> >>> diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml >>> b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml >>> index 297ada03e3de..2a2e9fa8c188 100644 >>> --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml >>> +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml >>> @@ -40,7 +40,10 @@ properties: >>> - const: mediatek,mt8183-mmc >>> >>> reg: >>> - maxItems: 1 >>> + minItems: 1 >> >> From my understanding adding minItems is correct, but you need to add also >> maxItems: 2 as there can't be more then two register entries. >> >> Regards, >> Matthias >> > > After add "maxItems: 2", I get following message when doing dt_binding_check. > from this message, it looks like that maxItems is not necessary. That's correct, you don't need them because "items" defines it. Best regards, Krzysztof
On Wed, 30 Mar 2022 17:45:31 +0800, Tinghan Shen wrote: > MediaTek has a new version of mmc IP since mt8183. Some IO registers > are moved to top to improve hardware design and named as "host top > registers". > > Add host top register in the reg binding description for mt8183 and > successors. > > 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 | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > Reviewed-by: Rob Herring <robh@kernel.org>
On Wed, 30 Mar 2022 at 11:46, Tinghan Shen <tinghan.shen@mediatek.com> wrote: > > MediaTek has a new version of mmc IP since mt8183. Some IO registers > are moved to top to improve hardware design and named as "host top > registers". > > Add host top register in the reg binding description for mt8183 and > successors. > > Signed-off-by: Wenbin Mei <wenbin.mei@mediatek.com> > Signed-off-by: Tinghan Shen <tinghan.shen@mediatek.com> Applied for next, thanks! Kind regards Uffe > --- > Documentation/devicetree/bindings/mmc/mtk-sd.yaml | 15 ++++++++++++++- > 1 file changed, 14 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > index 297ada03e3de..2a2e9fa8c188 100644 > --- a/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > +++ b/Documentation/devicetree/bindings/mmc/mtk-sd.yaml > @@ -40,7 +40,10 @@ properties: > - const: mediatek,mt8183-mmc > > reg: > - maxItems: 1 > + minItems: 1 > + items: > + - description: base register (required). > + - description: top base register (required for MT8183). > > clocks: > description: > @@ -168,6 +171,16 @@ required: > - vmmc-supply > - vqmmc-supply > > +if: > + properties: > + compatible: > + contains: > + const: mediatek,mt8183-mmc > +then: > + properties: > + reg: > + minItems: 2 > + > unevaluatedProperties: false > > examples: > -- > 2.18.0 >
© 2016 - 2024 Red Hat, Inc.