I have agx xavier on hand, it’s official kit,.
run ubuntu 18.04,
kernel version 4.9.140-tegra,
use SDKmanager 4.3.
There is already one /dev/spidev0.0 on system, and I configure with this cmd ‘sudo /opt/nvidia/jetson-io/jetson-io.py’, now the /dev/spidev0.0 working fine.
Now I want add new spidev on system, like /dev/spidev0.1, use chip select signals for control,no relevant information found,what should I do?
hi, I I have gotten /dev/spidev0.1 on system. I tested it with driver/spi/spidev_test, and then grabbed SCK CS0 CS1 with an oscilloscope. I checked the information and found that the SPI is configured with hardware cs. I want to change it to GPIO contorl (software) cs. What should I do?
Thank you for your quick reply. I already have the latest kernel source code, but I don’t know which device tree to modify and which line to modify to configure the GPIO control (software) cs.
and Need to be shielded “nvidia, enable-hw-based-cs;” ?
I have no experience in this area.
These pins is native SPI cs pin don’t need to add cs-gpios, just configure it as SPI function.
You can try the jetson-io and confirm with sudo “cat /sys/kernel/debug/tegra_pinctrl_reg | grep -i spi” command to confirm the REG changed after save and reboot otherwise need to configure the cfg file as the reference link.
You don’t need add “cs-gpios = <>” for these cs pins. The cs-gpios means you want to use any others gpio pin as cs. These two pin already configure as cs already.
How to change this part of cs hardware control to software GPIO control to achieve the purpose I want?
just delete “nvidia,enable-hw-based-cs;” ?
or “nvidia,disbale-hw-based-cs;” ?
or …
Don’t modify the spi-tegra114.c to remove the “nvidia,enable-hw-based-cs” you should remove it from the dts.
If you ever run the jetson_io have a check /boot/extlinux/extlinux.conf to update the dtb by replace it at /boot/
It could be like below.
I tried the method you mentioned and it was successful, dmesg not output enable-hw.
But!!! I still need to use SPI, and I will continue to execute jetson_io.py to check SPI, and then restart /boot/dtb will update to user-custom.dtb…