How to Enable SPI on AML-S905X-CC Le Potato

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
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
sudo reboot

Device trees are not reset to default until the machine reboots. Do not try to merge new overlays before rebooting.

1 Like

Pretty much followed the instructions above to enable the SPI interface for a Max7219 Display.

I did try the overlay on Armbian but couldn’t make it work but no problem on Raspbian.

Smashing it on the Le Potato - YouTube

Great Library for the Max7219 : -

rm-hull/luma.led_matrix: Python module to drive LED Matrices & 7-segment displays (MAX7219) and RGB NeoPixels (WS2812 / APA102) (

1 Like

Worked great. I used this to get an accelerometer configured with Klipper on my 3d printer.


I’m trying to do this and I’m having such a hard time doing it. I’d be very grateful if you were able to assist or walk me through what you did.

1 Like