SPI for Linux Support on Rock Pi X

SPI port is supported on Linux, are there examples?


I’ve been trying to get SPI working as well. However I’m unable to get /dev/spidev0.0 or similar devices to appear. I’ve tried so far with Ubuntu 20.04 LTS, Debian 10 and Debian 10 with the custom kernel which @tjcs90 built (see ROCK Pi X - Custom/tuned Linux kernel).

Has anybody got SPI working so far?

According to the docs, spi is not exposed to userland.
I have not tried it ( Anyway I don’t have the means to test the spi ) but perhaps this would help, but don’t blame me if you brick the board or have to re-install everything… :slight_smile:

1 - Make sure SPI is enabled in the kernel, I think ubuntu is already enabled (I removed ubuntu in my experiments)

root@rockpix:~# lsmod|grep spi
spi_pxa2xx_platform    32768  0
root@rockpix:~# find /sys -name "*spi*"

2 - Follow these instructions


3 - Report your results

Thanks for your help. I executed the steps in the link you mentioned and I got spidev1.0 and spidev1.1, but I wasn’t able to find any signals from the IO ports using my Rigol DS1054Z digital oscilloscope.

To be more precise, I tried to find clock, chip select and MOSI signals from both SPI2_* and ISH_SPI_* pins, but I wasn’t able to find any activity what so ever. I’m not entirely sure how the /dev/spidev* are supposed to work so I just assumed I could write to the device and see some activity on the pins.

I did manage to toggle GPIO pin 7 and 16 on and off and was also able to see UART transfer. My end goal is to control an Adafruit Mini piTFT display, which plugs directly into the Raspberry Pi compatible IO bus. (https://www.adafruit.com/product/4393)