On Fri, 1 Nov 2019, Rob Herring wrote:
Action items:
- All: if you can think of simple solution to interrupt-map info duplication, let Stefano know & he will try to add to the example.
- Stefano: Remove ranges from amba_rpu
- Stefano: In next couple weeks, look at GPIO controller extensions & write in detail & send to list so we can discuss.
I am trying to look for the interrupt-related GPIO extensions, and the only one I could find is: socionext,interrupt-ranges from Documentation/devicetree/bindings/gpio/gpio-uniphier.txt:
- socionext,interrupt-ranges: Specifies an interrupt number mapping between this GPIO controller and its interrupt parent, in the form of arbitrary number of <child-interrupt-base parent-interrupt-base length> triplets.
No, there's numerous examples that *should* have used interrupt-map, but invented their own thing.
which is very similar to what we need here, but it looks like a socionext specific property while I seem to recall that Rob said that it was made "standard".
Rob, is this the property you had in mind? Or is there another one?
No. It's '*-map-pass-thru' and in the DT spec. Here's the commit adding it[1]. The motivation for this was GPIO, but the spec was written generically.
Rob
[1] https://github.com/devicetree-org/devicetree-specification/commit/32c96cd64d...
Thank you, that was very helpful! So if I read it right, it would turn it into this at the interrupt-multiplexer node:
#interrupt-cells = <3>;
/* copy all attributes from children to parents */ interrupt-map-pass-thru = <0xffffffff 0xffffffff 0xffffffff>;
/* mask all childres bits to always match the first 0x0 entries */ interrupt-map-mask = <0x0 0x0 0x0>;
/* child address cells, child interrupt cells, parent, parent interrupt cells */ interrupt-map = <0x0 0x0 0x0 &gic_a72 0x0 0x0 0x0>, <0x0 0x0 0x0 &gic_r5 0x0 0x0 0x0>;
The zero interrupt-map-mask would make sure that any children interrupts would match the two zero interrupt-map entries. The fully set interrupt-map-pass-thru would make sure that any children interrupts numbers and flags would be copied over to the parents.