Enabling 5 SPI Channels

Active today
Viewed 38 times

I’m trying to enable all the SPI Ports on my raspberry pi 4 (as mentioned in the datasheet).

I already enable the SPI interfaces over the raspi-config tool but that only gives me spi0.0 and spi0.1 when i check /sys/bus/spi/devices.

I found this post where someone edited the config.txt to get the SPI’s (somewhat) enabled. Is this the best way to do this? Or is there a way of doing this using C or Python? Is it it even possible to run 5 SPI in parallel?

Is there better documentation than the short datasheet?

I’m running raspbian with an RT Kernel Patch.

Update: I was able to spi0.0 spi0.1 spi1.0 spi2.0 spi3.0 by putting in /boot/config.txt


however spi-4 doesn’t work, it’s just not enabled

 New contributor
  • boot.txt? That’s not a Raspbian file. What OS do you run? – Dirk yesterday
  • I stand corrected, it says config.txt, sorry. – Julian yesterday
  • Hi @Julian, Welcome and nice to meet you. Yes, you can setup 5 SPI buses: 0.0, 0.1, 1.0, 1,1, 1,2: Your might like to read my lab report for more details: penzu.com/public/926a24f6. – tlfong01 yesterday    
  • My apologies for not reading the question carefully. Mine is only 2 SPI buses. – tlfong01 yesterday   
  • I am sorry that I mixed up five I2C buses with five SPI buses. Some time ago I read the following discussion about multiple SPI buses, but I have not tried. My apologies again: Raspberry Pi 4, enable multiple SPI busses raspberrypi.org/forums/viewtopic.php?t=246792. – tlfong01 yesterday   
  • @tlfong01 thats the link I have in the question 🙂 – Julian yesterday
  • Ah, same link, my apologies again. 🙂 – tlfong01 yesterday   
  • Just now I inserted the alt function pin chart to my penzu file above. It is annoying to see there are so many conflicting alt functions. 😦 – tlfong01 yesterday   


I was able to enable 4 SPI as according to the Forum Post. Enabling SPI0 or SPI1 together with 3-6 doesn’t work. Heres my complete /boot/config.txt


 New contributor

Categories: Uncategorized

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google photo

You are commenting using your Google account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s

This site uses Akismet to reduce spam. Learn how your comment data is processed.

%d bloggers like this: