Skip to first unread message

Tyler Kolden

unread,
May 22, 2018, 9:06:46 AM5/22/18
to BeagleBoard
I'm having trouble enabling either one of the SPI ports on the BBBW.  I've tried adding the uboot overlays for SPI as well as using the config-pin without success.  Any help is greatly appreciated.  

root@beaglebone:/dev# config-pin p9_28 spi_cs

P9_28 pinmux file not found!
bash: /sys/devices/platform/ocp/ocp*P9_28_pinmux/state: No such file or directory
Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P9_28_pinmux/state

root@beaglebone:/opt/scripts/tools# bash version.sh

git:/opt/scripts/:[5935e83ecaedfd4fd88a4b870ffe5af33ded0617]
eeprom:[A335BNLTBWA50000BBWG*]
model:[TI_AM335x_BeagleBone_Black_Wireless]
dogtag:[BeagleBoard.org Debian Image 2018-03-05]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.03-00002-gac9cce7c6a]:[location: dd MBR]
kernel:[4.9.82-ti-r102]
nodejs:[v6.13.0]
device-tree-override:[dtb=am335x-boneblack-wireless.dtb]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[enable_uboot_cape_universal=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo]
uboot_overlay_options:[uboot_overlay_addr5=/lib/firmware/BB-SPIDEV1-00A0.dtbo  ]
pkg:[bb-cape-overlays]:[4.4.20180305.0-0rcnee0~stretch+20180305]
pkg:[bb-wl18xx-firmware]:[1.20170829-0rcnee2~stretch+20180104]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee0~stretch+20170830]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal i2c bluetooth netdev cloud9ide gpio pwm eqep admin spi tisdk weston-launch xenomai]
version.sh: line 139: syntax error near unexpected token `then'
version.sh: line 139: `echo "cmdline:[`cat /proc/cmdline`]" ; then'

root@beaglebone:/opt/scripts/tools# cat /boot/uEnv.txt

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0
uname_r=4.9.82-ti-r102
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###
###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###Overide capes with eeprom
#cape_enable=bone_capemgr.enable_partno=/lib/firmware/BB-SPIDEV1-00A0.dtbo
uboot_overlay_addr4=/lib/firmware/BB-SPIDEV0-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-SPIDEV1-00A0.dtbo
#uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo
#uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo
#uboot_overlay_addr2=/lib/firmware/BB-UART4-00A0.dtbo
#uboot_overlay_addr3=/lib/firmware/BB-UART5-00A0.dtbo
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###
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
### enable wifi
dtb=am335x-boneblack-wireless.dtb
##enable Generic eMMC Flasher:
##make sure, these tools are installed: dosfstools rsync
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh


root@beaglebone:/var/lib/cloud9# ls /sys/devices/platform/ocp/ | grep pinmux*

ocp:P9_19_pinmux
ocp:P9_20_pinmux

root@beaglebone:/dev# ls -ls | grep spi

0 crw-rw---- 1 root spi     153,   1 May 22 12:48 spidev1.0
0 crw-rw---- 1 root spi     153,   0 May 22 12:48 spidev1.1
0 crw-rw---- 1 root spi     153,   3 May 22 12:48 spidev2.0
0 crw-rw---- 1 root spi     153,   2 May 22 12:48 spidev2.1

 

Robert Nelson

unread,
May 22, 2018, 11:17:16 AM5/22/18
to Beagle Board, Tyler Kolden
Hi Tyler,

On Tue, May 22, 2018 at 8:06 AM, Tyler Kolden
<tyler....@jtpsystems.com> wrote:
> I'm having trouble enabling either one of the SPI ports on the BBBW. I've
> tried adding the uboot overlays for SPI as well as using the config-pin
> without success. Any help is greatly appreciated.
>
> root@beaglebone:/dev# config-pin p9_28 spi_cs
>
>> P9_28 pinmux file not found!
>> bash: /sys/devices/platform/ocp/ocp*P9_28_pinmux/state: No such file or
>> directory
>> Cannot write pinmux file: /sys/devices/platform/ocp/ocp*P9_28_pinmux/state


So with v4.9.x/v4.14.x, when you enable a custom overlay thru u-boot,
config-pin get's disabled..

This is fixed with v4.16.x+ kernels.

But in your case, BB-SPIDEV0-00A0.dtbo/BB-SPIDEV1-00A0.dtbo should
already set p9_28 correctly

https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-SPIDEV1-00A0.dts


>> device-tree-override:[dtb=am335x-boneblack-wireless.dtb]

Ps, drop this dtb= option, as that breaks:

>> uboot_overlay_options:[enable_uboot_overlays=1]
>> uboot_overlay_options:[disable_uboot_overlay_video=1]
>> uboot_overlay_options:[disable_uboot_overlay_audio=1]
>> uboot_overlay_options:[enable_uboot_cape_universal=1]

The disable options listed here ^

(thus video/audio don't get disabled)

Regards,

--
Robert Nelson
https://rcn-ee.com/

Tyler Kolden

unread,
May 23, 2018, 8:52:21 AM5/23/18
to BeagleBoard
That worked perfectly - thank you!
Reply all
Reply to author
Forward
0 new messages