I'm working on a iMX7d with kernel 4.1.15 from the freescale repo. But the same happened on an iMX6q with the same kernel.
I want to use SPI with activated SDMA.
It works fine with 64 bytes in one burst. When I increase to 128 bytes the transfer times out after 3s. And transfers after that block my device.
The timeout happens in drivers/spi/spi-imx.c in function spi_imx_dma_transfer. 3s is the default timeout.
I got lost in the interaction of spidev, spi, spi-imx and dmaengine and was hoping anybody had a similar experience and maybe a solution for it. Or an idea what to look at.
Thanks and best regards,
The spi is used by the spidev driver.
spi mode: 0x3
bits per word: 32
max speed: 500000 Hz (500 KHz)
len 128, delay 0, speed 500000, bpw 32
[ 82.184335] spi_master spi0: I/O Error in DMA TX:80
[ 82.190269] spi_master spi0: failed to transfer one message from queue
can't send spi message: Connection timed out
./sendSPI.sh: line 13: 465 Aborted ./spi-tool -D /dev/spidev0.1 -b32 -H -O -p "12345678901234567890123456789012345678902345678901234567890123456789012345678901234567890123456789012346578901234567980123456789"
spi-tool is the spidev test tool included in the kernel sources.