Hello!
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,
Sebastian
PS:
The spi is used by the spidev driver.
PPS:
Output:
spi mode: 0x3
bits per word: 32
max speed: 500000 Hz (500 KHz)
size 127
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.
Hi,
having the SDMA firmware available helps.
It needs to be present in the filesystem to be loaded by the kernel.
/lib/firmware/imx/sdma
There is a download of the binary (that's the only way you get it from NXP) somewhere. But I can't find the note in my documents right now.
I hope that helps. Sorry for not having the links on hand.
Regards,
Sebastian
Thank you for your reply,
Sadly I already have sdma-imx7d.bin so that isn't the problem.
Regards,
Paulo
Hi,
I'm using kernel version 5.15.
Regards,
Paulo
Can you please share some more details?
regards,
Christian
Hi, I was wondering whether you have found solution to your problem. I have same problem on imx8m.