BBGW uEnv.txt: 2 lines that work on BBB fail to boot on BBGW

When I uncomment “#dtb=am335x-boneblack-emmc-overlay.dtb” and add a line for BB-SPIDEV1 as follows:

#Docs: Beagleboard:U-boot partitioning layout 2.0 - eLinux.org

uname_r=4.4.38-bone-rt-r14
###uuid=
#dtb=

#beaglebone Black/Green dtb’s for v4.1.x (BeagleBone White just works…)

#beaglebone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb
cape_enable=bone_capemgr.enable_partno=BB-SPIDEV1

… (nothing is changed beyond this point)

The system appears to fail during boot. This has worked for a long time on the BBB and I’m trying to move a running application to the BBGW.

root@bbgw:/home/cd5# uname -a
Linux bbgw 4.4.38-bone-rt-r14 #1 PREEMPT RT Mon Dec 12 10:10:25 UTC 2016 armv7l GNU/Linux

I have also tried to use config-pin, but I haven’t been able to find any documentation that will allow me to work through the problems.
For example:

cd5@bbgw:~$ sudo ./config-pin P8_18 low
P8_18 pinmux file not found!
cape-universala overlay not found
run “config-pin overlay cape-universala” to load the cape

root@bbgw:/home/cd5# ./config-pin overlay cape-universala
Loading cape-universala overlay
root@bbgw:/home/cd5# ./config-pin overlay BB-SPIDEV1
Loading BB-SPIDEV1 overlay
bash: line 0: echo: write error: File exists
Error loading device tree overlay file: BB-SPIDEV1

It appears that cape-universala loads both spidev0 and spidev1 - I need the spidev0 pins available for gpio

Trying to push on:

root@bbgw:/home/cd5# ./config-pin -l p8_18
default gpio gpio_pu gpio_pd
root@bbgw:/home/cd5# ./config-pin -i p8_18
Pin name: P8_18
Function if no cape loaded: gpio
Function if cape loaded: default gpio gpio_pu gpio_pd
Function information: gpio2_1 default gpio2_1 gpio2_1 gpio2_1
Cape: cape-universala cape-universal cape-universaln
Kernel GPIO id: 65
PRU GPIO id: 97
root@bbgw:/home/cd5# ./config-pin -q p8_18
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P8_18_pinmux/state

I can’t see where to go from here except to post this hoping that someone can help with either the uEnv.txt problem or the config-pin problems.

When all is configured properly I should have spidev1 (the second spi bus) enabled along with a long list of gpios needed for the application.

Thanks in advance,
Tim

That cape does work on the Beaglebone green. However, the Beaglebone green, and Beaglebone black both have ethernet, where the Beaglebone green wireless has a wifi network interface. So, this is an assumption but here are two points of contention:

  1. Since the BBGW has wifi and the Beaglebone black has ethernet it could be failing because of a networking interface conflict.
  2. Since all Beaglebone have an EEPROM that when flashed properly hold a board identification string" The board file you’ve chosen may fail to load at boot.

So, if you look here: https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack-emmc-overlay.dts#L36 then compare it to this: https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen-wireless.dts#L36 You’ll note the difference. However I’m not convinced that is the problem. I’m thinking the problem probably lies here: https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-bonegreen-wireless.dts#L12 As f you note in the BBB equivalent file here: https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack-emmc-overlay.dts#L10-L13 there is no listing for the wireless hardware module as an include file.

With that said, it’s going to be more complicated than that. As the files for the BBB will probably not have the proper network interface configuration for the wireless interface: ethernet versus wireless. So I’m fairly sure just adding the #include would not work. However . . . it may be possible that https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack-wireless-emmc-overlay.dts would work. I’d double check with Robert first however. To make sure nothing bad would happen. I wouldn’t think so, but thats what I think, and not what I know as fact.

Additionally, this is a reason for you to buy a serial debug cable, or module. With such a device, you’d probably know exactly why the board fails to boot, or at minimum have a really good idea based on uboot output.

I learned by doing. But there are several docs on the web covering it.
Personally I found the documentation on the web counter intuitive though. I
felt it was holding me back. So one day I just dove in, and everything
started making sense. Granted at that point I had 3+ years hands on with
the hardware. A little here, and there.

If you've been programming for any amount of time, reading through an
overlay while you may not know specific details, should make sense. In
fact, if you toss a device tree file into an editor with syntax
highlighting, and select C as the language. You get syntax highlighting too
:wink:

Anyway, there is a document by Panto, and Tom King in PDF format called
something like " kernel 3.8 and device tree". Should come up in the top of
a google search list. IN fact:
http://elinux.org/BeagleBone_and_the_3.8_Kernel

Just keep in mind that there would be some differences for the newer
kernels . . . but the gist should be nearly the same.

Your intuition seems to be very good. After much testing, I now can see that as soon as I enable “dtb=am335x-boneblack-emmc-overlay.dtb” and reboot, the system does come up but wlan0 is no longer known. By that I mean that “ifconfig -a” and “connmanctl technologies” both fail to list it. The odd thing is that having setup wlan0 with connmanctl, it does come up and run and I can login (although it may quit after awhile).

Yes, I can read the dts files fairly easily. The problem is knowing which overlays are included for a given device.

Between the problems mentioned above and the failures that I’m seeing trying to use config-pin to setup the gpios, I guess I’m wondering if there is anyone who is actively working on getting the BBGW DT running. This is supposed to be a simple port of an existing application to the BBGW because we don’t need hdmi and would like to add wifi. Of course, the desire is to reduce cost as well.

If there is anyone working on the DT issues for the BBGW, I would appreciate a note. If I don’t hear soon, I will simply recommend that we move to the BBBW instead.

Thanks,
Tim

My understanding that the two boards, BBGW and BBBW both use the same
wireless radio. I have not looked into that personally, because I do not
own either one. But assuming that were fact, I'd probably try using the
BBBW wireless board overlay. Because I do have hands on using the same
overlay you mentioned in your first post, on several beaglebone greens. The
reason why it works, is that the beaglebone green has no HDMI framer, and
that overlay disables HDMI video, and audio.

So I'd probably try to compile the BBBW overlay
https://github.com/RobertCNelson/dtb-rebuilder/blob/4.4-ti/src/arm/am335x-boneblack-wireless-emmc-overlay.dts
and see if it worked.

You'd need git installed, then just git clone that whole repo( not just
that one file ), then . . .

cd into the working directory
make
make install

To test it. If I had a BBGW wireless I'd test it myself before hand. But I
don't . . . Also keep in mind that I'm not 100% sure that overlay won't
damage your board, but I really do not see how it could . . . which is why
I'd dive right in myself if I had the hardware in hand.

By the way . . .

Yes, I can read the dts files fairly easily. The problem is knowing which overlays are included for a given device.

Everything in /lib/firmware/

Hi Codemonkey,

I found this post in googgle searches as I am trying to do the same thing. I want to enable P9_28 to P9_31 as gpio. If I go normal HDMI Overlay disable method, wifi stops working. Were you able to find a solution for this that both SPI1 pins and Wifi works together in BBGW. I would be great if you can please share with me your findings.

Thanks