Using a device table overlay to disable the onboard RTC on the beaglebone black

BTW, this is on a SeeedStudio Green Wireless.

loading /boot/vmlinuz-4.16.0-rc2-bone3 …
10183168 bytes read in 659 ms (14.7 MiB/s)
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] …
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot-univ.dtb …
loading /boot/dtbs/4.16.0-rc2-bone3/am335x-boneblack-uboot-univ.dtb …
156503 bytes read in 41 ms (3.6 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] …
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo …
1105 bytes read in 50 ms (21.5 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BBGW-WL1835-00A0.dtbo …
4681 bytes read in 111 ms (41 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo …
695 bytes read in 41 ms (15.6 KiB/s)
loading /boot/initrd.img-4.16.0-rc2-bone3 …
4459001 bytes read in 303 ms (14 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0] …
debug: [bootz 0x82000000 0x88080000:4409f9 88000000] …

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8fbbf000, end 8ffff9f9 … OK
reserving fdt memory region: addr=88000000 size=87000
Loading Device Tree to 8fb35000, end 8fbbefff … OK

Starting kernel …

Thanks.

This is just before running the update_kernel script:

loading /boot/vmlinuz-4.9.78-ti-r94 …
9960536 bytes read in 646 ms (14.7 MiB/s)
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] …
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] …
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb …
loading /boot/dtbs/4.9.78-ti-r94/am335x-boneblack-uboot.dtb …
61626 bytes read in 42 ms (1.4 MiB/s)
uboot_overlays: [fdt_buffer=0x60000] …
uboot_overlays: loading /lib/firmware/BB-BONE-eMMC1-01-00A0.dtbo …
1105 bytes read in 50 ms (21.5 KiB/s)
uboot_overlays: loading /lib/firmware/BB-BBGW-WL1835-00A0.dtbo …
4681 bytes read in 111 ms (41 KiB/s)
uboot_overlays: loading /lib/firmware/BB-ADC-00A0.dtbo …
695 bytes read in 41 ms (15.6 KiB/s)
uboot_overlays: loading /lib/firmware/univ-bbgw-EW-00A0.dtbo …
82622 bytes read in 181 ms (445.3 KiB/s)
loading /boot/initrd.img-4.9.78-ti-r94 …
6508361 bytes read in 426 ms (14.6 MiB/s)
debug: [console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 r ootwait coherent_pool=1M net.ifnames=0] …
debug: [bootz 0x82000000 0x88080000:634f49 88000000] …

Flattened Device Tree blob at 88000000

Booting using the fdt blob at 0x88000000
Loading Ramdisk to 8f9cb000, end 8fffff49 … OK
reserving fdt memory region: addr=88000000 size=83000
Loading Device Tree to 8f945000, end 8f9cafff … OK

Starting kernel …

Don’t know if that’s the cause, but it’s not loading univ-bbgw-EW-00A0.dtbo after the kernel update.

Thanks.

That's actually integrated into "am335x-boneblack-uboot-univ.dtb"..

Thus we just remove 'used' pinmux's.. I'm flashing that board right now..

Regards,

Weird, booted fine here:
https://gist.github.com/RobertCNelson/836f942965fa012041c303070251143c

I used a stretch based image, what's your base image?

Regards,

I am using ‘Debian 9.3 2018-01-28 4GB SD IoT’ from here:
https://beagleboard.org/latest-images (first one on top)

I just started completely from scratch with the above base image, running from eMMC (uncommented ‘init-eMMC-flasher-v3.sh’ from /boot/uEnv.txt).

The only thing I did was run connmanctl to setup the wifi connection. Then I followed the first three steps from above (update u-boot, kernel, and overlays). It boots up now, but “Failed to start Load Kernel Modules.”

I attached the complete boot log.

Thanks.

attachment_01.txt (8.8 KB)

Oh, your good so far, that's something with 4.16.x-rcX, just ignore it for now..

You should be able to add:

uboot_overlay_addr0=/lib/firmware/BB-I2C2-PCF8523-00A0.dtbo

to /boot/uEnv.txt now and reboot..

Regards,

Yes, that seems to work to add the PCF8523 RTC, but there are some other issues.
-no more wifi (SoftAp0 or wlan0). ‘ifconfig -a’ only shows lo, usb0, and usb1.
-‘config-pin’ still does not work. For example:
config-pin P9_24 uart
config-pin P9_26 uart

Thanks.

Yes, that seems to work to add the PCF8523 RTC, but there are some other
issues.

