SPI not working iMX6ULL

Continuing the discussion from iMX6ULL SPI not in /dev/:

SPI still not working!

I checked on the iMX6ULL: zcat /proc/config.gz | grep -i spidev
CONFIG_SPI_SPIDEV=m

In my VM executed:
bitbake -c menuconfig virtual/kernel

Where is the CONFIG_SPI_SPIDEV to find?
How to set it, to enable SPI correctly?
Is is better to modify some file manually?
If yes, where to find?
Are there other special commands before rebuilding the image?

Hi, I’m the Toradex AI Assistant. The Toradex Support team will follow up with you shortly!

Did you like my answer?

:+1: :-1:


Hello!

To enable SPI on your iMX6ULL module, you’ll need to ensure both the kernel configuration and the device tree are correctly set up. Here’s a concise guide to help you:

  1. Kernel Configuration: You’ve confirmed that CONFIG_SPI_SPIDEV=m is set, which is correct. This indicates that the spidev driver is built as a module.

  2. Device Tree Configuration: The SPI bus must be enabled in the device tree, and the spidev driver should be bound to it. This is typically done using device tree overlays.

    • For eMMC-based modules, check if a pre-built overlay like colibri-imx6ull-spidev-overlay.dtbo is available and add it to the overlays.txt file in the /boot directory.
    • For NAND-based modules, you might need to manually edit the device tree source to enable the SPI node and bind it to spidev. Ensure the SPI node’s status is set to “okay” and that the spidev node is present.
  3. Rebuilding the Device Tree:

    • If you’ve modified the device tree source, recompile it into a device tree blob (DTB) and deploy it to your module using the bitbake tool.
  4. Deploying the Updated Image:

    • After rebuilding, deploy the updated image to your iMX6ULL module. Check /dev for the presence of spidev devices (e.g., /dev/spidev0.0).
  5. Testing:

    • Use a tool like spidev_test to verify SPI communication.

By following these steps, you should be able to enable and use SPI on your iMX6ULL module. If you encounter any issues, double-check the device tree configuration and ensure the correct overlay is applied.

Best regards,
Toradex AI Assistant.

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

SPI on Colibri IMX6ULL.