Adafruit Industries, Essential service and business: NYC – Executive Order 202.6 - Read more.
0

disabling hdmi and loading spi 1 at Debian 8.4 - BeagleBone
Moderators: adafruit_support_bill, adafruit

Please be positive and constructive with your questions and comments.

disabling hdmi and loading spi 1 at Debian 8.4 - BeagleBone

by rifo on Mon Aug 22, 2016 2:41 pm

Hello,

I had to switch to the latest Debian image for Beaglebone Black as I needed a recent version of Node.js. With the previous version, I knew how to disable the hdmi cape and load the spi1.0 dtbo but with the latest version I am at a loss about what to do.

I checked the loaded capes but can't see any loaded HDMI cape (even the emmc cape is missing too) There is only the universal cape

cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,cape-universaln

Can you please guide me about how to proceed for disabling hdmi cape and activate spi1

thanks
rifo



below I give information about my system.
I downloaded the latest image from Beagleboard.org
Debian 8.4 2016-05-13 4GB SD LXQT i

uname -a
Linux beaglebone 4.4.9-ti-r25 #1 SMP Thu May 5 23:08:13 UTC 2016 armv7l GNU/Linux

cat /etc/debian_version
8.5
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by drewfustini on Mon Aug 22, 2016 3:20 pm

cape-universal is loaded. You should be able to configure the SPI1 pins with config-pin.

For reference:
beaglebone-universal-io

Device tree overlay and support scripts for using most available hardware I/O on the BeagleBone without editing dts files or rebuilding the kernel.

This project is a series of four overlay files, designed to work with the BeagleBone Black:

cape-universal Exports all pins not used by HDMIN and eMMC (including audio)
cape-universaln Exports all pins not used by HDMI and eMMC (no audio pins are exported)
cape-univ-emmc Exports pins used by eMMC, load if eMMC is disabled
cape-univ-hdmi Exports pins used by HDMI video, load if HDMI is disabled
cape-univ-audio Exports pins used by HDMI audio

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Mon Aug 22, 2016 5:23 pm

Hello,

Thanks a lot for your response. I have read the github page of beaglebone-universal-io
I guess I will need the "universala" (or cape-univ-hdmi).

With the currently loaded "universaln", it says that "Exports all pins not used by HDMI and eMMC" so I think I can't use SPI1

I have tried using the config-pin command and got the following output

root@beaglebone:~# config-pin P9.28 spi
P9_28 pinmux file not found!
cape-universala overlay not found
run "config-pin overlay cape-universala" to load the cape

I tried running the above command but got an error

root@beaglebone:~# config-pin overlay cape-universala
Loading cape-universala overlay
bash: line 0: echo: write error: Invalid argument
Error loading device tree overlay file: cape-universala


Can you please guide me with loading cape-universala

thanks a lot
rifo
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by drewfustini on Tue Aug 23, 2016 3:05 am

You should be able to execute config-pin P9.28 spi after making uncommenting this line in /boot/uEnv.txt:

dtb=am335x-bonegreen-overlay.dtb

You should see this in the slots file:
root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,univ-all


This should then enable the SPI1 pins:


config-pin P9.28 spi #SPI1_CS0
config-pin P9.29 spi #SPI1_D0
config-pin P9.30 spi #SPI1_D1
config-pin P9.31 spi #SPI1_SCLK

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Tue Aug 23, 2016 6:00 am

Hello Drew,

I have uncommented that line and rebooted the device however it gets stuck and doesn't finish booting. User led D2 blinks and nothing else happens.

can there be anything that I may be missing?
I will continue trying to find a way for this

thanks
rifo
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Tue Aug 23, 2016 6:54 am

Hello again,

This time, I have disabled the below line in /boot/uEnv.txt

##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb

after reboot, my loaded overlays looked like this

root@beaglebone:~# cat /sys/devices/platform/bone_capemgr/slots
0: PF---- -1
1: PF---- -1
2: PF---- -1
3: PF---- -1
4: P-O-L- 0 Override Board Name,00A0,Override Manuf,univ-emmc

I was then able to "config-in P9.28 spi" without problems and


root@beaglebone:~# config-pin P9.28 spi

root@beaglebone:~# config-pin -q P9.28
P9_28 Mode: spi


but I haven't actually tested the physical pins yet. I'll report back

thanks
rifo
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by drewfustini on Tue Aug 23, 2016 4:30 pm

Good to hear.

Thanks for the tip about the emmc overlay. I should have asked if you were using eMMC or MicroSD. I almost always use MicroSD as I test many different images, so sometimes I forgot about the implications for those booting from eMMC.

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Tue Aug 23, 2016 4:45 pm

Hello Drew,

Thanks again for your guidance. SPI worked fine. I had some trouble until I noticed that spidev1.0 in my previous debian image is now actually spidev2.0. After fixing that, it was okey.

I am now trying to find how to change D0 and D1 such that D0 is output (mosi) and D1 is input (miso)
I'll report back if I find a way to do it.

thanks
rifo
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Tue Aug 23, 2016 6:30 pm

hmm, I guess there is no way to swap D0 and D1 as MOSI and MISO via universal-io, so sad :/

I have disabled universal-io and loaded BB-SPI1-01 overlay but although it creates spidev2.0, I don't see any toggling in spi pins.

I am at a loss right now :/
any pointers would be appreciated.
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by drewfustini on Wed Aug 24, 2016 5:39 am

How come you need to swap D0 and D1?

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Wed Aug 24, 2016 6:39 am

I have a cape that is set up that way. Mosi is connected to D0 and Miso is connected to D1.
If I can't solve this issue, then I will try to do some rework.
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by drewfustini on Wed Aug 24, 2016 5:46 pm

I just noticed in my GitHub notifications that Charles Steinkuehler replied to the GitHub issue that you opened:
changing SPI1 D0 as output

Hopefully he'll be able to provide the necessary information.

drewfustini
 
Posts: 920
Joined: Sat Dec 26, 2015 1:19 pm

Re: disabling hdmi and loading spi 1 at Debian 8.4 - Beagle

by rifo on Thu Aug 25, 2016 1:17 pm

Hello Drew,

thanks! I will try what Charles suggested and report back. Hopefully it will work just fine.
rifo
 
Posts: 42
Joined: Sun Jan 26, 2014 3:07 pm

Please be positive and constructive with your questions and comments.