[PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string

Guoniu Zhou posted 3 patches 3 months, 2 weeks ago
There is a newer version of this series
[PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string
Posted by Guoniu Zhou 3 months, 2 weeks ago
From: Guoniu Zhou <guoniu.zhou@nxp.com>

The ISI module on i.MX95 supports up to eight channels and four link
sources to obtain the image data for processing in its pipelines. It
can process up to eight image sources at the same time.

Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
---
 .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 26 +++++++++++++++++++++-
 1 file changed, 25 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..eaab98ecf343a2cd3620f7469c016c3955d37406 100644
--- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
+++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
@@ -23,6 +23,7 @@ properties:
       - fsl,imx8mp-isi
       - fsl,imx8ulp-isi
       - fsl,imx93-isi
+      - fsl,imx95-isi
 
   reg:
     maxItems: 1
@@ -49,7 +50,7 @@ properties:
   interrupts:
     description: Processing pipeline interrupts, one per pipeline
     minItems: 1
-    maxItems: 2
+    maxItems: 8
 
   power-domains:
     maxItems: 1
@@ -109,6 +110,29 @@ allOf:
             - port@0
             - port@1
 
+  - if:
+      properties:
+        compatible:
+          contains:
+            const: fsl,imx95-isi
+    then:
+      properties:
+        interrupts:
+          maxItems: 8
+        ports:
+          properties:
+            port@0:
+              description: Pixel Link Slave 0
+            port@1:
+              description: Pixel Link Slave 1
+            port@2:
+              description: MIPI CSI-2 RX 0
+            port@3:
+              description: MIPI CSI-2 RX 1
+          required:
+            - port@2
+            - port@3
+
 additionalProperties: false
 
 examples:

-- 
2.34.1
Re: [PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string
Posted by Frank Li 3 months, 2 weeks ago
On Fri, Oct 24, 2025 at 05:46:52PM +0800, Guoniu Zhou wrote:
> From: Guoniu Zhou <guoniu.zhou@nxp.com>
>
> The ISI module on i.MX95 supports up to eight channels and four link
> sources to obtain the image data for processing in its pipelines. It
> can process up to eight image sources at the same time.
>
> Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> ---
>  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 26 +++++++++++++++++++++-
>  1 file changed, 25 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..eaab98ecf343a2cd3620f7469c016c3955d37406 100644
> --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> @@ -23,6 +23,7 @@ properties:
>        - fsl,imx8mp-isi
>        - fsl,imx8ulp-isi
>        - fsl,imx93-isi
> +      - fsl,imx95-isi
>
>    reg:
>      maxItems: 1
> @@ -49,7 +50,7 @@ properties:
>    interrupts:
>      description: Processing pipeline interrupts, one per pipeline
>      minItems: 1
> -    maxItems: 2
> +    maxItems: 8
>
>    power-domains:
>      maxItems: 1
> @@ -109,6 +110,29 @@ allOf:
>              - port@0
>              - port@1
>
> +  - if:
> +      properties:
> +        compatible:
> +          contains:
> +            const: fsl,imx95-isi
> +    then:
> +      properties:
> +        interrupts:
> +          maxItems: 8

should minItems: 8 because you already limit maxItems at top;

> +        ports:
> +          properties:
> +            port@0:
> +              description: Pixel Link Slave 0
> +            port@1:
> +              description: Pixel Link Slave 1
> +            port@2:
> +              description: MIPI CSI-2 RX 0
> +            port@3:
> +              description: MIPI CSI-2 RX 1
> +          required:
> +            - port@2
> +            - port@3
> +

     else
       properties:
         interrupts:
           maxItem: 2

to keep the same restriction for existed compatible string.

Frank


>  additionalProperties: false
>
>  examples:
>
> --
> 2.34.1
>
Re: [PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string
Posted by Laurent Pinchart 3 months, 2 weeks ago
On Fri, Oct 24, 2025 at 09:34:14AM -0400, Frank Li wrote:
> On Fri, Oct 24, 2025 at 05:46:52PM +0800, Guoniu Zhou wrote:
> > From: Guoniu Zhou <guoniu.zhou@nxp.com>
> >
> > The ISI module on i.MX95 supports up to eight channels and four link
> > sources to obtain the image data for processing in its pipelines. It
> > can process up to eight image sources at the same time.
> >
> > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > ---
> >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 26 +++++++++++++++++++++-
> >  1 file changed, 25 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..eaab98ecf343a2cd3620f7469c016c3955d37406 100644
> > --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > @@ -23,6 +23,7 @@ properties:
> >        - fsl,imx8mp-isi
> >        - fsl,imx8ulp-isi
> >        - fsl,imx93-isi
> > +      - fsl,imx95-isi
> >
> >    reg:
> >      maxItems: 1
> > @@ -49,7 +50,7 @@ properties:
> >    interrupts:
> >      description: Processing pipeline interrupts, one per pipeline
> >      minItems: 1
> > -    maxItems: 2
> > +    maxItems: 8
> >
> >    power-domains:
> >      maxItems: 1
> > @@ -109,6 +110,29 @@ allOf:
> >              - port@0
> >              - port@1
> >
> > +  - if:
> > +      properties:
> > +        compatible:
> > +          contains:
> > +            const: fsl,imx95-isi
> > +    then:
> > +      properties:
> > +        interrupts:
> > +          maxItems: 8
> 
> should minItems: 8 because you already limit maxItems at top;

As far as I understand, when no "items" are specified, minItems defaults
to 1, and maxItems defaults to minItems (if specified) or 0 (if minItems
is not specified). This is implemented in dtschema/lib.py of
https://github.com/devicetree-org/dt-schema.git.

Then, in dtschema/fixups.py, if only one of minItems or maxItems is
specified, the other one is set to the same value. I believe relying on
this is frowned upon by the DT maintainers.

We could specify minItems only here, as the top-level constraint will
ensure we don't go over 8. That's not very future-proof though, so I
think specifying both minItems and maxItems would be best. Confirmation
from a DT maintainer would be appreciated.

The fsl,imx8mp-isi block above should then be fixed. It currently only
has maxItems set, minItems should be set to 2 as well.

> > +        ports:
> > +          properties:
> > +            port@0:
> > +              description: Pixel Link Slave 0
> > +            port@1:
> > +              description: Pixel Link Slave 1
> > +            port@2:
> > +              description: MIPI CSI-2 RX 0
> > +            port@3:
> > +              description: MIPI CSI-2 RX 1
> > +          required:
> > +            - port@2
> > +            - port@3
> > +
> 
>      else
>        properties:
>          interrupts:
>            maxItem: 2
> 
> to keep the same restriction for existed compatible string.

We already specify the number of interrupts in two separate conditional
blocks above, with any else statement (for all but fsl,imx8mp-isi first,
and then for fsl,imx8mp-isi). Both specify maxItems, so I think we're
fine.

> >  additionalProperties: false
> >
> >  examples:

-- 
Regards,

Laurent Pinchart
Re: [PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string
Posted by Frank Li 3 months, 2 weeks ago
On Mon, Oct 27, 2025 at 12:04:38AM +0200, Laurent Pinchart wrote:
> On Fri, Oct 24, 2025 at 09:34:14AM -0400, Frank Li wrote:
> > On Fri, Oct 24, 2025 at 05:46:52PM +0800, Guoniu Zhou wrote:
> > > From: Guoniu Zhou <guoniu.zhou@nxp.com>
> > >
> > > The ISI module on i.MX95 supports up to eight channels and four link
> > > sources to obtain the image data for processing in its pipelines. It
> > > can process up to eight image sources at the same time.
> > >
> > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > ---
> > >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 26 +++++++++++++++++++++-
> > >  1 file changed, 25 insertions(+), 1 deletion(-)
> > >
> > > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..eaab98ecf343a2cd3620f7469c016c3955d37406 100644
> > > --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > @@ -23,6 +23,7 @@ properties:
> > >        - fsl,imx8mp-isi
> > >        - fsl,imx8ulp-isi
> > >        - fsl,imx93-isi
> > > +      - fsl,imx95-isi
> > >
> > >    reg:
> > >      maxItems: 1
> > > @@ -49,7 +50,7 @@ properties:
> > >    interrupts:
> > >      description: Processing pipeline interrupts, one per pipeline
> > >      minItems: 1
> > > -    maxItems: 2
> > > +    maxItems: 8
> > >
> > >    power-domains:
> > >      maxItems: 1
> > > @@ -109,6 +110,29 @@ allOf:
> > >              - port@0
> > >              - port@1
> > >
> > > +  - if:
> > > +      properties:
> > > +        compatible:
> > > +          contains:
> > > +            const: fsl,imx95-isi
> > > +    then:
> > > +      properties:
> > > +        interrupts:
> > > +          maxItems: 8
> >
> > should minItems: 8 because you already limit maxItems at top;
>
> As far as I understand, when no "items" are specified, minItems defaults
> to 1, and maxItems defaults to minItems (if specified) or 0 (if minItems
> is not specified). This is implemented in dtschema/lib.py of
> https://github.com/devicetree-org/dt-schema.git.
>
> Then, in dtschema/fixups.py, if only one of minItems or maxItems is
> specified, the other one is set to the same value. I believe relying on
> this is frowned upon by the DT maintainers.
>
> We could specify minItems only here, as the top-level constraint will
> ensure we don't go over 8. That's not very future-proof though, so I
> think specifying both minItems and maxItems would be best. Confirmation
> from a DT maintainer would be appreciated.

I pretty sure I am correct. please below thread, I met many similar cases
before.
https://lore.kernel.org/imx/72c29785-eb7a-4cc8-a74c-3aad50129a23@kernel.org/

Frank

>
> The fsl,imx8mp-isi block above should then be fixed. It currently only
> has maxItems set, minItems should be set to 2 as well.
>
> > > +        ports:
> > > +          properties:
> > > +            port@0:
> > > +              description: Pixel Link Slave 0
> > > +            port@1:
> > > +              description: Pixel Link Slave 1
> > > +            port@2:
> > > +              description: MIPI CSI-2 RX 0
> > > +            port@3:
> > > +              description: MIPI CSI-2 RX 1
> > > +          required:
> > > +            - port@2
> > > +            - port@3
> > > +
> >
> >      else
> >        properties:
> >          interrupts:
> >            maxItem: 2
> >
> > to keep the same restriction for existed compatible string.
>
> We already specify the number of interrupts in two separate conditional
> blocks above, with any else statement (for all but fsl,imx8mp-isi first,
> and then for fsl,imx8mp-isi). Both specify maxItems, so I think we're
> fine.
>
> > >  additionalProperties: false
> > >
> > >  examples:
>
> --
> Regards,
>
> Laurent Pinchart
Re: [PATCH 1/3] media: dt-bindings: nxp,imx8-isi: Add i.MX95 ISI compatible string
Posted by Laurent Pinchart 3 months, 1 week ago
On Mon, Oct 27, 2025 at 03:19:58PM -0400, Frank Li wrote:
> On Mon, Oct 27, 2025 at 12:04:38AM +0200, Laurent Pinchart wrote:
> > On Fri, Oct 24, 2025 at 09:34:14AM -0400, Frank Li wrote:
> > > On Fri, Oct 24, 2025 at 05:46:52PM +0800, Guoniu Zhou wrote:
> > > > From: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > >
> > > > The ISI module on i.MX95 supports up to eight channels and four link
> > > > sources to obtain the image data for processing in its pipelines. It
> > > > can process up to eight image sources at the same time.
> > > >
> > > > Signed-off-by: Guoniu Zhou <guoniu.zhou@nxp.com>
> > > > ---
> > > >  .../devicetree/bindings/media/nxp,imx8-isi.yaml    | 26 +++++++++++++++++++++-
> > > >  1 file changed, 25 insertions(+), 1 deletion(-)
> > > >
> > > > diff --git a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > > index f43b91984f0152fbbcf80db3b3bbad7e8ad6c11e..eaab98ecf343a2cd3620f7469c016c3955d37406 100644
> > > > --- a/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > > +++ b/Documentation/devicetree/bindings/media/nxp,imx8-isi.yaml
> > > > @@ -23,6 +23,7 @@ properties:
> > > >        - fsl,imx8mp-isi
> > > >        - fsl,imx8ulp-isi
> > > >        - fsl,imx93-isi
> > > > +      - fsl,imx95-isi
> > > >
> > > >    reg:
> > > >      maxItems: 1
> > > > @@ -49,7 +50,7 @@ properties:
> > > >    interrupts:
> > > >      description: Processing pipeline interrupts, one per pipeline
> > > >      minItems: 1
> > > > -    maxItems: 2
> > > > +    maxItems: 8
> > > >
> > > >    power-domains:
> > > >      maxItems: 1
> > > > @@ -109,6 +110,29 @@ allOf:
> > > >              - port@0
> > > >              - port@1
> > > >
> > > > +  - if:
> > > > +      properties:
> > > > +        compatible:
> > > > +          contains:
> > > > +            const: fsl,imx95-isi
> > > > +    then:
> > > > +      properties:
> > > > +        interrupts:
> > > > +          maxItems: 8
> > >
> > > should minItems: 8 because you already limit maxItems at top;
> >
> > As far as I understand, when no "items" are specified, minItems defaults
> > to 1, and maxItems defaults to minItems (if specified) or 0 (if minItems
> > is not specified). This is implemented in dtschema/lib.py of
> > https://github.com/devicetree-org/dt-schema.git.
> >
> > Then, in dtschema/fixups.py, if only one of minItems or maxItems is
> > specified, the other one is set to the same value. I believe relying on
> > this is frowned upon by the DT maintainers.
> >
> > We could specify minItems only here, as the top-level constraint will
> > ensure we don't go over 8. That's not very future-proof though, so I
> > think specifying both minItems and maxItems would be best. Confirmation
> > from a DT maintainer would be appreciated.
> 
> I pretty sure I am correct. please below thread, I met many similar cases
> before.
> https://lore.kernel.org/imx/72c29785-eb7a-4cc8-a74c-3aad50129a23@kernel.org/

I discussed this with Krzysztof on IRC last week. He said that in
conditional statements, both minItems and maxItems should be set, except
when one of them is a border constraint (being the same as the top-level
constraint). In that case it can be omitted.

So in this particular case you're right, we should specify minItems
here, not maxItems.

> > The fsl,imx8mp-isi block above should then be fixed. It currently only
> > has maxItems set, minItems should be set to 2 as well.

The fsl,imx8mp-isi conditional block should specify both minItems and
maxItems, and set both to 2.

> >
> > > > +        ports:
> > > > +          properties:
> > > > +            port@0:
> > > > +              description: Pixel Link Slave 0
> > > > +            port@1:
> > > > +              description: Pixel Link Slave 1
> > > > +            port@2:
> > > > +              description: MIPI CSI-2 RX 0
> > > > +            port@3:
> > > > +              description: MIPI CSI-2 RX 1
> > > > +          required:
> > > > +            - port@2
> > > > +            - port@3
> > > > +
> > >
> > >      else
> > >        properties:
> > >          interrupts:
> > >            maxItem: 2
> > >
> > > to keep the same restriction for existed compatible string.
> >
> > We already specify the number of interrupts in two separate conditional
> > blocks above, with any else statement (for all but fsl,imx8mp-isi first,
> > and then for fsl,imx8mp-isi). Both specify maxItems, so I think we're
> > fine.
> >
> > > >  additionalProperties: false
> > > >
> > > >  examples:

-- 
Regards,

Laurent Pinchart