Message ID | 20220705215213.1802496-4-mail@conchuod.ie (mailing list archive) |
---|---|
State | Accepted |
Commit | 4ce653d7c651d6a9fc6d5db4275624ac8d856b99 |
Headers | show |
Series | Canaan devicetree fixes | expand |
On 05-07-22, 22:52, Conor Dooley wrote: > From: Conor Dooley <conor.dooley@microchip.com> > > The Canaan k210 apparently has a Sysnopsys Designware AXI DMA > controller, but according to the documentation & devicetree it has 6 > interrupts rather than the standard one. Support the 6 interrupt > configuration by unconditionally extending the binding to a maximum of > 8 per-channel interrupts thereby matching the number of possible > channels. Applied, thanks
On 05/07/2022 22:52, Conor Dooley wrote: > From: Conor Dooley <conor.dooley@microchip.com> > > The Canaan k210 apparently has a Sysnopsys Designware AXI DMA > controller, but according to the documentation & devicetree it has 6 > interrupts rather than the standard one. Support the 6 interrupt > configuration by unconditionally extending the binding to a maximum of > 8 per-channel interrupts thereby matching the number of possible > channels. I think you can still configure it to produce a single interrupt even if there are per-channel interrupts available. This is from my reading of the driver a little while ago so may not be totally correct now. Having per-channel irqs might be useful in the future, but as above I think it'll require the driver to be updated to do it (and possibly some sort of detection) > Link: https://canaan-creative.com/wp-content/uploads/2020/03/kendryte_standalone_programming_guide_20190311144158_en.pdf #Page 51 > Reviewed-by: Serge Semin <fancer.lancer@gmail.com> > Reviewed-by: Rob Herring <robh@kernel.org> > Signed-off-by: Conor Dooley <conor.dooley@microchip.com> > --- > .../devicetree/bindings/dma/snps,dw-axi-dmac.yaml | 7 ++++++- > 1 file changed, 6 insertions(+), 1 deletion(-) > > diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > index 4324a94b26b2..67aa7bb6d36a 100644 > --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml > @@ -34,7 +34,12 @@ properties: > - const: axidma_apb_regs > > interrupts: > - maxItems: 1 > + description: > + If the IP-core synthesis parameter DMAX_INTR_IO_TYPE is set to 1, this > + will be per-channel interrupts. Otherwise, this is a single combined IRQ > + for all channels. > + minItems: 1 > + maxItems: 8 > > clocks: > items:
On 18/07/2022 16:12, Ben Dooks wrote: > On 05/07/2022 22:52, Conor Dooley wrote: >> From: Conor Dooley <conor.dooley@microchip.com> >> >> The Canaan k210 apparently has a Sysnopsys Designware AXI DMA >> controller, but according to the documentation & devicetree it has 6 >> interrupts rather than the standard one. Support the 6 interrupt >> configuration by unconditionally extending the binding to a maximum of >> 8 per-channel interrupts thereby matching the number of possible >> channels. > > I think you can still configure it to produce a single interrupt > even if there are per-channel interrupts available. This is from > my reading of the driver a little while ago so may not be totally > correct now. > > Having per-channel irqs might be useful in the future, but as above > I think it'll require the driver to be updated to do it (and possibly > some sort of detection) > Yah, driver would need an update. But happily that does not matter for the validity of the binding.
diff --git a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml index 4324a94b26b2..67aa7bb6d36a 100644 --- a/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml +++ b/Documentation/devicetree/bindings/dma/snps,dw-axi-dmac.yaml @@ -34,7 +34,12 @@ properties: - const: axidma_apb_regs interrupts: - maxItems: 1 + description: + If the IP-core synthesis parameter DMAX_INTR_IO_TYPE is set to 1, this + will be per-channel interrupts. Otherwise, this is a single combined IRQ + for all channels. + minItems: 1 + maxItems: 8 clocks: items: