Trouble using config-pin to config P9.28 pin as spi or gpio


I’m trying to use cdsteinkuehler’s beaglebone-universal-io to config P9_28-31 as spi interface. After loading cape-universal overlay first, I got the “P9_28 pinmux file not found!” message when I configure P9_28 pin

You'll need to load cape-universala for P9.28 to be available.

Here is my /boot/uEnv.txt:

cmdline=coherent_pool=1M quiet cape_universal=enable

I am able to set P9.28 to spi:

root@beaglebone:~# config-pin -l P9.28 spi
default gpio gpio_pu gpio_pd pwm spi pwm2 pruout pruin
root@beaglebone:~# config-pin P9.28 spi
root@beaglebone:~# config-pin -q P9.28
P9_28 Mode: spi


Thanks, Drew

I’m able to set P9.28 after follow your uEnv.txt content.
But my screen also not working by loading cape-universala (of course it exported all pins),

My idea is cape-universal says it exports all pins not used by HDMIN and eMMC (including audio),
so I should be able to set P9.28 as SPI by loading cape-universal only, but I can’t.

And I found that cape-universal dts files are different between Robert’s and cdsteinkuehler’s, I would like to know do i need to modify dts file by myself?


Drew Fustini於 2017年1月25日星期三 UTC+8下午3時19分41秒寫道:

Charles / Robert:
Should P9.28 be SPI by default?


All pins are GPIO by default, with pull up/down set to match the reset
defaults of the processor. To use P9.28 as SPI, in addition to
loading cape-universal, it is necessary to run:

  config-pin P9.28 spi

If this does not result in the pinmux being set to spi, it's a bug.

Hi all,

I have to bring this thread to life again, as I’m facing the same issue:

all I want to do is to assign p9_29 as “spi_cs” on my BBB running “4.9.78-ti-r94”.

Running “config-pin -l p9_28” leads to “default gpio gpio_pu gpio_pd gpio_input spi_cs pwm pruout pruin”. So all looks good, as this pin can be used in spi_cs mode.

Now I want to configure the pin to actually work as spi pin:

config-pin p9_28 spi_cs
P9_28 pinmux file not found!
sudo: no askpass program specified, try setting SUDO_ASKPASS
Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P9_28_pinmux/state

The same error is printed when running “config-pin p9_29 spi” or “config-pin p9_31 spi_sclk”. However, command “config-pin p9_30 spi” works well.

Would really appreciate if someone can help out here!

Best regards,

Did you add the BB-SPIDEV1-00A0.dtbo to the device tree boot list in uEnv.txt?

Did you add the BB-SPIDEV1-00A0.dtbo to the device tree boot list in uEnv.txt?

Should that be necessary if one is using CAPE-UNIVERSAL?

It is a workaround for a bug, I believe. When I enable the dtbo, I get the following directory constructed during the boot process
Without the dtbo, this directory is missing.

Hi all,

thanks for your responses. I will check once back in office and come back to you with results.

@cmbaker3/Chad: would it be possibe to share your uEnv.txt file with me (with the dtbo enabled)? Just do be sure that I do the right thing here…

Would be great and thank you so much!!!


It is a workaround for a bug, I believe. When I enable the dtbo, I get the following directory constructed during the boot process
Without the dtbo, this directory is missing.

Oh I see, thanks.

Hi guys,

I edited uEnv.txt according to the discussion. In particular I added these lines (I also copied my entire uEnv file in this post; see below):


but doesn’t change anything; after reboot I still can’t use “config-pin p9_28 spi_cs” to enable SPI1.

My system: uname -a
Linux beaglebone 4.9.78-ti-r94

I also used “/opt/scripts/tools$ ./” to get more information (please find full log below) and found some interesting lines:

dmesg | grep pinctrl-single
[ 1.404852] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
[ 1.648918] pinctrl-single 44e10800.pinmux: pin PIN103 already requested by 481a0000.spi; cannot claim for 48038000.mcasp
[ 1.660206] pinctrl-single 44e10800.pinmux: pin-103 (48038000.mcasp) status -22
[ 1.667697] pinctrl-single 44e10800.pinmux: could not request pin 103 (PIN103) from group mcasp0_pins on device pinctrl-single

→ Pin103 is P9_28.

Any hints what I could try next?

Would really appreciate your help and thank you all in advance!

Best regards,




###U-Boot Overlays###
###Master Enable

My /boot/uEnv.txt differs, I do not use the uboot_overlay_addr lines, they are commented out.
I have a few more lines following the command=coherent …
The last lines in my file are

cmdline=coherent_pool=1M net.ifnames=0 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 quiet video=HDMI-A-1:1024x768@60e

##Example v3.8.x

##Example v4.1.x

##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync

You might have the cape_enable line as


Hope this helps,


I too have run into the issue of not being able to set P9.28 as well using the latest pre-built image from

To fix the issue, simply disable the uboot audio overlay in /boot/uEnv.txt by uncommenting the line


And reboot the BBB

You can now set P9.28 as needed.

Best regards,

It works! Thanks for your help!

you should change configuration of pins from HDMI to SPI
type this command in terminal: sudo nano /boot/uEnv.txt
then you should remove # of disable-uboot-overlay-video=1
then you can use from SPI pins

I’m trying to fix an error in my beaglebone green in which several PRU pin directories are not available. I’m using image 4.19.50-ti-r20. I’m using, Debian 10.2 which I have experienced as working well with the BBB and BBG. The pins directories that don’t show up are a sub-set of the 35 or so real time PRU I/O pins. These pins are supposed to be available are subdirectories of /sys/devices/platform/ocp/, as follows:

The ones (6 of them) with the asterisk are the real time PRU Input / Output pins that I really really need for my application.

This is on the Beaglebone Green, not the Beaglebone Black, I’ll check if the same problem shows up on BBB as well a little later…
This is image 4.19
I have already gone into the /boot/uEnv.txt file and disabled the following: HDMI, audio, emmc. But I still have this same problem.

Is this a bug in the kernel / image ?

In reviewing page 211 of Derek Molloy’s Exploring Beaglebone book, I can’t see a pattern of all these pins belonging to a certain interface, so I cannot even guess what interface might be causing them to become not available.

Please let me know if you have any ideas on this.

This smells like a mis-configuration, please run:

sudo /opt/scripts/tools/

and share it's output so we can help debug..


This looks like it’s being detected as a BBG Wireless and not a regular BBG. None of those pins are available on the BBGW.


LOL i had this issue on a bunch of boards i bought.

They misprogrammed the eeprom. you will need to write the correct info into
the eeprom. When i notified the company that made the boards they did not give a shit.