Colbri T20 spi accessibility with spidev_test

Hello dear Toradex-Dev-Team,

I am currently facing a situation where I use a gcc compiled binary called “spidev_test -D /dev/spi3.0 -A”
to just evaluate the output to test the spi functionality.

When I apply the above spidev_test I encounter the following error:

can’t set spi mode: Inappropriate ioctl for device

The variable that I have assigned the output of “chk=$(spidev_test -D /dev/spi3.0 -A)” contains an empty string.

Searching for a solution on that point, I have found a lot of information around the topic spi online
which gives me the feeling to got lost in the variety of probabilities.

Hence I would ask you for help to the right direction where to start looking at?

Previously this test step which was inplemented in the testsystem worked with earlier programmed T20 modules.
Since the modules on side are borken now, I have the task to bring the testsystem to run again.
However there is no documentation on how my previous colleagues who has left the company have approached the configuration (in the device tree, kernel etc.) if any.

Colibri T20 512MB V1.2A
Colibri Carrier Board
Linux BSP 2.8.7

Hi Armin

I am looking into it. :+1:

Best Regards
Kevin

1 Like

Hi Kevin,

I will wait for your answer :+1:t3:

Thank a lot
Armin

Hi @CoQuarksde ,

would it be possible that you send the binary you used ?

I will try to reproduce the issue.

Best Regards
Kevin

Hi @CoQuarksde,

sure, the binary spidev_test attached:
spidev_test (13.5 KB) :four_leaf_clover:

Best Regards & Thank you
Armin

Hi @CoQuarksde,

Thank you for the binary. In the meantime I have some information for you.

We’ve seen this behaviour in the past if users used the third SPI interface instead of the default one. Would it be possible for you to use another SPI interface?

We created an internal issue for the behaviour with the third SPI interface.

Best Regards
Kevin

Hi @kevin.tx,

thank you for your information regarding the SPI how they are available in the current image build.

As you mention with the default configuration of the SODIMM pins (86, 88, 90, 92) of the Colibri T20 based on the Toradex Colibri Compatibility Guide & the Colibri Evaluation Boars V3.2A Schematics (Page 19 >> Section B 1-2) these pins seem to be designed (Software / device tree) as CAN.

Now the Carrier Board eDM-CB-Colibri which Data Modul provides to be applied with the Toradex Colibri T20 modules together has the definition respectively specification of the mentioned pins to act as an SPI3 interface.

SODIMM Connector X16
Pin 86 → SSPFRM
Pin 88 → SSPSCLK
Pin 90 → SSPRXD
Pin 92 → SSPTXD

Now on my search to find the entries for these pins within the device tree on the installed Embedded Linux Colibri-T20_LXDE-Image_2.8b7.-20200610, I was not successful to detect any config files nor being sure where to embedd an own customed overlay for the SPI3 purpose?

Or some hints where I could approach changes within the running BSP 2.8b7 to declare sysfs to load a the SPI driver for the needed SPI3 interface?

I am not familiar yet in complete with the Toradex image to setup and bake a customized manufacturer image for the test system Data Modul has running in the field which is blocked at the moment because of this issue right now.

Therefore my very first request to Toradex would be to help me / Data Modul with an Embedded Linux Image (maybe 2.8.7.XXX) where the SPI3 is exposed at the listed pins.

May I ask you for your support in this regard, probably the internal issue that you have created aims exactly in this direction?

This is very important for Data Modul to flash the T20 modules to ensure that the test system runs again.

Many many Thanks in advance
Armin