Trouble enabling SPI1 hardware with debian 4.4.9

Background Info:

  1. We are using BeagleBone Black to power our robot, using it since November.

  2. We use ADC, I2C1, I2C2, SPI0, 5 PWMs, and almost every available GPIO. We have all these working using overlays, or config-pin, whichever is needed. All is good.

  3. Up until now I have not had to alter the default kernel or uEnv.txt.*

  4. Upgraded to 4.4.9 a month or two ago. I am up-to-date with all “apt-get update” and “apt-get upgrade”.

  5. /boot/uEnv.txt is attached.

  6. root@beaglebone:/home/debian# uname -a

Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux

The problem: Now we need SPI1 (yes, we need two SPI busses). I want to use all the IOs listed above (see #2).

I think the best way is to use the default universal cape that comes with 4.4.9 (see above where I use it for all my IOs with little effort), but enable SPI1 instead of MCASP.

What I’ve tried:

  • I’ve seen that folks say that the only way to add SPIDEV1 overlay is via /etc/rc.local (echo ‘BB-SPIDEV1’ > /sys/devices/platform/bone_capemgr/slots). However, that then wipes out the availability of I2C, PWMs, etc.
  • I’ve also tried adding BB-SPIDEV1 via uEnv.txt but that didn’t work at all.

I’ve spent a few days trying various combination and can’t find it. Looked at source code too to try and see what is up, but didn’t figure it out yet.

I guess my idea of the “best way” is heading down the wrong path.


  • Do I have to make a whole new universal custom cape?
  • Follow on question: Anybody have a way to turn on everything I use (see #2 above) and SPIDEV1 too?

uEnv.txt (1.18 KB)

Made a mistake in original post. Should read:

What I’ve tried:

  • I’ve tried adding BB-SPIDEV1 via uEnv.txt. SPI1 now works. However, that wipes out the availability of I2C, PWMs, etc which I don’t know how to repair???

  • I’ve seen that folks say that the only way to add SPIDEV1 overlay is via /etc/rc.local (echo ‘BB-SPIDEV1’ > /sys/devices/platform/bone_capemgr/slots). But that didn’t work at all for me (SPI1 not enabled AND it wipes out availability of I2C, PWMs etc).

You’ll need to put all your pin mux into one file. I’d probably test with universal io, to see if you can get it working that way first, and then perhaps you’ll have to put that, or all pin mux into the board file.

I have tried these steps:

  • altering cape-universaln-00A0.dts by uncommenting every spi2 lines in there (I called it universalbbb-00A0.dts). Created new dtbo. Copied it to /lib/firmware
  • Changed uEnv.txt to “cmdline=coherent_pool=1M quiet cape_universal=disable” Trying to load universalbbb in uEnv.txt DOES NOT work.
  • root@beaglebone:/# echo ‘universalbbb’ > /sys/devices/platform/bone_capemgr/slots
  • I see in dmesg that above fails to config debian pins 100, 101, 103

I tried some other things after above steps to see if I can fix it at runtime:

  • config-pin manually to spi:

root@beaglebone:/# config-pin P9.29 spi
bash: /sys/devices/platform/ocp/ocpP9_29_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp

  • add cape overlay BB-SPIDEV1

root@beaglebone:/# echo ‘BB-SPIDEV1’ > /sys/devices/platform/bone_capemgr/slots
bash: echo: write error: File exists

I’m going to have to give up for now as I spent whole day yesterday on this. Need to move on to other stuff but will return.

Was there any luck on getting this to work?

Hi Danny,

No, I did not get spi2 working (SPI1_XXXX pins on P9 header) with all the other pins enabled. I gave up for now. Wasn’t sure what to try next… Maybe I don’t understand William Hermans’ instructions.

Not sure if this is related, but I had problems getting SPI1 working as well. When I switched to SPI0 things started working.

There’s a thread about it here: