Le Potato supports hardware SPI on the 40-pin GPIO header with the same pinout as Raspberry Pi 2/3/4 Model B/B+ boards.
- MOSI on pin 19
- MISO on pin 21
- SCLK on pin 23
- CE0 on pin 24
- CE1 on pin 26
They can be used directly with hardware drivers or exposed as /dev/spidev0.0 and /dev/spidev0.1.
If you only have 1 SPI slave device, you only need CE0 on pin 24. To activate /dev/spidev0.0, run:
sudo ldto enable spicc spicc-spidev
If you have two SPI slave devices, you need both CE0 on pin 24 and CE1 on pin 26. To activate /dev/spidev0.0 and /dev/spidev0.1, run:
sudo ldto enable spicc-cs1 spicc-cs1-spidev
After you have tested your device(s) and confirmed that they are working, you can enable it permanently via:
sudo ldto merge spicc spicc-spidev #or sudo ldto merge spicc-cs1 spicc-cs1-spidev
Reboot and it should appear those SPI devices should appear without having to run enable.
If you no longer need SPI devices after merging them, you can reset the system to default by:
sudo ldto reset