Reputation: 73
I'm looking to use the MAX31865 (http://www.maximintegrated.com/datasheet/index.mvp/id/7963) with my Beaglebone Black running Ubuntu 12.0.4. The kernel is a standard 3.8.13-bone30 kernel. Having an SPI interface, I was hoping to interface with the development kit using SPI0 on the Beaglebone Black. Unfortunately every time I enter
ls /dev/spi*
the result is
ls: cannot access /dev/spi*: No such file or directory
I attempted to follow the directions here: http://hipstercircuits.com/enable-spi-with-device-tree-on-beaglebone-black-copy-paste/
When I copied the compiled file over to /lib/firmware I noticed that there were three other spi related files. Those are
BB-SPIDEV0-00A0.dtbo
BB-SPIDEV1-00A0.dtbo
BB-SPIDEV1A1-00A0.dtbo
In addition, the command
echo BB-SPI1-01 > /sys/devices/bone_capemgr.*/slots
returns
bash: echo: write error: No such file or directory
I've tried the same in Angstrom with no success. Can anyone assist me in getting the SPI interface working? Thanks!
Upvotes: 2
Views: 13431
Reputation: 1
cd /lib/firmware
cd /sys/devices/bone_capemgr.8/
cat slots
(checking purpose)echo BB-SPIDEV0 > slots
cat slots
Upvotes: 0
Reputation: 15
This is because the HDMI uses the pins (28-31 on the P9 header) and hence, these pins are not available unless the HDMI DTS is
Upvotes: 0
Reputation: 361
In your case, you should only use the file names appeared in the dir. For example instead of "BB-SPI1-01", you should use "BB-SPIDEV0" or "BB-SPIDEV1" ... etc Also don't forgot to replace the * in "bone_capemgr.*" with a number, it's 8 for me.
here are my steps: 1)
root@beaglebone:/# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
notice, there are only 0-5 items
2) cd to the /lib/firmware folder
root@beaglebone:/lib/firmware# ls *SPI*
ADAFRUIT-SPI0-00A0.dtbo BB-SPIDEV0-00A0.dts BB-SPIDEV1A1-00A0.dtbo
ADAFRUIT-SPI1-00A0.dtbo BB-SPIDEV1-00A0.dtbo BB-SPIDEV1A1-00A0.dts
BB-SPIDEV0-00A0.dtbo BB-SPIDEV1-00A0.dts BBB_SPI0-00A0.dtbo
root@beaglebone:/lib/firmware# echo BBB_SPI0 > /sys/devices/bone_capemgr.8/slots
3) cat slots
root@beaglebone:/lib/firmware# cat /sys/devices/bone_capemgr.8/slots
0: 54:PF---
1: 55:PF---
2: 56:PF---
3: 57:PF---
4: ff:P-O-L Bone-LT-eMMC-2G,00A0,Texas Instrument,BB-BONE-EMMC-2G
5: ff:P-O-L Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
7: ff:P-O-L Override Board Name,00A0,Override Manuf,BBB_SPI0
Notice that there're now a new item 7, which is recently added.
4)now the device is there:
root@beaglebone:/lib/firmware# ls /dev/spi*
/dev/spidev1.0
If there's anything wrong in between, please post your error messages.
Upvotes: 4