2021-08-27 17:20:47

by Mark Kettenis

[permalink] [raw]
Subject: [PATCH v4 2/4] dt-bindings: interrupt-controller: msi: Add msi-ranges property

From: Mark Kettenis <[email protected]>

Update the MSI controller binding to add an msi-ranges property
that specifies how MSIs map onto regular interrupts on some other
interrupt controller.

Signed-off-by: Mark Kettenis <[email protected]>
---
.../bindings/interrupt-controller/msi-controller.yaml | 8 ++++++++
1 file changed, 8 insertions(+)

diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
index 5ed6cd46e2e0..bf8b8a7dba09 100644
--- a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
+++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
@@ -31,4 +31,12 @@ properties:
Identifies the node as an MSI controller.
$ref: /schemas/types.yaml#/definitions/flag

+ msi-ranges:
+ description:
+ A list of pairs <intid span>, where "intid" is the specification
+ of the first interrupt (including the phandle for the interrupt
+ controller) that can be used as an MSI, and "span" the size of
+ that range. Multiple ranges can be provided.
+ $ref: /schemas/types.yaml#/definitions/phandle-array
+
additionalProperties: true
--
2.32.0


2021-08-31 21:51:50

by Rob Herring

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: interrupt-controller: msi: Add msi-ranges property

On Fri, Aug 27, 2021 at 07:15:27PM +0200, Mark Kettenis wrote:
> From: Mark Kettenis <[email protected]>
>
> Update the MSI controller binding to add an msi-ranges property
> that specifies how MSIs map onto regular interrupts on some other
> interrupt controller.
>
> Signed-off-by: Mark Kettenis <[email protected]>
> ---
> .../bindings/interrupt-controller/msi-controller.yaml | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> index 5ed6cd46e2e0..bf8b8a7dba09 100644
> --- a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> @@ -31,4 +31,12 @@ properties:
> Identifies the node as an MSI controller.
> $ref: /schemas/types.yaml#/definitions/flag
>
> + msi-ranges:
> + description:
> + A list of pairs <intid span>, where "intid" is the specification

It's not really 'pairs' and 'interrupt specifier' is the terminology the
spec uses. How about:

A list of <phandle intspec span>, where "phandle" is parent interrupt
controller, "intspec" is the starting/base interrupt specifier, and
"span" is the size of that range (typically multiples of 32).

The 'multiples of 32' part is what Marc told me.

> + of the first interrupt (including the phandle for the interrupt
> + controller) that can be used as an MSI, and "span" the size of
> + that range. Multiple ranges can be provided.
> + $ref: /schemas/types.yaml#/definitions/phandle-array
> +
> additionalProperties: true
> --
> 2.32.0
>
>

2021-09-21 17:54:17

by Mark Kettenis

[permalink] [raw]
Subject: Re: [PATCH v4 2/4] dt-bindings: interrupt-controller: msi: Add msi-ranges property

> Date: Tue, 31 Aug 2021 16:16:02 -0500
> From: Rob Herring <[email protected]>
>
> On Fri, Aug 27, 2021 at 07:15:27PM +0200, Mark Kettenis wrote:
> > From: Mark Kettenis <[email protected]>
> >
> > Update the MSI controller binding to add an msi-ranges property
> > that specifies how MSIs map onto regular interrupts on some other
> > interrupt controller.
> >
> > Signed-off-by: Mark Kettenis <[email protected]>
> > ---
> > .../bindings/interrupt-controller/msi-controller.yaml | 8 ++++++++
> > 1 file changed, 8 insertions(+)
> >
> > diff --git a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> > index 5ed6cd46e2e0..bf8b8a7dba09 100644
> > --- a/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> > +++ b/Documentation/devicetree/bindings/interrupt-controller/msi-controller.yaml
> > @@ -31,4 +31,12 @@ properties:
> > Identifies the node as an MSI controller.
> > $ref: /schemas/types.yaml#/definitions/flag
> >
> > + msi-ranges:
> > + description:
> > + A list of pairs <intid span>, where "intid" is the specification
>
> It's not really 'pairs' and 'interrupt specifier' is the terminology the
> spec uses. How about:
>
> A list of <phandle intspec span>, where "phandle" is parent interrupt
> controller, "intspec" is the starting/base interrupt specifier, and
> "span" is the size of that range (typically multiples of 32).
>
> The 'multiples of 32' part is what Marc told me.

Thanks Rob! That sounds good. But 32 is what's typical for the Apple
hardware, and I expect that different hardware that might use this
property will use a different value, so I left that last bit out. I
also kept the bit that states that multiple ranges are allowed.

> > + of the first interrupt (including the phandle for the interrupt
> > + controller) that can be used as an MSI, and "span" the size of
> > + that range. Multiple ranges can be provided.
> > + $ref: /schemas/types.yaml#/definitions/phandle-array
> > +
> > additionalProperties: true
> > --
> > 2.32.0
> >
> >
>