We are using the nvidia devkit device tree w/ no changes to the default SPI nodes in the device trees for both the xavier and orin. We are not setting any delays intentionally
Could you verify the status for Xavier NX with the latest JP5.1.2 - R35.4.1which is using K5.10?
so that we could clarify if the issue is coming from the platform or the kernel release.
From your result, it seems relating to the driver in these two kernel release.
Does you SPI work as expected with K5.10 after you use the SPI driver from K4.9?
It is the difference between the kernel release.
We won’t reverse the kernel driver back to old release.
I’m not quite sure if the issue is caused from some new feature in K5.10 so that the performance worse than K4.9.
Hi, @akhil.veeraghanta, @KevinFFF
I follow your method in r35.4.1 for my agx xavier devkit with preempt_rt patch. But I encounter the following error in the compiling kernel process:
/home/***/nvidia/r3541agx_rt/Linux_for_Tegra/source/public/kernel/kernel-5.10/drivers/spi/spi-tegra114.c: 在函数‘tegra_spi_init_dma_param’中:
/home/***/nvidia/r3541agx_rt/Linux_for_Tegra/source/public/kernel/kernel-5.10/drivers/spi/spi-tegra114.c:772:13: 错误: implicit declaration of function ‘dma_request_slave_channel_reason’; did you mean ‘dma_request_slave_channel_compat’? [-Werror=implicit-function-declaration]
772 | dma_chan = dma_request_slave_channel_reason(tspi->dev,
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
| dma_request_slave_channel_compat
/home/***/nvidia/r3541agx_rt/Linux_for_Tegra/source/public/kernel/kernel-5.10/drivers/spi/spi-tegra114.c:772:11: 错误: assignment to ‘struct dma_chan *’ from ‘int’ makes pointer from integer without a cast [-Werror=int-conversion]
772 | dma_chan = dma_request_slave_channel_reason(tspi->dev,
| ^
cc1:所有的警告都被当作是错误
make[3]: *** [/home/***/nvidia/r3541agx_rt/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/Makefile.build:281:drivers/spi/spi-tegra114.o] 错误 1
make[2]: *** [/home/***/nvidia/r3541agx_rt/Linux_for_Tegra/source/public/kernel/kernel-5.10/scripts/Makefile.build:498:drivers/spi] 错误 2
So, I would like to know in which version did you successfully apply this method? r35.3.1 or r35.4.1? Have you encountered any of the above issues? Have you applied preempt_ rt patch? I found that the function dma_request_slave_channel_reason is defined at dmaengine.h in K4.9: #define dma_request_slave_channel_reason(dev, name) dma_request_chan(dev, name) But I didn’t find this definition in K5.10. Can I copy this definition to dmaengine.h in K5.10.
We just grabbed the signature from 5.10 and replaced it, it was just that one line you have to fix and the rest of it builds
Unfortunately I don’t have the file handy to send you, but if you compare the two files side by side (4.9 and 5.10), you can grab the line in 5.10 and copy it over to the 4.9 file and it works
Hi @KevinFFF,
Following the above solution. I can get more stable SPI transfer time in K5.10, such as about 350us transfer time with 128 byte SPI data. This basically meets our application needs. But I am not sure if there is any further optimization space. Do your team have any new solutions?