Multiple/Second SPI Buses on BeagleBone

· updated · #beaglebone #linux #raspberry-pi · 4 min read

How to: Get SPI to work on Beaglebone

If you want just one SPI port running, then most up to date images for beaglebone has enabled them by default.
Location to get pre-compiled images with SPI1 enabled, http://rcn-ee.net/deb/precise-armhf/v3.2.25-psp20/

Enabling SPI0

Step 1

I tend to compile the kernel using hardfloat, so arm-linux-gnueabihf compiler would be the way to go.

Step 2

Note: This step will discuss how to enable SPI0 (SPI1 is enabled by default with latest kernels, or the one you download from above URL which contains precompiled images).

Step 3

Step 4

How to test

Example SPI driver with modifications

Modified am335_omap_spi.c file from kernel source

References: