Spi device file is not present in /dev directory

Hello,
i am using Aster Carrier Board with with TDX Wayland with XWayland Upstream 6.7.0-devel-20240710125113+build.0 (kirkstone) Colibri-iMX6ULL-eMMC_Reference-Multimedia-Image-upstream tdx-reference-multimedia-image (OS)

I want to use SPI but SPI device file is not present in /dev directory. what changes i have to made in DTSI file. i got the reference in another question but that reference link is dead.

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:


Hello,

To address the issue of the SPI device file not being present in the /dev directory on your Aster Carrier Board with the Colibri iMX6ULL module, you will need to ensure that the SPI interface is correctly enabled in the Device Tree Source file (DTS) for your specific setup. Here’s a step-by-step guide to help you make the necessary changes in the DTSI file:

  1. Locate the Device Tree Source (DTS) file: For the Colibri iMX6ULL on the Aster Carrier Board, the relevant DTS files are typically named with a pattern similar to imx6ull-colibri-aster.dts. This file includes configurations specific to the Colibri iMX6ULL module and the Aster Carrier Board.

  2. Enable the SPI Interface: In the DTS file, locate the section that defines the SPI interface. It might be disabled by default (look for a status property set to “disabled”). To enable it, you need to change the status property to “okay”. For example:

    &ecspi1 {
        status = "okay";
        pinctrl-names = "default";
        pinctrl-0 = <&pinctrl_ecspi>;
        cs-gpios = <&gpio5 9 GPIO_ACTIVE_LOW>;
        /* Additional SPI configuration here */
    };
    

    Ensure that the &ecspi1 node matches the SPI controller you intend to use, and the pinctrl-0, cs-gpios, and other properties are correctly set according to your hardware setup.

  3. Configure the Chip Select (CS) Pin: The cs-gpios property defines the GPIO pin used as the chip select for the SPI device. Make sure this is correctly set to match your hardware connection.

  4. Add SPI Device Node: If you are connecting a specific SPI device, you may also need to add a node for that device under the SPI controller node, specifying the device’s compatible string, reg (chip select line), and any device-specific properties. For example:

    &ecspi1 {
        my_spi_device@0 {
            compatible = "my,spi-device";
            reg = <0>; /* Chip select line 0 */
            /* Additional device-specific properties */
        };
    };
    
  5. Recompile the Device Tree Blob (DTB): After making the necessary changes, recompile the DTB from the

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

SPI (Linux) | Toradex Developer Center.

Hi @Prial,

You need to enable SPI in the device tree. Since you are using the module with eMMC, you can use overlay to do the device tree modifications.
There are already prebuilt overlays present to enable spi(colibri-imx6ull_spidev_overlay.dtbo).
Please apply the spi overlay and test.