I am trying to list the SPI devices by using the “ls -l /dev/colibri-spi*” command, but here I am getting “ls: cannot access ‘/dev/colibri-spi*’: No such file or directory”.
Are there any changes that could be made in the device tree?
Hi, I’m the Toradex AI Assistant. I’m in early beta, and I would appreciate your feedback.
The Toradex Support team will follow up with you shortly!
Did you like my answer?
Handshake,
If you’re encountering an issue where the SPI devices are not listed under /dev with the expected naming convention (e.g., /dev/colibri-spi*), it’s likely due to the SPI interface not being enabled or properly configured in the device tree. For the Colibri iMX6ULL module on an Iris Carrier Board, you will need to ensure that the SPI interface is enabled and correctly set up in the device tree.
Here are the steps to address this issue:
Enable the SPI Interface in the Device Tree: The device tree (DT) controls which peripherals are enabled and their configurations. For the Colibri iMX6ULL, you will need to modify the device tree source (DTS) file specific to your module and carrier board.
Locate the Correct Device Tree File: For the Colibri iMX6ULL, the device tree files are typically located in the arch/arm/boot/dts/ directory of the Linux kernel source. You will be looking for a file that corresponds to the Colibri iMX6ULL and possibly the Iris Carrier Board, often named with a prefix like imx6ull-colibri and may include references to the Iris board.
Modify the Device Tree to Enable SPI:
Find the SPI node in the device tree. It might be named something like ecspi followed by a number, indicating the SPI controller instance.
Ensure that the SPI node is not disabled. A disabled node would have the status property set to "disabled". To enable it, change this to "okay".
Configure the correct pin multiplexing for SPI signals. This might involve setting up the correct pinctrl-0 property to reference the pin configuration that enables SPI pins.
Ensure that the chip select (CS) lines are correctly defined. This might involve setting up GPIOs to act as chip select lines if the SPI controller does not handle them natively or if additional CS lines are needed.
Recompile and Deploy the Device Tree Blob (DTB): After making the necessary changes, recompile the device tree source into a binary blob (DTB) and deploy it to your device. The exact steps will depend on your build system, but it typically involves using the dtc (Device Tree Compiler) tool and copying the resulting DTB file to the boot partition of your device.
Verify the Changes: After rebooting your device with
Please, also check if these links can help you solve your problem:
Thanks for sending logs, unfortunately the git diff you shared is incorrect, please share git diff output from kernel source code directory, this will capture the device tree modification you have done. Before sending us please verify that all the changes you can read.
Thanks for sharing diff output. I can see you have not disabled mcp node. Please test with below patch and let us know. colibri_imx6ull-spidev (1.5 KB)
I will also suggest before posting, please do give a search for similar query like below is one similar query which may provide additional information.