Missing SPI dev

Hello , I have compiled the latest version of BSP 5.6.0 (reference image) for two modules (TK1, Imx6) and the SPI does not appear on any of them.
I am testing it without any change.
I appreciate your support, have a nice day.

root@colibri-imx6-04869381:~# cat /etc/issue
TDX Wayland with XWayland 5.6.0-devel-20220323175405+build.0 (dunfell) \n \l
Colibri-iMX6_Reference-Multimedia-Image
root@colibri-imx6-04869381:~# ls /dev/spi*
ls: cannot access '/dev/spi*': No such file or directory
root@colibri-imx6-04869381:~# ls -l /dev/colibri-spi*
ls: cannot access '/dev/colibri-spi*': No such file or directory

Best regards,

Carlos H.

Hi @carlossht,

In our Colibri reference images the standard SPI is used for the MCP2515 CAN controller if the device tree is set for the Colibri Evaluation board V3.x, which is the default one. This explains the missing SPI interface in /dev.I assume that you’re using the Iris carrier board, given that you tagged it in your topic. In this case you should change the device tree that corresponds to the Iris carrier board. To do so:

  • In your device, check which device tree is currently loaded by running as root:
    fw_printenv fdtfile
    It should output something like fdtfile=imx6dl-colibri-eval-v3.dtb or similar if using a different model.

  • Run:
    ls /boot
    to list the available device trees; they are files ending with .dtb . You should find one corresponding to the Iris board you’re using, e.g. imx6dl-colibri-iris-v2.dtb.

  • Apply it by running:
    fw_setenv fdtfile <dtb file>
    e.g. fw_setenv fdtfile imx6dl-colibri-iris-v2.dtb

  • Check if it changed by executing
    fw_printenv fdtfile
    again; it should output the device tree that you want.

  • Reboot your device. Login and the SPI interface should be in /dev :
    ls -l /dev/colibri-spi* lrwxrwxrwx 1 root root 9 May 16 13:50 /dev/colibri-spi-cs0 -> spidev3.0

Give this a try and let me know how it works out for you.

Best Regards,
Jeremias

Hello, thank you very much, I will do that.
I also have the Apalis TK1 with Ixora Carrier board and it doesn’t have the SPI activated either, is it the same way to activate it?

I also have the Apalis TK1 with Ixora Carrier board and it doesn’t have the SPI activated either, is it the same way to activate it?

This depends what version of the software the TK1 is running. But all Apalis modules should have at least some SPI interfaces enabled by default, so this seem strange.

Best Regards,
Jeremias