diff mbox series

[3/3] ASoC: dt-bindings: fsl,micfil: Add compatible string for i.MX95 platform

Message ID 20240109075551.870001-4-chancel.liu@nxp.com (mailing list archive)
State Handled Elsewhere
Headers show
Series ASoC: Support SAI and MICFIL on i.MX95 platform | expand

Checks

Context Check Description
snowpatch_ozlabs/github-powerpc_sparse success Successfully ran 4 jobs.
snowpatch_ozlabs/github-powerpc_clang success Successfully ran 6 jobs.
snowpatch_ozlabs/github-powerpc_kernel_qemu success Successfully ran 23 jobs.

Commit Message

Chancel Liu Jan. 9, 2024, 7:55 a.m. UTC
Add compatible string "fsl,imx95-micfil" for i.MX95 platform.

Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
---
 .../devicetree/bindings/sound/fsl,micfil.yaml     | 15 +++++++++++----
 1 file changed, 11 insertions(+), 4 deletions(-)

Comments

Daniel Baluta Jan. 9, 2024, 2:16 p.m. UTC | #1
On Tue, Jan 9, 2024 at 9:58 AM Chancel Liu <chancel.liu@nxp.com> wrote:
>
> Add compatible string "fsl,imx95-micfil" for i.MX95 platform.
>
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,micfil.yaml     | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
>
> diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> index b7e605835639..f0d3d11d07d2 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> @@ -15,10 +15,17 @@ description: |
>
>  properties:
>    compatible:
> -    enum:
> -      - fsl,imx8mm-micfil
> -      - fsl,imx8mp-micfil
> -      - fsl,imx93-micfil
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,imx95-micfil
> +          - const: fsl,imx93-micfil
> +
> +      - items:
> +          - enum:
> +              - fsl,imx8mm-micfil
> +              - fsl,imx8mp-micfil
> +              - fsl,imx93-micfil

My yaml knowledge is very limited. Can you describe in natural
language in the commit what exactly we are doing here.

Why something like this:


>    compatible:
>     enum:
>       - fsl,imx8mm-micfil
>       - fsl,imx8mp-micfil
>       - fsl,imx93-micfil
+        - fsl,imx95-micfil

Isn't enough?
Chancel Liu Jan. 10, 2024, 9:09 a.m. UTC | #2
> On Tue, Jan 9, 2024 at 9:58 AM Chancel Liu <chancel.liu@nxp.com> wrote:
> >
> > Add compatible string "fsl,imx95-micfil" for i.MX95 platform.
> >
> > Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> > ---
> >  .../devicetree/bindings/sound/fsl,micfil.yaml     | 15 +++++++++++----
> >  1 file changed, 11 insertions(+), 4 deletions(-)
> >
> > diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> > index b7e605835639..f0d3d11d07d2 100644
> > --- a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> > +++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> > @@ -15,10 +15,17 @@ description: |
> >
> >  properties:
> >    compatible:
> > -    enum:
> > -      - fsl,imx8mm-micfil
> > -      - fsl,imx8mp-micfil
> > -      - fsl,imx93-micfil
> > +    oneOf:
> > +      - items:
> > +          - enum:
> > +              - fsl,imx95-micfil
> > +          - const: fsl,imx93-micfil
> > +
> > +      - items:
> > +          - enum:
> > +              - fsl,imx8mm-micfil
> > +              - fsl,imx8mp-micfil
> > +              - fsl,imx93-micfil
> 
> My yaml knowledge is very limited. Can you describe in natural
> language in the commit what exactly we are doing here.
> 
> Why something like this:
> 
> 
> >    compatible:
> >     enum:
> >       - fsl,imx8mm-micfil
> >       - fsl,imx8mp-micfil
> >       - fsl,imx93-micfil
> +        - fsl,imx95-micfil
> 
> Isn't enough?

No. This shows MICFIL on i.MX95 is different from it on I.MX93.

However i.MX95 MICFIL is compatible with i.MX93 MICFIL.
The DT node of MICFIL on i.MX95 looks like:
micfil: micfil@44520000 {
	compatible = "fsl,imx95-micfil", "fsl,imx93-micfil";
	...
};

Regards, 
Chancel Liu
Conor Dooley Jan. 10, 2024, 10:56 a.m. UTC | #3
On Tue, Jan 09, 2024 at 04:55:51PM +0900, Chancel Liu wrote:
> Add compatible string "fsl,imx95-micfil" for i.MX95 platform.
> 
> Signed-off-by: Chancel Liu <chancel.liu@nxp.com>
> ---
>  .../devicetree/bindings/sound/fsl,micfil.yaml     | 15 +++++++++++----
>  1 file changed, 11 insertions(+), 4 deletions(-)
> 
> diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> index b7e605835639..f0d3d11d07d2 100644
> --- a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> +++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
> @@ -15,10 +15,17 @@ description: |
>  
>  properties:
>    compatible:
> -    enum:
> -      - fsl,imx8mm-micfil
> -      - fsl,imx8mp-micfil
> -      - fsl,imx93-micfil
> +    oneOf:
> +      - items:
> +          - enum:
> +              - fsl,imx95-micfil
> +          - const: fsl,imx93-micfil
> +

> +      - items:

This items is not needed, as the only item in the list is the enum.
You can just do
properties:
  compatible:
    oneOf:
      - items:
          - enum:
              - fsl,imx95-micfil
          - const: fsl,imx93-micfil

      - enum:
          - fsl,imx8mm-micfil
          - fsl,imx8mp-micfil
          - fsl,imx93-micfil

Cheers,
Conor.

> +          - enum:
> +              - fsl,imx8mm-micfil
> +              - fsl,imx8mp-micfil
> +              - fsl,imx93-micfil
>  
>    reg:
>      maxItems: 1
> -- 
> 2.42.0
>
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
index b7e605835639..f0d3d11d07d2 100644
--- a/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
+++ b/Documentation/devicetree/bindings/sound/fsl,micfil.yaml
@@ -15,10 +15,17 @@  description: |
 
 properties:
   compatible:
-    enum:
-      - fsl,imx8mm-micfil
-      - fsl,imx8mp-micfil
-      - fsl,imx93-micfil
+    oneOf:
+      - items:
+          - enum:
+              - fsl,imx95-micfil
+          - const: fsl,imx93-micfil
+
+      - items:
+          - enum:
+              - fsl,imx8mm-micfil
+              - fsl,imx8mp-micfil
+              - fsl,imx93-micfil
 
   reg:
     maxItems: 1