Status of SPI support

What’s the status of the SPI interfaces for the early access iMX8 boards?
If it’s currently not supported at all, are there plans to add support before the official product launch?

What’s the status of the SPI interfaces for the early access iMX8 boards?

Untested resp. tested to not work.

If it’s currently not supported at all, are there plans to add support before the official product launch?

No plans yet at least based on the current beta 2. We may add support in a future BSP and/or module version (based on a later i.MX 8 die/silicon version).

But to clarify, will it definitely be available when the iMX8QM is officially launched next year?

Of course.

Hi

In the meantime you could use the attach device-tree…
It is built with the two contained patches applied on top of a1a1244b1de00274586d1ea16048f8469966ff30.
I also build the tools/spi/spidev_test and added it.

Apalis SPI1 is represented through /dev/spidev32766.0, SPI2 through /dev/spidev32765.0.

Max

spi-apalis-imx8

Hi Max, Thanks for the updated device tree, that got the SPI bus into a semi-working state.

I understand the bus isn’t explicitly supported, but I encountered some issues and thought you guys would at least be interested in getting some feedback. It seems that the SCLK can skip half a clock cycle on word boundaries in the middle of a SPI transaction, this has the effect of offsetting data by one bit on subsequent words. The skip happens on every word boundary. This doesn’t look like a proper SPI transaction, could it be an improperly configured driver? The device-tree entries seem fine to me.

Hi

For me it worked when shorting MOSI/MISO and when connecting a NOR Flash.
With your comment I now connected an oscilloscope and I can see the very short low time of the SCLK signal. So it looks like the loopback and the NOR Flash are fast enough to cope with this short pulse.

The delay between words is a configuration setting which NXP provided a patch to wait a full SCLK period between words. If you want to try this with the current kernel you could cherry-pick the relevant commit and rebuild the kernel.

git fetch
git cherry-pick -x c5599ce52b52b2c8bd994f36a45bff0bea3fddb9

Thanks for bringing the issue to our attention.

Max

Hi Max,
Thanks for informing me of that commit. The SPI interface now behaves as expected.