diff mbox series

[7/7] dt-bindings: arm64: dts: mediatek: Add sku22 for mt8183 kakadu board

Message ID 20211108072711.1628566-7-hsinyi@chromium.org (mailing list archive)
State New, archived
Headers show
Series [1/7] arm64: dts: mt8183: jacuzzi: remove unused ddc-i2c-bus | expand

Commit Message

Hsin-Yi Wang Nov. 8, 2021, 7:27 a.m. UTC
Add sku22 which uses different audio codec than previous kakadu board.

Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
---
 Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

Comments

Chen-Yu Tsai Nov. 8, 2021, 8:10 a.m. UTC | #1
On Mon, Nov 8, 2021 at 3:29 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> Add sku22 which uses different audio codec than previous kakadu board.
>
> Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> ---
>  Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++--
>  1 file changed, 5 insertions(+), 2 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> index 99e7f8e294cd03..da5f9ecc1a9b37 100644
> --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> @@ -161,8 +161,11 @@ properties:
>            - const: mediatek,mt8183
>        - description: Google Kakadu (ASUS Chromebook Detachable CM3)
>          items:
> -          - const: google,kakadu-rev3
> -          - const: google,kakadu-rev2
> +          - enum:
> +              - google,kakadu-rev2
> +              - google,kakadu-rev2-sku22
> +              - google,kakadu-rev3
> +              - google,kakadu-rev3-sku22
>            - const: google,kakadu
>            - const: mediatek,mt8183

This matches

    "google,kakadu-rev[23](-sku22)?", "google,kakadu", "mediatek,mt8183",

which isn't what you want. You want:

    "google,kakadu-rev3", "google,kakadu-rev2", "google,kakadu",
    "mediatek,mt8183"

or

    "google,kakadu-rev3-sku22", "google,kakadu-rev2-sku22", "google,kakadu",
    "mediatek,mt8183"

I think the following is closer, but I'm not sure if nesting "items" is valid.

items:
  - oneOf:
    - items:
      - const: google,kakadu-rev3-sku22
      - const: google,kakadu-rev2-sku22
    - items:
      - const: google,kakadu-rev3
      - const: google,kakadu-rev2
  - const: google,kakadu
  - const: mediatek,mt8183


ChenYu
Hsin-Yi Wang Nov. 8, 2021, 8:27 a.m. UTC | #2
On Mon, Nov 8, 2021 at 4:10 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
>
> On Mon, Nov 8, 2021 at 3:29 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> >
> > Add sku22 which uses different audio codec than previous kakadu board.
> >
> > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > ---
> >  Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++--
> >  1 file changed, 5 insertions(+), 2 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > index 99e7f8e294cd03..da5f9ecc1a9b37 100644
> > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > @@ -161,8 +161,11 @@ properties:
> >            - const: mediatek,mt8183
> >        - description: Google Kakadu (ASUS Chromebook Detachable CM3)
> >          items:
> > -          - const: google,kakadu-rev3
> > -          - const: google,kakadu-rev2
> > +          - enum:
> > +              - google,kakadu-rev2
> > +              - google,kakadu-rev2-sku22
> > +              - google,kakadu-rev3
> > +              - google,kakadu-rev3-sku22
> >            - const: google,kakadu
> >            - const: mediatek,mt8183
>
> This matches
>
>     "google,kakadu-rev[23](-sku22)?", "google,kakadu", "mediatek,mt8183",
>
> which isn't what you want. You want:
>
>     "google,kakadu-rev3", "google,kakadu-rev2", "google,kakadu",
>     "mediatek,mt8183"
>
> or
>
>     "google,kakadu-rev3-sku22", "google,kakadu-rev2-sku22", "google,kakadu",
>     "mediatek,mt8183"
>
> I think the following is closer, but I'm not sure if nesting "items" is valid.
>
> items:
>   - oneOf:
>     - items:
>       - const: google,kakadu-rev3-sku22
>       - const: google,kakadu-rev2-sku22
>     - items:
>       - const: google,kakadu-rev3
>       - const: google,kakadu-rev2
>   - const: google,kakadu
>   - const: mediatek,mt8183
>
How about

