Hi all,
I’m trying to use the SPI1 bus on a Jetson NANO configured using Jetpack 4.4.
I followed the instruction from SPI on Jetson - Using Jetson-IO - JetsonHacks to enable the SPI1, but it doesn’t work.
I have a SD card with Jetpack 4.3 and the same software works correctly.
both the commands work as expected and yes, I’m using the SPI1 on the pins you listed.
Like I wrote above, if I insert an SD card created with JP4.3 everything works, it doesn’t using a JP4.4 SD card.
Is it possible that the size of the buffer of the spidev driver is not correctly set?
I followed this procedure to set it permanently to 20KB. It works with JP4.3, but at this point I have doubts that it is correct for JP4.4.
It is really important to have the correct SPI buffer size, otherwise the thermal image from a FLIR Lepton 3 module cannot be fully received (see my blog post)
Thanks for the feedback. I don’t see why that would not set the SPIDEV buffer size, but I wanted to ensure that the pinmux is configured as expected first. So to confirm is the output from the following commands the same between JP4.3 and JP4.4?
If so then the pinmux should be fine and jetson-io should be working fine. If we can confirm this, then we can focus on the SPI itself. Please note that I typically deal with jetson-io issues and so we can pull in the correct person for SPI once we have eliminated that as the problem.
Hi myzhar,
spidev driver did not change. It’s same for J4.3 and J4.4
Do you mean that setting bufsize to 20KB works in J4.3 and not in J4.4?
If it is so, it will help catching the problem faster.
Hi myzhar,
Also, can you try to modify Nano kernel dtb with following changes and let me know the results:
spi@7000d400 {
– controller-data {
– nvidia,enable-hw-based-cs;
– nvidia,rx-clk-tap-delay = <7>;
– };
};
Just remove controller-data node from SPI1 (spi@7000d400) in kernel dtb.
Use dtc command to recompile/update your dtb.
$ sudo dtc -I dtb -o test.dts
Open test.dts and modify it, then copy modified dts back to dtb
$ sudo dtc -I dts test.dts -O dtb -o
In nano-dtb: use kernel dtb which is getting flashed
Let me know if you still face the issue.
actually it is fixed in J4.4. Previously, these properties were there but not inside controller-data, so driver was not actually using these. Now, driver updates these functionalities in the SPI HW controller. So, let’s try to remove and get back to J4.3 to check if this is the issue.
Also, you can update dtb in the target where dtbs are present in /boot/
Please check.
I noticed that I modified the wrong DTB file. The file /boot/extlinux/extlinux.conf points to another DTB: /boot/tegra210-p3448-0000-p3449-0000-b00-user-custom.dtb.
I replicated the procedure above for this DTB file and tested again my application. NO SUCCESS. SPI still not working as expected.