SPI not showing up in /dev

SPI not showing up in /dev
Can anyone point me in the right direction?

Environment:
Host: Ubuntu 18.04
Target:
NVIDIA Jetson Xavier NX (Developer Kit Version)
L4T 32.6.1 [ JetPack 4.6 ]
Ubuntu 18.04.5 LTS
Kernel Version: 4.9.253-tegra

Changes made
directory: ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/sources/hardware/nvidia/soc/t19x/kernel-dts/tegra194-soc
File: tegra194-soc-spi.dtsi
for spi0 change:
status = “okay” // “disabled”;

Note: I have not added the pin configuration yet.

Rebuilt kernel

make ARCH=arm64 O=$TEGRA_KERNEL_OUT -j2

Copied Files:
cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra/kernel
cp $TEGRA_KERNEL_OUT/arch/arm64/boot/Image Image
cd dtb
cp -a $TEGRA_KERNEL_OUT/arch/arm64/boot/dts/. .
cd ~/nvidia/nvidia_sdk/JetPack_4.6_Linux_JETSON_XAVIER_NX_TARGETS/Linux_for_Tegra

Flashed target
sudo ./flash.sh jetson-xavier-nx-devkit-emmc mmcblk0p1

The boot/dtb/kernel_tegra194-p3668-all-p3509-0000.dts (generated using dtc from the dtb)
shows the spi (see attached file)

Information from Target:

asei@asei-nx:~$ sudo grep spi /sys/kernel/debug/tegra_pinctrl_reg
Bank: 1 Reg: 0x0c302028 Val: 0x00000002 → spi2_mosi_pcc2
Bank: 1 Reg: 0x0c302038 Val: 0x00000002 → spi2_cs0_pcc3
Bank: 1 Reg: 0x0c302048 Val: 0x00000002 → spi2_sck_pcc0
Bank: 1 Reg: 0x0c302050 Val: 0x00000002 → spi2_miso_pcc1

Bank: 0 Reg: 0x0243d008 Val: 0x00000055 → spi3_miso_py1
Bank: 0 Reg: 0x0243d010 Val: 0x00000448 → spi1_cs0_pz6
Bank: 0 Reg: 0x0243d018 Val: 0x00000055 → spi3_cs0_py3
Bank: 0 Reg: 0x0243d020 Val: 0x00000444 → spi1_miso_pz4
Bank: 0 Reg: 0x0243d028 Val: 0x00000055 → spi3_cs1_py4
Bank: 0 Reg: 0x0243d040 Val: 0x00000444 → spi1_sck_pz3
Bank: 0 Reg: 0x0243d048 Val: 0x00000055 → spi3_sck_py0
Bank: 0 Reg: 0x0243d050 Val: 0x00000448 → spi1_cs1_pz7
Bank: 0 Reg: 0x0243d058 Val: 0x00000444 → spi1_mosi_pz5
Bank: 0 Reg: 0x0243d060 Val: 0x00000055 → spi3_mosi_py2

asei@asei-nx:~$ dmesg | grep spi
[ 0.707771] iommu: Adding device 3210000.spi to group 7
[ 0.708106] iommu: Adding device 3230000.spi to group 8
[ 0.708428] iommu: Adding device 3270000.spi to group 9
[ 1.522774] qspi_mtd spi6.0: s25fs256s SSG 8 0 1000 2000000
[ 1.522784] qspi_mtd spi6.0: s25fs256s (32768 Kbytes)
[ 1.522794] qspi_mtd spi6.0: mtd .name = spi6.0, .size = 0x2000000 (32MiB) .erasesize = 0x00010000 (64KiB) .numeraseregions = 0
[ 1.523058] 1 ofpart partitions found on MTD device spi6.0
[ 1.523064] Creating 1 MTD partitions on “spi6.0”:

boot_dtb_kernel_tegra194-p3668-all-p3509-0000.dts (253.2 KB)
tegra194-soc-spi.dtsi (4.0 KB)

Need modprobe spidev to create it.

Thanks, that did it. I did not see that anywhere in other posts on adding spi.

This topic was automatically closed 60 days after the last reply. New replies are no longer allowed.