[PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller

Inochi Amaoto posted 3 patches 1 month, 3 weeks ago
There is a newer version of this series
.../bindings/dma/snps,dw-axi-dmac.yaml        |  1 +
arch/riscv/boot/dts/sophgo/cv180x.dtsi        |  2 +-
.../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 26 ++++++++++++++++---
drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  1 +
4 files changed, 25 insertions(+), 5 deletions(-)
[PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller
Posted by Inochi Amaoto 1 month, 3 weeks ago
As the DMA controller on Sophgo CV1800 series SoC only has 8 channels,
the SoC provides a dma multiplexer to reuse the DMA channel. However,
the dma multiplexer also controlls the DMA interrupt multiplexer, which
means that the dma multiplexer needs to know the channel number.

Change the DMA phandle args parsing logic so it can use handshake
number as channel number if necessary.

Change from v1:
1. rebase to v6.19-rc1
2. patch 1: remove a comment placed in wrong place.
3. patch 2: fix typo in comments.
4. patch 2: initialize chan as NULL in dw_axi_dma_of_xlate.

Inochi Amaoto (3):
  dt-bindings: dma: snps,dw-axi-dmac: Add CV1800B compatible
  dmaengine: dw-axi-dmac: Add support for CV1800B DMA
  riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel
    number for DMA controller

 .../bindings/dma/snps,dw-axi-dmac.yaml        |  1 +
 arch/riscv/boot/dts/sophgo/cv180x.dtsi        |  2 +-
 .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 26 ++++++++++++++++---
 drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  1 +
 4 files changed, 25 insertions(+), 5 deletions(-)

--
2.52.0
Re: [PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller
Posted by Inochi Amaoto 3 weeks, 1 day ago
On Mon, Dec 15, 2025 at 06:45:57AM +0800, Inochi Amaoto wrote:
> As the DMA controller on Sophgo CV1800 series SoC only has 8 channels,
> the SoC provides a dma multiplexer to reuse the DMA channel. However,
> the dma multiplexer also controlls the DMA interrupt multiplexer, which
> means that the dma multiplexer needs to know the channel number.
> 
> Change the DMA phandle args parsing logic so it can use handshake
> number as channel number if necessary.
> 
> Change from v1:
> 1. rebase to v6.19-rc1
> 2. patch 1: remove a comment placed in wrong place.
> 3. patch 2: fix typo in comments.
> 4. patch 2: initialize chan as NULL in dw_axi_dma_of_xlate.
> 
> Inochi Amaoto (3):
>   dt-bindings: dma: snps,dw-axi-dmac: Add CV1800B compatible
>   dmaengine: dw-axi-dmac: Add support for CV1800B DMA
>   riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel
>     number for DMA controller
> 
>  .../bindings/dma/snps,dw-axi-dmac.yaml        |  1 +
>  arch/riscv/boot/dts/sophgo/cv180x.dtsi        |  2 +-
>  .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 26 ++++++++++++++++---
>  drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  1 +
>  4 files changed, 25 insertions(+), 5 deletions(-)
> 
> --
> 2.52.0
> 

Hi, Vinod

Would you have any suggestion on this patch? Or this is OK to merge?

Regards,
Inochi
Re: [PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller
Posted by Inochi Amaoto 1 month, 3 weeks ago
On Mon, Dec 15, 2025 at 06:45:57AM +0800, Inochi Amaoto wrote:
> As the DMA controller on Sophgo CV1800 series SoC only has 8 channels,
> the SoC provides a dma multiplexer to reuse the DMA channel. However,
> the dma multiplexer also controlls the DMA interrupt multiplexer, which
> means that the dma multiplexer needs to know the channel number.
> 
> Change the DMA phandle args parsing logic so it can use handshake
> number as channel number if necessary.
> 
> Change from v1:
> 1. rebase to v6.19-rc1
> 2. patch 1: remove a comment placed in wrong place.
> 3. patch 2: fix typo in comments.
> 4. patch 2: initialize chan as NULL in dw_axi_dma_of_xlate.
> 
> Inochi Amaoto (3):
>   dt-bindings: dma: snps,dw-axi-dmac: Add CV1800B compatible
>   dmaengine: dw-axi-dmac: Add support for CV1800B DMA
>   riscv: dts: sophgo: cv180x: Allow the DMA multiplexer to set channel
>     number for DMA controller
> 
>  .../bindings/dma/snps,dw-axi-dmac.yaml        |  1 +
>  arch/riscv/boot/dts/sophgo/cv180x.dtsi        |  2 +-
>  .../dma/dw-axi-dmac/dw-axi-dmac-platform.c    | 26 ++++++++++++++++---
>  drivers/dma/dw-axi-dmac/dw-axi-dmac.h         |  1 +
>  4 files changed, 25 insertions(+), 5 deletions(-)
> 
> --
> 2.52.0
> 

Hi Anton,

Since you have tested this patch before, could you give a Tested-by?

Regards,
Inochi
Re: [PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller
Posted by Anton D. Stavinskii 1 month, 3 weeks ago
On Tue, Dec 16, 2025 at 07:09:16PM +0400, Inochi Amaoto wrote:

> Hi Anton,
> 
> Since you have tested this patch before, could you give a Tested-by?
> 
Done. V2 works fine with Milk Duo 256M with 2 channels RX and TX working
simultaneously.


Tested-by: Anton D. Stavinskii <stavinsky@gmail.com>
Re: [PATCH v2 0/3] riscv: sophgo: allow DMA multiplexer set channel number for DMA controller
Posted by Inochi Amaoto 1 month, 3 weeks ago
On Tue, Dec 16, 2025 at 07:25:06PM +0400, Anton D. Stavinskii wrote:
> On Tue, Dec 16, 2025 at 07:09:16PM +0400, Inochi Amaoto wrote:
> 
> > Hi Anton,
> > 
> > Since you have tested this patch before, could you give a Tested-by?
> > 
> Done. V2 works fine with Milk Duo 256M with 2 channels RX and TX working
> simultaneously.
> 
> 
> Tested-by: Anton D. Stavinskii <stavinsky@gmail.com>

Thanks

Regards,
Inochi