diff mbox series

[v2,1/4] dt-bindings: dma: fsl-edma: add interrupts-extended property

Message ID 20250304093127.1954549-2-ping.bai@nxp.com (mailing list archive)
State New
Headers show
Series Add i.MX943 basic dts support | expand

Commit Message

Jacky Bai March 4, 2025, 9:31 a.m. UTC
Add interrupts-extended property for edma that has multiple interrupt
controllers used.

Signed-off-by: Jacky Bai <ping.bai@nxp.com>
---
 - v2 changes:
  - newly added entry
---
 Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11 ++++++++++-
 1 file changed, 10 insertions(+), 1 deletion(-)

Comments

Rob Herring (Arm) March 4, 2025, 10:57 a.m. UTC | #1
On Tue, 04 Mar 2025 17:31:24 +0800, Jacky Bai wrote:
> Add interrupts-extended property for edma that has multiple interrupt
> controllers used.
> 
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> ---
>  - v2 changes:
>   - newly added entry
> ---
>  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 

My bot found errors running 'make dt_binding_check' on your patch:

yamllint warnings/errors:
./Documentation/devicetree/bindings/dma/fsl,edma.yaml:102:5: [warning] wrong indentation: expected 6 but found 4 (indentation)
./Documentation/devicetree/bindings/dma/fsl,edma.yaml:104:5: [warning] wrong indentation: expected 6 but found 4 (indentation)

dtschema/dtc warnings/errors:

doc reference errors (make refcheckdocs):

See https://patchwork.ozlabs.org/project/devicetree-bindings/patch/20250304093127.1954549-2-ping.bai@nxp.com

The base for the series is generally the latest rc1. A different dependency
should be noted in *this* patch.

If you already ran 'make dt_binding_check' and didn't see the above
error(s), then make sure 'yamllint' is installed and dt-schema is up to
date:

pip3 install dtschema --upgrade

Please check and re-submit after running the above command yourself. Note
that DT_SCHEMA_FILES can be set to your schema file to speed up checking
your schema. However, it must be unset to test all examples with your schema.
Rob Herring (Arm) March 4, 2025, 1:13 p.m. UTC | #2
On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> Add interrupts-extended property for edma that has multiple interrupt
> controllers used.

Did you try using interrupts-extended? No. Because either is supported 
by the tools already.

> 
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> ---
>  - v2 changes:
>   - newly added entry
> ---
>  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
> 
> diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> index d54140f18d34..549afb8611a9 100644
> --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> @@ -38,6 +38,10 @@ properties:
>      minItems: 1
>      maxItems: 64
>  
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 65

Doesn't match the size for interrupt-names:

> +
>    interrupt-names:
>      minItems: 1
>      maxItems: 64
Jacky Bai March 4, 2025, 2:40 p.m. UTC | #3
Hi Rob,

> Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
> interrupts-extended property
> 
> On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> > Add interrupts-extended property for edma that has multiple interrupt
> > controllers used.
> 
> Did you try using interrupts-extended? No. Because either is supported by the
> tools already.
> 

We need to use interrupts-extended property for i.MX94 because for the edma's
interrupts, some are connected to irqsteer interrupt controller and some are connected
to the GIC. make dtbs_check report error, so I add this dt binding changes.

Sorry, Which tools are you referring?

> >
> > Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> > ---
> >  - v2 changes:
> >   - newly added entry
> > ---
> >  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11
> ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > index d54140f18d34..549afb8611a9 100644
> > --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > @@ -38,6 +38,10 @@ properties:
> >      minItems: 1
> >      maxItems: 64
> >
> > +  interrupts-extended:
> > +    minItems: 1
> > +    maxItems: 65
> 
> Doesn't match the size for interrupt-names:
> 

The interrupt-names are only true for vf610, maxItems is
enough for such case. do we still need to update it? 