Cool

-no more wifi (SoftAp0 or wlan0). 'ifconfig -a' only shows lo, usb0, and
usb1.

Okay, so it's just my board here.. I'll debug some more, it's the
'overlay' for the GW, the BW works...

-'config-pin' still does not work. For example:
    config-pin P9_24 uart
    config-pin P9_26 uart

Only gpio's are implemented, add this to get the uart working:

uboot_overlay_addr1=/lib/firmware/BB-UART1-00A0.dtbo

Regards,

Only gpio’s are implemented

Could you clarify that because the following don’t work either:
config-pin P9_14 gpio
config-pin P9_42 gpio

Thanks.

sudo apt update ; sudo apt upgrade

there's an upgraded bb-cape-overlay package

Those two pins are available:

debian@beaglebone:/sys/devices/platform/ocp$ ls | grep pinmux
ocp:P8_07_pinmux
ocp:P8_08_pinmux
ocp:P8_09_pinmux
ocp:P8_10_pinmux
ocp:P8_13_pinmux
ocp:P8_19_pinmux
ocp:P8_27_pinmux
ocp:P8_28_pinmux
ocp:P8_29_pinmux
ocp:P8_30_pinmux
ocp:P8_31_pinmux
ocp:P8_32_pinmux
ocp:P8_33_pinmux
ocp:P8_34_pinmux
ocp:P8_35_pinmux
ocp:P8_36_pinmux
ocp:P8_37_pinmux
ocp:P8_38_pinmux
ocp:P8_39_pinmux
ocp:P8_40_pinmux
ocp:P8_41_pinmux
ocp:P8_42_pinmux
ocp:P8_43_pinmux
ocp:P8_44_pinmux
ocp:P8_45_pinmux
ocp:P8_46_pinmux
ocp:P9_11_pinmux
ocp:P9_13_pinmux
ocp:P9_14_pinmux
ocp:P9_15_pinmux
ocp:P9_16_pinmux
ocp:P9_17_pinmux
ocp:P9_18_pinmux
ocp:P9_19_pinmux
ocp:P9_20_pinmux
ocp:P9_21_pinmux
ocp:P9_22_pinmux
ocp:P9_23_pinmux
ocp:P9_24_pinmux
ocp:P9_25_pinmux
ocp:P9_26_pinmux
ocp:P9_27_pinmux
ocp:P9_28_pinmux
ocp:P9_29_pinmux
ocp:P9_30_pinmux
ocp:P9_31_pinmux
ocp:P9_41_pinmux
ocp:P9_42_pinmux
ocp:P9_91_pinmux
ocp:P9_92_pinmux

Regards,

ugh, it's gpio-hog and P8_26_pinmux (Buffer Enable between the am335x
and wl1835)..

That sucks, P8_26_pinmux { status = "disabled"; }; is too late to set
it free for gpio-hog which is right away..

let's try the led option...

Regards,

sudo apt update ; sudo apt upgrade

there’s an upgraded bb-cape-overlay package

After digging out a USB-to-Ethernet dongle for internet access, I did the upgrade and those pins now work.

Thanks.

Yeah, this is going to work for the BBGW at the moment, two pins need
to be set by teh gpio-hog early in bootup. However gpio-of-helper
then takes control of those pins, and wipes away the hog settings..

it looks like i need to patch gpio-of-helper to use gpiolib and then
make sure to whitelist any pins with the "hog' flag.

eta, awhile...

Regards,

or i could just change the bbgw "base" dtb so those pins are never
exported, thus kicking the gpiolib problem down the road a few more
years..

yeah, i'll do that... tomorrow...

Regards,

Okay got this working this moring.. the wl_en/wl_irq pins had to be
ripped out of the cape-universal...

bb-cape-overlays:

sudo apt update ; sudo apt upgrade bb-cape-overlays

u-boot: (yes another build)

sudo /opt/scripts/tools/developers/update_bootloader.sh --beta

kernel: (4.16-rc2-bone5 building right now)

sudo /opt/scripts/tools/update_kernel.sh --bone-channel --exp

Regards,

Eagerly waiting to test out 4.16-rc2-bone5. Can you post here when it’s out? I’ve been running the update_kernel.sh script every 30 minutes, but it still says the latest version is bone4.

BTW, I really appreciate all the help you have provided!

Thanks.

Yeah, the cron uploader job only runs a few times a day.. i just kicked it..

Files are now uploaded to the apt repo..

Regards,

Everything seems to work like it should. Thanks again!