Mbond14
Posts: 4
Joined: Mon Jul 22, 2019 3:34 am

Raspberry Pi 4, enable multiple SPI busses.

Mon Jul 22, 2019 3:51 am

Hi,

I've got a Raspberry PI 4 1gb and I am trying to enable 4 SPI buses. I've inserted my attempts to enable them in the config.txt file below. After rebooting and viewing the enabled SPI devices in the /dev/ folder only spi0.0 spi0.1 spi3.0 spi4.0 spi5.0 are enabled however spi4.0 and spi5.0 dont work. I can only think this is because spi4.0 shares its clock pin with spi0 CE pin, and spi5.0 shares its clock and mosi with TX and RX pins. Ive tried disabling them but this also doesnt work. I've also attached the output from the vcdbg log as suggested by the README for debugging device tree issues.

Code: Select all

dtoverlay=spi1-1cs
dtparam=cs0_pin=17
#dtparam=cs1_pin=17
dtparam=cs0_spidev=off
#dtparam=cs1_spidev=on
dtoverlay=

dtoverlay=spi3-1cs
dtparam=cs0_pin=27
#dtparam=cs1_pin=27
dtparam=cs0_spidev=on
#dtparam=cs1_spidev=off
dtoverlay=

dtoverlay=spi4-1cs
dtparam=cs0_pin=4
#dtparam=cs1_pin=25
dtparam=cs0_spidev=on
#dtparam=cs1_spidev=off
dtoverlay=

dtoverlay=spi5-1cs
dtparam=cs0_pin=32
#dtparam=cs1_pin=26
dtparam=cs0_spidev=on
#dtparam=cs1_spidev=on
dtoverlay=


dtdebug=on

dtoverlay=spi6-1cs
dtparam=cs0_pin=26
#dtparam=cs1_pin=25
dtparam=cs0_spidev=on
#dtparam=cs1_spidev=on
dtoverlay=


003861.782: dtparam: i2c_arm=off
003892.680: dtparam: spi=on
003921.147: dtparam: uart0=off
003949.143: dtparam: audio=on
003984.809: brfs: File read: 2610 bytes
004002.635: brfs: File read: /mfs/sd/overlays/vc4-fkms-v3d.dtbo
004058.564: Loaded overlay 'vc4-fkms-v3d'
004164.395: brfs: File read: 1255 bytes
004179.177: brfs: File read: /mfs/sd/overlays/spi1-1cs.dtbo
004209.892: Loaded overlay 'spi1-1cs'
004209.967: dtparam: cs0_pin=17
004210.832: dtparam: cs0_spidev=off
004378.755: brfs: File read: 1523 bytes
004393.424: brfs: File read: /mfs/sd/overlays/spi3-1cs.dtbo
004429.280: Loaded overlay 'spi3-1cs'
004429.349: dtparam: cs0_pin=27
004430.005: dtparam: cs0_spidev=on
004521.787: brfs: File read: 1289 bytes
004536.449: brfs: File read: /mfs/sd/overlays/spi4-1cs.dtbo
004572.742: Loaded overlay 'spi4-1cs'
004572.811: dtparam: cs0_pin=4
004573.463: dtparam: cs0_spidev=on
004665.420: brfs: File read: 1289 bytes
004680.158: brfs: File read: /mfs/sd/overlays/spi5-1cs.dtbo
004716.846: Loaded overlay 'spi5-1cs'
004716.922: dtparam: cs0_pin=32
004717.568: dtparam: cs0_spidev=on
004809.522: brfs: File read: 1289 bytes
004824.687: brfs: File read: /mfs/sd/overlays/spi6-1cs.dtbo
004861.817: Loaded overlay 'spi6-1cs'
004861.894: dtparam: cs0_pin=26
004862.540: dtparam: cs0_spidev=on


Any help would be greatly appreciated, Thanks.

Return to “Troubleshooting”