# How to enable spi on BBB running Ubuntu 18.04

**URL:** <https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643>\
**Category:** Linux Discussions\
**Created:** [June 11, 2019, 11:01am UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643 "2019-06-11T11:01:40Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![milesbdyson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/milesbdyson/32/3142_2.png) [@milesbdyson](https://forum.digikey.com/u/milesbdyson)\
**Post date:** [June 11, 2019, 11:01am UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643/1 "2019-06-11T11:01:40Z")

</div>

I am new to the SPI pins on a Beaglebone Black and wish to learn how to use them. with very little luck finding any documentation on how to enable them when searching the web, i did find a few examples however it seams that they were outdated guides or perhaps not even the right operating system that i am using.

I would like to know how to enable the SPI pins on my BBB that is running Ubuntu 18.04. so if any one knows of any current documentation or could help me, i would be grateful.

Thank you  
Miles Dyson

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [June 11, 2019, 1:04pm UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643/2 "2019-06-11T13:04:11Z")

</div>

@milesbdyson, please run this script so we can determine your setup, so we can better answer how to enable spi on the bbb…

```auto
sudo /opt/scripts/tools/version.sh

```

Regards,

---

<div class="post-metadata">

**Author:** ![milesbdyson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/milesbdyson/32/3142_2.png) [@milesbdyson](https://forum.digikey.com/u/milesbdyson)\
**Post date:** [June 11, 2019, 2:16pm UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643/3 "2019-06-11T14:16:53Z")

</div>

git:/opt/scripts/:[4d42f40945874258a2d236d9427dbd14b3801ca6]  
eeprom:[A335BNLT000C1316BBBK1210]  
model:[TI\_AM335x\_BeagleBone\_Black]  
dogtag:[[rcn-ee.net](http://rcn-ee.net) console Ubuntu Image 2018-06-08]  
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]  
kernel:[4.14.44-ti-r51]  
uboot\_overlay\_options:[enable\_uboot\_overlays=1]  
uboot\_overlay\_options:[uboot\_overlay\_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]  
uboot\_overlay\_options:[enable\_uboot\_cape\_universal=1]  
pkg:[bb-cape-overlays]:[4.4.20190610.0-0rcnee0~bionic+20190610]  
pkg:[bb-wl18xx-firmware]:[1.20190227.1-0rcnee0~bionic+20190227]  
pkg:[kmod]:[24-1ubuntu3.2rcnee0~bionic+20190208]  
WARNING:pkg:[roboticscape]:[NOT\_INSTALLED]  
cmdline:[console=ttyO0,115200n8 bone\_capemgr.uboot\_capemgr\_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent\_pool=1M net.ifnames=0 quiet cape\_universal=enable]  
dmesg | grep pinctrl-single  
[1.167744] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568  
dmesg | grep gpio-of-helper  
[1.174577] gpio-of-helper ocp:cape-universal: ready  
END

lsb\_release -a  
No LSB modules are available.  
Distributor ID: Ubuntu  
Description: Ubuntu 18.04.2 LTS  
Release: 18.04  
Codename: bionic

---

<div class="post-metadata">

**Author:** ![RobertCNelson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/robertcnelson/32/12_2.png) [@RobertCNelson](https://forum.digikey.com/u/RobertCNelson)\
**Post date:** [June 11, 2019, 3:06pm UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643/4 "2019-06-11T15:06:42Z")

</div>

> [@milesbdyson](#):
>
> ```auto
> dogtag:[[rcn-ee.net](http://rcn-ee.net) console Ubuntu Image 2018-06-08]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
> kernel:[4.14.44-ti-r51]
> 
> ```

That should be new enough to just edit /boot/uEnv.txt and add these options:

```auto
uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-SPIDEV1-00A0.dtbo

```

[https://elinux.org/Beagleboard:BeagleBoneBlack\_Debian#U-Boot\_Overlays](https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays)

Regards,

---

<div class="post-metadata">

**Author:** ![milesbdyson](https://sea2.discourse-cdn.com/digikey/user_avatar/forum.digikey.com/milesbdyson/32/3142_2.png) [@milesbdyson](https://forum.digikey.com/u/milesbdyson)\
**Post date:** [June 11, 2019, 3:40pm UTC](https://forum.digikey.com/t/how-to-enable-spi-on-bbb-running-ubuntu-18-04/3643/5 "2019-06-11T15:40:01Z")

</div>

Perfect… thank you, that was exactly what i needed and now have the SPI0 pins enabled… as allays it has bin my pleasure communicating with you… you are a great asset to this TechForum. 👍