items:
  - enum:
        - google,kakadu-rev2
        - google,kakadu-rev2-sku22
  - enum:
        - google,kakadu-rev3
        - google,kakadu-rev3-sku22
  - const: google,kakadu
   ....

>
> ChenYu
Chen-Yu Tsai Nov. 8, 2021, 8:35 a.m. UTC | #3
On Mon, Nov 8, 2021 at 4:28 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
>
> On Mon, Nov 8, 2021 at 4:10 PM Chen-Yu Tsai <wenst@chromium.org> wrote:
> >
> > On Mon, Nov 8, 2021 at 3:29 PM Hsin-Yi Wang <hsinyi@chromium.org> wrote:
> > >
> > > Add sku22 which uses different audio codec than previous kakadu board.
> > >
> > > Signed-off-by: Hsin-Yi Wang <hsinyi@chromium.org>
> > > ---
> > >  Documentation/devicetree/bindings/arm/mediatek.yaml | 7 +++++--
> > >  1 file changed, 5 insertions(+), 2 deletions(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > index 99e7f8e294cd03..da5f9ecc1a9b37 100644
> > > --- a/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > +++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
> > > @@ -161,8 +161,11 @@ properties:
> > >            - const: mediatek,mt8183
> > >        - description: Google Kakadu (ASUS Chromebook Detachable CM3)
> > >          items:
> > > -          - const: google,kakadu-rev3
> > > -          - const: google,kakadu-rev2
> > > +          - enum:
> > > +              - google,kakadu-rev2
> > > +              - google,kakadu-rev2-sku22
> > > +              - google,kakadu-rev3
> > > +              - google,kakadu-rev3-sku22
> > >            - const: google,kakadu
> > >            - const: mediatek,mt8183
> >
> > This matches
> >
> >     "google,kakadu-rev[23](-sku22)?", "google,kakadu", "mediatek,mt8183",
> >
> > which isn't what you want. You want:
> >
> >     "google,kakadu-rev3", "google,kakadu-rev2", "google,kakadu",
> >     "mediatek,mt8183"
> >
> > or
> >
> >     "google,kakadu-rev3-sku22", "google,kakadu-rev2-sku22", "google,kakadu",
> >     "mediatek,mt8183"
> >
> > I think the following is closer, but I'm not sure if nesting "items" is valid.
> >
> > items:
> >   - oneOf:
> >     - items:
> >       - const: google,kakadu-rev3-sku22
> >       - const: google,kakadu-rev2-sku22
> >     - items:
> >       - const: google,kakadu-rev3
> >       - const: google,kakadu-rev2
> >   - const: google,kakadu
> >   - const: mediatek,mt8183
> >
> How about
>
> items:
>   - enum:
>         - google,kakadu-rev2
>         - google,kakadu-rev2-sku22
>   - enum:
>         - google,kakadu-rev3
>         - google,kakadu-rev3-sku22
>   - const: google,kakadu
>    ....

This would also match:

    "google,kakadu-rev2", "google,kakadu-rev3-sku22", ...
    "google,kakadu-rev2-sku22", "google,kakadu-rev3", ...

which is not correct. Also I believe rev3 should be in front of rev2?


ChenYu
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/arm/mediatek.yaml b/Documentation/devicetree/bindings/arm/mediatek.yaml
index 99e7f8e294cd03..da5f9ecc1a9b37 100644
--- a/Documentation/devicetree/bindings/arm/mediatek.yaml
+++ b/Documentation/devicetree/bindings/arm/mediatek.yaml
@@ -161,8 +161,11 @@  properties:
           - const: mediatek,mt8183
       - description: Google Kakadu (ASUS Chromebook Detachable CM3)
         items:
-          - const: google,kakadu-rev3
-          - const: google,kakadu-rev2
+          - enum:
+              - google,kakadu-rev2
+              - google,kakadu-rev2-sku22
+              - google,kakadu-rev3
+              - google,kakadu-rev3-sku22
           - const: google,kakadu
           - const: mediatek,mt8183
       - description: Google Kappa (HP Chromebook 11a)