> > +
> >    interrupt-names:
> >      minItems: 1
> >      maxItems: 64
Krzysztof Kozlowski March 4, 2025, 2:50 p.m. UTC | #4
On 04/03/2025 15:40, Jacky Bai wrote:
> Hi Rob,
> 
>> Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
>> interrupts-extended property
>>
>> On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
>>> Add interrupts-extended property for edma that has multiple interrupt
>>> controllers used.
>>
>> Did you try using interrupts-extended? No. Because either is supported by the
>> tools already.
>>
> 
> We need to use interrupts-extended property for i.MX94 because for the edma's
> interrupts, some are connected to irqsteer interrupt controller and some are connected
> to the GIC. make dtbs_check report error, so I add this dt binding changes.
> 
> Sorry, Which tools are you referring?

Linux, dtschema, everything.

> 
>>>
>>> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
>>> ---
>>>  - v2 changes:
>>>   - newly added entry
>>> ---
>>>  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11
>> ++++++++++-
>>>  1 file changed, 10 insertions(+), 1 deletion(-)
>>>
>>> diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
>>> b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
>>> index d54140f18d34..549afb8611a9 100644
>>> --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
>>> +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
>>> @@ -38,6 +38,10 @@ properties:
>>>      minItems: 1
>>>      maxItems: 64
>>>
>>> +  interrupts-extended:
>>> +    minItems: 1
>>> +    maxItems: 65
>>
>> Doesn't match the size for interrupt-names:
>>
> 
> The interrupt-names are only true for vf610, maxItems is
> enough for such case. do we still need to update it? 

They always go in sync.

Anyway, you did not get the point of Rob's comments: this patch is
neither needed nor correct. Just drop it and test again your DTS.



Best regards,
Krzysztof
Rob Herring (Arm) March 4, 2025, 2:53 p.m. UTC | #5
On Tue, Mar 4, 2025 at 8:40 AM Jacky Bai <ping.bai@nxp.com> wrote:
>
> Hi Rob,
>
> > Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
> > interrupts-extended property
> >
> > On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> > > Add interrupts-extended property for edma that has multiple interrupt
> > > controllers used.
> >
> > Did you try using interrupts-extended? No. Because either is supported by the
> > tools already.
> >
>
> We need to use interrupts-extended property for i.MX94 because for the edma's
> interrupts, some are connected to irqsteer interrupt controller and some are connected
> to the GIC. make dtbs_check report error, so I add this dt binding changes.
>
> Sorry, Which tools are you referring?

dtschema

The schemas specify 'interrupts' only. The dts files can use either
interrupts or interrupts-extended. If that doesn't work for you, it is
a bug in dtschema.

Rob
Frank Li March 4, 2025, 3:26 p.m. UTC | #6
On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> Add interrupts-extended property for edma that has multiple interrupt
> controllers used.
>
> Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> ---
>  - v2 changes:
>   - newly added entry
> ---
>  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11 ++++++++++-
>  1 file changed, 10 insertions(+), 1 deletion(-)
>
> diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> index d54140f18d34..549afb8611a9 100644
> --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> @@ -38,6 +38,10 @@ properties:
>      minItems: 1
>      maxItems: 64
>
> +  interrupts-extended:
> +    minItems: 1
> +    maxItems: 65
> +

I suggest add error irq later because optional err-irq patch under review.
https://lore.kernel.org/imx/20250228-edma_err-v1-0-d1869fe4163e@nxp.com/T/#t

Frank

