Have anyone got DMA for SPI working with Hikey 960 or 970?

Hi I’m trying to transfer some large data over SPI to hikey960 board, but throughput is a problem. But even when I modify the kernel driver to fill FIFO with all 128 bytes the processor cannot fill the pipeline quick enough. Was hoping DMA should be able to solve this.

I have found a few old posts about this but there does not seem to be a conclusion:

I have been able to get some progress with DMA for SPI 3 on channel 13 and 7 but it is still very flaky and unstable. The obvious question is have anyone got DMA working for SPI on either 970 or 960 hikey board? If so what kernel and device tree was used?

There seems to have been an issue with the permissions for DMA and security modes.

I have seen a few commits like this:

[PATCH 4/8 v5] dma: k3dma: Delete axi_config https://lore.kernel.org/patchwork/patch/1035383/

where axi_config was removed from kernel but I have not seen where in boot-loader it should have been added, anyone have some directions for me?

Hi @simson,

It is being set here: https://github.com/ARM-software/arm-trusted-firmware/blob/master/plat/hisilicon/hikey960/hikey960_bl31_setup.c#L130

@simson Btw, there were issues with DMA on Hikey960 when I checked last time. And the patch series you referred were submitted as a result of that. But still I’m not sure whether DMA works for SPI or not but it works for I2S. Since the platform is not documented publicly it is difficult for us to debug the issue, hence we rely on Hisilicon for the critical fixes like this.

@jstultz Have you tested SPI w/ DMA on Hikey960?