I am doing enable spi bus through dtsi file but it’s not done. please check my all test scenarios.
Scenario1 : SPI Test using device tree with Micro SD card device: Please see my attached scenario1.png for details.
1.Install Jetpack 4.6 in Micro SD card device.
2.enable spi bus drive using blow command.
cd /lib/modules/4.9.253-tegra/kernel/drivers/spi/
sudo insmod spidev.ko
3.spi interface will be generated after execute above commands
ls /dev/spidev
spidev0.0 spidev0.1 spidev1.0 spidev1.1
4.Load dtb file on running board.
5.Now Download below link and Test SPI bus after short Miso & mosi pins no 19 and 21 for spi1 .
https://github.com/rm-hull/spidev-test
cd spidev-test-master
gcc spidev_test.c -o spidev_test
./spidev_test -D /dev/spidev0.0 -v -p "Hello@@"
**NO output return**
Scenario2 SPI Test using jetson-io.py with Micro SD card device: Please see my attached scenario2.png for details.
1.Install Jetpack 4.6 in Micro SD card device.
2.enable spi bus drive using blow command.
cd /lib/modules/4.9.253-tegra/kernel/drivers/spi/
sudo insmod spidev.ko
3.spi interface will be generated after execute above commands
ls /dev/spidev
spidev0.0 spidev0.1 spidev1.0 spidev1.1
4. run jetson-io.py to enable spi1 and sp2 using bellow commands.
sudo /opt/nvidia/jetson-io/jetson-io.py
5.Now Download below link and Test SPI bus after short Miso & mosi pins no 19 and 21 for spi1 .
https://github.com/rm-hull/spidev-test
cd spidev-test-master
gcc spidev_test.c -o spidev_test
./spidev_test -D /dev/spidev0.0 -v -p "Hello@@"
**Output return here: Hello@@**
Scenario3: SPI Test using device tree with EMMC device: Please see my attached scenario3.png for details.
1.Install Jetpack 4.6 in EMMC device.
2.enable spi bus drive using blow command.
cd /lib/modules/4.9.253-tegra/kernel/drivers/spi/
sudo insmod spidev.ko
3.spi interface will be generated after execute above commands
ls /dev/spidev
spidev0.0 spidev0.1 spidev1.0 spidev1.1
4.Load dtb file on running board.
5.Now Download below link and Test SPI bus after short Miso & mosi pins no 19 and 21 for spi1 .
https://github.com/rm-hull/spidev-test
cd spidev-test-master
gcc spidev_test.c -o spidev_test
./spidev_test -D /dev/spidev0.0 -v -p "Hello@@"
**NO output return**
Scenario4: SPI Test using jetson-io.py with EMMC device. Pease see scenario4.png for details
I think you did not exit jetson-io.py with “Save and reboot to reconfigure pins”.
The pin configuration will be stored in a DT overlay and will be available only after reboot.
BTW your Test scenario2 seems to work as expected. RX equals TX. What is missing?
hi @ShaneCCC .
We have tried working on it by doing the required changes in the p3448-0002*.dtb to enable the spi for the emmc module, we have loaded the following dtb file in the boot folder and rebooted it. Yet after rebooting the module we the spi pins haven’t been enabled. Can you please help with this.