Spi drivers for Colibri imx7 dual

We would like to get an A7 processor on our colibri imx7 board to communicate over SPI. We have a linux build that works. During start up, it does mention at three points “spi_imx30840000.ecspi: probed” and we found a kernal source code file, spi-imx.c that appears to use the same spi registers described in the imx7 manual - however, this file only lists chip versions going only as high as imx6. Could there be a newer version of this file we should be using instead? We also don’t see any example code that we could use to fill in the spi interface definition structures that would be modified to tell the driver how to talk to our specific

spi-imx is the driver for SPI on iMX7. See the device tree binding match here and here.

We also don’t see any example code that we could use to fill in the spi interface definition structures that would be modified to tell the driver how to talk to our specific

What example code are you referring to exactly? What do you mean by “code that we could use to fill in the spi interface definition structures that would be modified to tell the driver how to talk to our specific” ?

To use SPI on Linux, see the spidev interface and spidev_test code.

Does it mean that i need to add a new entry for fsl,imx7d-ecspi in spi_imx_dt_ids table?
And if i am using imx7s, should i use fsl,imx7s-ecspi in ecspi4 ?

There is no need to alter the driver, the i.MX 7 device tree lists the compatible older devices in its device tree too. Hence the driver will be used for the i.MX 7 version of ECSPI too.

SPI works with our default device tree, however, by default it tries to find the MCP2515 as slave. You can enable spidev if you want generic user space access.

As I understand from the spidev_test code, in Linux the SPI interface can be accessed only via an application written in C/C++. Is it possible to access the SPI from an application written in a different language, e.g. Python (for iMX6ULL and iMX7)?

Hi @Cristian

Thanks for asking a new question. Your question will be answered in this thread.

Best regards,
Jaski