OE4T / meta-tegra

BSP layer for NVIDIA Jetson platforms, based on L4T
MIT License
420 stars 230 forks source link

Spidev loop back test is not working on L4T 35.4.1 #1640

Closed noob502 closed 4 months ago

noob502 commented 4 months ago

I am creating custom image using Yocto- Openembedded Core tools for jetson orin nano devkit board. Curretnly checkedout mickledore branch for 35.4.1

IMAGE_INSTALL:append= "spidev-test spitools \
                        kernel-module-spidev \
                        lmsensors busybox kernel-devicetree \
                        systemd \
"                      

KERNEL_MODULE_AUTOLOAD += "spidev"
KERNEL_DEVICETREE_APPLY_OVERLAYS = "tegra194-p3668-all-p3509-0000-hdr40.dtbo"

Above addition I did for spi in local.conf. I did the loopback test, it dose not send any data. I connected pins 19 & 21 (SPI0), and pins 37 & 22 (SPI1).

root@jetson-os:~# lsmod | grep -i spi                                                         
spi_tegra114           32768  0                                                                
spidev                 24576  0                                                                
root@jetson-os:~# ls -l /dev/spi*                                                             
crw------- 1 root root 153, 0 Mar  3 09:49 /dev/spidev0.0                                      
crw------- 1 root root 153, 1 Mar  3 09:49 /dev/spidev0.1                                      
crw------- 1 root root 153, 2 Mar  3 09:49 /dev/spidev2.0                                      
crw------- 1 root root 153, 3 Mar  3 09:49 /dev/spidev2.1                                      
root@jetson-os:~# spidev_test -v -D /dev/spidev0.0 -v -p "Hello World"                        
spi mode: 0x0                                                                                  
bits per word: 8                                                                               
max speed: 500000 Hz (500 kHz)                                                                 
TX | 48 65 6C 6C 6F 20 57 6F 72 6C 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
RX | 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
root@jetson-os:~# spidev_test -v -D /dev/spidev0.1 -v -p "Hello World"                        
spi mode: 0x0                                                                                  
bits per word: 8                                                                               
max speed: 500000 Hz (500 kHz)                                                                 
TX | 48 65 6C 6C 6F 20 57 6F 72 6C 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
RX | 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
root@jetson-os:~# spidev_test -v -D /dev/spidev2.0 -v -p "Hello World"                        
spi mode: 0x0                                                                                  
bits per word: 8                                                                               
max speed: 500000 Hz (500 kHz)                                                                 
TX | 48 65 6C 6C 6F 20 57 6F 72 6C 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
RX | 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
root@jetson-os:~# spidev_test -v -D /dev/spidev2.1 -v -p "Hello World"                        
spi mode: 0x0                                                                                  
bits per word: 8                                                                               
max speed: 500000 Hz (500 kHz)                                                                 
TX | 48 65 6C 6C 6F 20 57 6F 72 6C 64 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|
RX | 00 00 00 00 00 00 00 00 00 00 00 __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __ __|

Thank you in advance.

madisongh commented 4 months ago

As I already mentioned in the discussion you opened earlier on this topic, that is not the correct DTB overlay file to use for the Orin Nano devkit.