On Wed, May 14, 2014 at 10:25 AM, Robert Nelson <[email protected]> wrote:
> On Wed, May 14, 2014 at 9:54 AM, James S <[email protected]> wrote:
>> I followed the instructions here
>> http://elinux.org/BeagleBone_Black_Enable_SPIDEV but SPI1 is still not
>> initialising properly.
>>
>> uEnv.txt
>> optargs=quiet drm.debug=7
>> capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>> capemgr.enable_partno=BB-SPI1-01
>>
>> The result is:
>> root@beaglebone:~# dmesg | grep SPI
>> [    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8
>> quiet drm.debug=7 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>> capemgr.enable_partno=BB-SPI1-01 root=/dev/mmcblk0p2 ro rootfstype=ext4
>> rootwait fixrtc quiet init=/lib/systemd/systemd
>> [    0.732452] bone-capemgr bone_capemgr.9: enabled_partno part_number
>> 'BB-SPI1-01', version 'N/A', prio '0'
>> [    0.732498] bone-capemgr bone_capemgr.9: slot #7: 'Override Board
>> Name,00A0,Override Manuf,BB-SPI1-01'
>> [    0.736957] bone-capemgr bone_capemgr.9: loader: before slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.736974] bone-capemgr bone_capemgr.9: loader: check slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.736990] bone-capemgr bone_capemgr.9: loader: after slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.737006] bone-capemgr bone_capemgr.9: slot #7: Requesting part
>> number/version based 'BB-SPI1-01-00A0.dtbo
>> [    0.737024] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware
>> 'BB-SPI1-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
>> [    1.110253] bone-capemgr bone_capemgr.9: failed to load firmware
>> 'BB-SPI1-01-00A0.dtbo'
>> [    1.118721] bone-capemgr bone_capemgr.9: loader: failed to load slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> root@beaglebone:~# cat /sys/devices/bone_capemgr.*/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-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
>>  6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
>>
>> Then doing a
>>  echo BB-SPI1-01 > /sys/devices/bone_capemgr.9/slots
>>
>> the output is
>> root@beaglebone:~# dmesg | grep SPI
>> [    0.000000] Kernel command line: console=tty0 console=ttyO0,115200n8
>> quiet drm.debug=7 capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>> capemgr.enable_partno=BB-SPI1-01 root=/dev/mmcblk0p2 ro rootfstype=ext4
>> rootwait fixrtc quiet init=/lib/systemd/systemd
>> [    0.732452] bone-capemgr bone_capemgr.9: enabled_partno part_number
>> 'BB-SPI1-01', version 'N/A', prio '0'
>> [    0.732498] bone-capemgr bone_capemgr.9: slot #7: 'Override Board
>> Name,00A0,Override Manuf,BB-SPI1-01'
>> [    0.736957] bone-capemgr bone_capemgr.9: loader: before slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.736974] bone-capemgr bone_capemgr.9: loader: check slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.736990] bone-capemgr bone_capemgr.9: loader: after slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [    0.737006] bone-capemgr bone_capemgr.9: slot #7: Requesting part
>> number/version based 'BB-SPI1-01-00A0.dtbo
>> [    0.737024] bone-capemgr bone_capemgr.9: slot #7: Requesting firmware
>> 'BB-SPI1-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
>> [    1.110253] bone-capemgr bone_capemgr.9: failed to load firmware
>> 'BB-SPI1-01-00A0.dtbo'
>> [    1.118721] bone-capemgr bone_capemgr.9: loader: failed to load slot-7
>> BB-SPI1-01:00A0 (prio 0)
>> [  353.544405] bone-capemgr bone_capemgr.9: part_number 'BB-SPI1-01',
>> version 'N/A'
>> [  353.544700] bone-capemgr bone_capemgr.9: slot #8: 'Override Board
>> Name,00A0,Override Manuf,BB-SPI1-01'
>> [  353.544960] bone-capemgr bone_capemgr.9: slot #8: Requesting part
>> number/version based 'BB-SPI1-01-00A0.dtbo
>> [  353.545012] bone-capemgr bone_capemgr.9: slot #8: Requesting firmware
>> 'BB-SPI1-01-00A0.dtbo' for board-name 'Override Board Name', version '00A0'
>> [  353.552302] bone-capemgr bone_capemgr.9: slot #8: dtbo
>> 'BB-SPI1-01-00A0.dtbo' loaded; converting to live tree
>>
>> I then changed uEnv.txt to:
>> ##Disable HDMI
>> optargs=quiet drm.debug=7
>> capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
>> #capemgr.enable_partno=BB-SPI1-01
>>
>> After reboot I get:
>> root@beaglebone:~# dmesg | grep SPI
>> root@beaglebone:~#
>>
>> When I enter:
>> root@beaglebone:~# cat /sys/devices/bone_capemgr.*/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-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
>>  6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
>> root@beaglebone:~#
>>
>> And then type:
>> root@beaglebone:~# echo BB-SPI1-01 > /sys/devices/bone_capemgr.9/slots
>>
>> I get:
>> root@beaglebone:~# cat /sys/devices/bone_capemgr.*/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-- Bone-Black-HDMI,00A0,Texas Instrument,BB-BONELT-HDMI
>>  6: ff:P-O-- Bone-Black-HDMIN,00A0,Texas Instrument,BB-BONELT-HDMIN
>>  7: ff:P-O-L Override Board Name,00A0,Override Manuf,BB-SPI1-01
>> root@beaglebone:~#
>>
>> It looks like SPI1 is there!
>
> Correct,
>
> Due to userspace limitations, the initrd and the kernel config, all
> "capes" must be built-in to use the
> "capemgr.enable_partno=BB-SPIDEV1".
>
> With built-in capes it works fine:
> http://pastebin.com/pFfFuG7G
>
> However, as your "custom" cape is not actually available at boot time
> as /lib/firmware isn't mounted yet the kernel can't see your cape.  So
> if you don't mind waiting 2 minutes for bootup i can change that for
> wheezy. (that's sarcasm, i'm not going to make people wait 2 minutes).
>
> So add "BB-SPI1-01" as "CAPE=BB-SPI1-01" to /etc/default/capemgr and
> it'll be shortly loaded on startup after the rootfs is mounted.

btw: i also added this to elinux faq website i have printed everywhere
on the debian default image.

http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#Loading_custom_capes

Regards,

-- 
Robert Nelson
http://www.rcn-ee.com/

-- 
For more options, visit http://beagleboard.org/discuss
--- 
You received this message because you are subscribed to the Google Groups 
"BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to