>    interrupt-names:
>      minItems: 1
>      maxItems: 64
> @@ -87,9 +91,14 @@ required:
>    - "#dma-cells"
>    - compatible
>    - reg
> -  - interrupts
>    - dma-channels
>
> +oneOf:
> +  - required:
> +    - interrupts
> +  - required:
> +    - interrupts-extended
> +
>  allOf:
>    - $ref: dma-controller.yaml#
>    - if:
> --
> 2.34.1
>
Jacky Bai March 4, 2025, 3:38 p.m. UTC | #7
> Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
> interrupts-extended property
> 
> On Tue, Mar 4, 2025 at 8:40 AM Jacky Bai <ping.bai@nxp.com> wrote:
> >
> > Hi Rob,
> >
> > > Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
> > > interrupts-extended property
> > >
> > > On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> > > > Add interrupts-extended property for edma that has multiple
> > > > interrupt controllers used.
> > >
> > > Did you try using interrupts-extended? No. Because either is
> > > supported by the tools already.
> > >
> >
> > We need to use interrupts-extended property for i.MX94 because for the
> > edma's interrupts, some are connected to irqsteer interrupt controller
> > and some are connected to the GIC. make dtbs_check report error, so I add
> this dt binding changes.
> >
> > Sorry, Which tools are you referring?
> 
> dtschema
> 
> The schemas specify 'interrupts' only. The dts files can use either interrupts or
> interrupts-extended. If that doesn't work for you, it is a bug in dtschema.
> 

Clear for now, caused by maxItems.

Thx for your review.

BR
> Rob
Jacky Bai March 4, 2025, 3:41 p.m. UTC | #8
> Subject: Re: [PATCH v2 1/4] dt-bindings: dma: fsl-edma: add
> interrupts-extended property
> 
> On Tue, Mar 04, 2025 at 05:31:24PM +0800, Jacky Bai wrote:
> > Add interrupts-extended property for edma that has multiple interrupt
> > controllers used.
> >
> > Signed-off-by: Jacky Bai <ping.bai@nxp.com>
> > ---
> >  - v2 changes:
> >   - newly added entry
> > ---
> >  Documentation/devicetree/bindings/dma/fsl,edma.yaml | 11
> ++++++++++-
> >  1 file changed, 10 insertions(+), 1 deletion(-)
> >
> > diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > index d54140f18d34..549afb8611a9 100644
> > --- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > +++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
> > @@ -38,6 +38,10 @@ properties:
> >      minItems: 1
> >      maxItems: 64
> >
> > +  interrupts-extended:
> > +    minItems: 1
> > +    maxItems: 65
> > +
> 
> I suggest add error irq later because optional err-irq patch under review.
> https://lore.kernel.org/imx/20250228-edma_err-v1-0-d1869fe4163e@nxp.c
> om/T/#t
> 
> Frank

Ok, need the above patch ready first, then this patch can be dropped, I think.

BR
> 
> >    interrupt-names:
> >      minItems: 1
> >      maxItems: 64
> > @@ -87,9 +91,14 @@ required:
> >    - "#dma-cells"
> >    - compatible
> >    - reg
> > -  - interrupts
> >    - dma-channels
> >
> > +oneOf:
> > +  - required:
> > +    - interrupts
> > +  - required:
> > +    - interrupts-extended
> > +
> >  allOf:
> >    - $ref: dma-controller.yaml#
> >    - if:
> > --
> > 2.34.1
> >
diff mbox series

Patch

diff --git a/Documentation/devicetree/bindings/dma/fsl,edma.yaml b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
index d54140f18d34..549afb8611a9 100644
--- a/Documentation/devicetree/bindings/dma/fsl,edma.yaml
+++ b/Documentation/devicetree/bindings/dma/fsl,edma.yaml
@@ -38,6 +38,10 @@  properties:
     minItems: 1
     maxItems: 64
 
+  interrupts-extended:
+    minItems: 1
+    maxItems: 65
+
   interrupt-names:
     minItems: 1
     maxItems: 64
@@ -87,9 +91,14 @@  required:
   - "#dma-cells"
   - compatible
   - reg
-  - interrupts
   - dma-channels
 
+oneOf:
+  - required:
+    - interrupts
+  - required:
+    - interrupts-extended
+
 allOf:
   - $ref: dma-controller.yaml#
   - if: