Below is my system information and I am trying to enable communication using SPI protocol but unable to do so.
deepak@tx2:/boot/dtb$ cat /etc/nv_tegra_release | grep release
R32 (release), REVISION: 2.1, GCID: 16294929, BOARD: t186ref, EABI: aarch64, DATE: Tue Aug 13 04:45:36 UTC 2019
deepak@tx2:~$ uname -a
Linux tx2 4.9.140 #0 SMP PREEMPT Tue Nov 26 17:45:07 AEDT 2019 aarch64 aarch64 aarch64 GNU/Linux
I followed the below steps to enable /dev/spidev3.0
- built custom kernel on target using the steps in this link https://elinux.org/Jetson/TX2_SPI but used the sources for 'L4T Sources 32.2.3'. The kernel and modules built successfully
- Replaced the image with the built one and installed the modules too. spidev.ko was built successfully.
- Modified the device tree and updated the /boot/dtb using the steps provided in the same link. After reboot, I was able to find the /dev/spidev3.0 device
- I built the spidev-test from the link https://github.com/rm-hull/spidev-test and ran it with the 19th and 21st pin of the J21 header connected for a loop back test I got the below result. The rx is not receiving what is sent out.
spi mode: 0x0
bits per word: 8
max speed: 500000 Hz (500 KHz)
TX | FF FF FF FF FF FF 40 00 00 00 00 95 FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF FF F0 0D | ......@....�..................�.
RX | 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 | ................................
When I tested with oscilloscope, there is nothing being transmitted. Neither the clock or chipselect pins showed any logic changes. The link https://elinux.org/Jetson/TX2_SPI#Modifying_the_Pinmux_Configuration talks about the modification to pinmux config file, but I am unable to find this file. So I didn’t do this step.
So my questions are
Why does the SPI show up in the /dev but I am unable to communicate?
Does the pinmux config file need modification? If so how to do modify it in R32 with target building setup?