Colibri iMX6ULL - SPI

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?
image.png

  • Colibri iMX6ull 512MB
  • Iris Carrier Board V2.0
  • Linux OS

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?

:+1: :-1:


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:

  1. 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.

  2. 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.

  3. 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.
  4. 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.

  5. Verify the Changes: After rebooting your device with

Please, also check if these links can help you solve your problem:

SPI (Linux) | Toradex Developer Center.

see here, i already made changes


still i can’t find.

Hi @Manohara,

Disable mcp2515 node and check.

Best regards
Ritesh Kumar

Dear Ritesh,

Even after disabling mcp2515 I am not able to list the devices.I attached a screenshot of that one.

image.png

Best regards
Manohara

Phone - +918904013514

Hi @Manohara,

Please share complete changes you made to device tree using git diff output, dmesg logs and output of ls /dev to further check

Best regards
Ritesh Kumar

Dear Ritesh,

Please find the attachments of git diff output, dmesg logs and ls /dev.

Best regards
Manohara

Phone - +918904013514

dmesg logs (18.5 KB)

ls dev (1.82 KB)

git diff output (6.92 KB)

Hi Ritesh,

Waiting for your reply.

Best regards
Manohara

Phone - +918904013514

Hi @Manohara,

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.

Best regards
Ritesh Kumar

Dear Ritesh,

Sorry for the inconvenience, here is the correct git diff output of source code.

Best regards
Manohara

Phone - +918904013514

git diff output (1.9 KB)

Dear Ritesh,

Waiting for your reply.

Best regards
Manohara
Phone - +918904013514

Hi @Manohara,

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.

Best regards
Ritesh Kumar

Dear Ritesh,

Here i had the changes,
PFA of changes images,
git diff output of source code -

make menuconfig -



while generating the dtb file i need to get a new Zimage file, but I am not getting a new Zimage. It’s showing only old Zimage.

if possible please take a remote session for 10 minutes. I can get a solution.

Best regards
Manohara

Phone - +918904013514