SPI port is supported on Linux, are there examples?
BR
SPI port is supported on Linux, are there examples?
BR
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…
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*"
/sys/class/spi_master
/sys/class/spi_master/spi2
/sys/class/spi_master/spi3
/sys/class/spi_master/spi1
/sys/devices/pci0000:00/0000:00:1f.0/intel-spi
/sys/devices/pci0000:00/8086228E:02/spi_master
/sys/devices/pci0000:00/8086228E:02/spi_master/spi3
/sys/devices/pci0000:00/8086228E:02/spi_master/spi3/statistics/spi_async
/sys/devices/pci0000:00/8086228E:02/spi_master/spi3/statistics/spi_sync_immediate
/sys/devices/pci0000:00/8086228E:02/spi_master/spi3/statistics/spi_sync
/sys/devices/pci0000:00/8086228E:00/spi_master
/sys/devices/pci0000:00/8086228E:00/spi_master/spi1
/sys/devices/pci0000:00/8086228E:00/spi_master/spi1/statistics/spi_async
/sys/devices/pci0000:00/8086228E:00/spi_master/spi1/statistics/spi_sync_immediate
/sys/devices/pci0000:00/8086228E:00/spi_master/spi1/statistics/spi_sync
/sys/devices/pci0000:00/8086228E:01/spi_master
/sys/devices/pci0000:00/8086228E:01/spi_master/spi2
/sys/devices/pci0000:00/8086228E:01/spi_master/spi2/statistics/spi_async
/sys/devices/pci0000:00/8086228E:01/spi_master/spi2/statistics/spi_sync_immediate
/sys/devices/pci0000:00/8086228E:01/spi_master/spi2/statistics/spi_sync
/sys/bus/platform/devices/intel-spi
/sys/bus/platform/drivers/pxa2xx-spi
/sys/bus/spi
/sys/module/spi_pxa2xx_platform
/sys/module/spi_pxa2xx_platform/drivers/platform:pxa2xx-spi
2 - Follow these instructions
https://wiki.up-community.org/Pinout_UP2#SPI_Ports
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)