I then convert the .dts-file back to /boot/tegra210-jetson-cv-base-p2597-2180-a00.dtb, rebooted, and connected the SPI_MOSI and SPI1_MISO pins (19 and 21 on the J21 header, the 10th and 11th pin on the row closest to the edge of the dev board, counting from the one closest to the J17 header, right?).
But I do not get anything showing up in /dev. What am I doing wrong?
Unless you’ve optionally switched to fastboot you don’t flash kernels, they’re just a file copy to “/boot” (take a look at “/boot/extlinux/extlinux.conf”), and modules to the relevant “/lib/modules” location. Starting in R24.2 an initrd is also used. In order to verify if your kernel made it in or not I’d advise adjust the CONFIG_LOCALVERSION and check if “uname -r” reflects that customization (e.g., set to “-custom1”).
I’m going to be trying to get SPI working myself shortly.
I noticed that you changed the wrong device tree file (at least if you’re trying to change it on the TX1). The TX1 only loads one of the .dtb files at the start, you can delete the others with no effect. From dmesg:
If you want the changes made in tegra210-jetson-cv-base-p2597-2180-a00.dtb to take effect you’ll need to recompile the dtbs (make dtbs) so that your changes are written in to arch/arm64/boot/dts/tegra210-jetson-tx1-p2597-2180-a01-devkit.dtb
Note that the DTB actually used is named in the “/boot/extlinux/extlinux.conf” file via the FDT key/value pair (the same file where key/value pairs give the kernel file location, initrd location, and kernel parameters upon passing from boot loader to kernel).
It seems I was too excited about it merely showing up in /dev/spidev0.0. When I try to access it (using spidev_test -D /dev/spidev0.0) I get “can’t set spi mode: Inappropriate ioctl for device. Aborted.”
EDIT: I used the default spidev_test.c file. I tried the one written for RPi and it works now!
I am also finding the method to enable SPI, and studying the article you create which names “Full procedure for enabling SPI on the TX1?”.
May I ask one question?
How to set CONFIG_LOCALVERSION, where could I find this parameter?
CONFIG_LOCALVERSION is part of the kernel source code. Every configuration in “make menuconfig” (or other ways of editing config) has an entry like that. You could edit the generated “.config” file directly, and put the text in the quoted value half of the key/value pair.
If you use something like “make menuconfig” or “make nconfig”, then go into “General setup —>”, note that usually the second line of that next menu is “() Local version - append to kernel release (NEW)”. That is the normal way of setting local version.
You also use “spi0_0” as your example, which would match the alias, but does not match the above quote. Would you mind clarifying? Is SPI1 actually at 7000d400, or is it at 7000d600 like aliases shows?