i2c bus speed and cape universal...

Question: has anyone figured out how to set the I2C bus speed without disabling cape-universal? I’d like to increase the bus speed from 100khz to 400, but every attempt I make using overlays from uEnv.txt seems to also disable cape-universal which I also need. Do I need to explicitly add the appropriate cape-universal overlay to the list of overlays? It seem like if I do:

uboot_overlay_addr4=/lib/firmware/cape-universalh-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-I2C2-FAST-FPP-00A0.dtbo

then the universal stuff works, but is that really what I’m supposed to do? Seems a bit more error prone as the disable_uboot_overlay_* stuff doesn’t seem to come into play and I need to grab the appropriate cape-universal* file manually.

Thanks!
Dan

It sounds like you missed something in your "custom": BB-I2C2-FAST-FPP-00A0.dtbo

Compare with:

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

Then cape-universal should work automatically..

Regards,

No… The reason I created the custom one was to try and see if I can get it to work. If I use BB-I2C2-FAST-00A0, all the universal stuff isn’t working either.

It shouldn't.. which means something else is going on..

Can you share:

sudo /opt/scripts/tools/version.sh

Regards,

root@FPPTest:/opt/scripts/tools# ./version.sh
git:/opt/scripts/:[e9bcff232834702c1c810710706ee815d77b080b]
eeprom:[A335BNLTEIA03116BBBK0A88]
model:[TI_AM335x_BeagleBone_Black]
dogtag:[BeagleBoard.org Debian Image 2018-10-07]
bootloader:[microSD-(push-button)]:[/dev/mmcblk0]:[U-Boot 2018.09-00002-gbc653b9d91]:[location: dd MBR]
bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2018.09-00002-gbc653b9d91]:[location: dd MBR]
kernel:[4.14.71-bone17]
uboot_overlay_options:[enable_uboot_overlays=1]
uboot_overlay_options:[uboot_overlay_addr4=/lib/firmware/BB-I2C2-FAST-00A0.dtbo]
uboot_overlay_options:[disable_uboot_overlay_video=1]
uboot_overlay_options:[disable_uboot_overlay_audio=1]
uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo]
uboot_overlay_options:[enable_uboot_cape_universal=1]
pkg check: to individually upgrade run: [sudo apt install --only-upgrade ]
pkg:[bb-cape-overlays]:[4.4.20181019.0-0rcnee0~stretch+20181019]
pkg:[bb-wl18xx-firmware]:[1.20180517-0rcnee0~stretch+20180517]
pkg:[kmod]:[23-2rcnee1~stretch+20171005]
WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
pkg:[firmware-ti-connectivity]:[20170823-1rcnee1~stretch+20180328]
groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal netdev gpio pwm eqep admin spi i2c tisdk weston-launch xenomai bluetooth cloud9ide]
cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk0p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 rootwait quiet]
dmesg | grep pinctrl-single
[ 0.635136] pinctrl-single 44e10800.pinmux: 142 pins at pa f9e10800 size 568
dmesg | grep gpio-of-helper
[ 0.636374] gpio-of-helper ocp:cape-universal: ready
END
root@FPPTest:/opt/scripts/tools# config-pin -q P9-41
P9_41 pinmux file not found!
Cannot read pinmux file: /sys/devices/platform/ocp/ocp*P9_41_pinmux/state
root@FPPTest:/opt/scripts/tools#

Okay, reproduced:

loading /boot/vmlinuz-4.14.93-bone17 ...
8937984 bytes read in 585 ms (14.6 MiB/s)
debug: [enable_uboot_overlays=1] ...
debug: [enable_uboot_cape_universal=1] ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot-univ.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot-univ.dtb] ...
debug: unable to find [am335x-boneblack-uboot-univ.dtb] using
[am335x-boneblack-uboot.dtb] instead ...
debug: [uboot_base_dtb_univ=am335x-boneblack-uboot.dtb] ...
uboot_overlays: [uboot_base_dtb=am335x-boneblack-uboot.dtb] ...
uboot_overlays: Switching too: dtb=am335x-boneblack-uboot.dtb ...
loading /boot/dtbs/4.14.93-bone17/am335x-boneblack-uboot.dtb ...

So looking back at my development log, I started the "cape universal
rewrite" during the v4.16.x-bone cycle, didn't fully finalize things
till v4.19.x-bone, and back ported it to v4.14.x-ti..

So yeah, i didn't back port it to v4.14.x-bone..

Regards,

OK. Just updated to 4.19.23-bone22. Faster i2c seems to work and UIO at least doesn’t crash my app. Haven’t actually tested anything, but it at least starts.

Thanks!
Dan

Got around to actually testing and I was completely wrong. With the latest bone kernel (4.19.26-bone26), I cannot get the faster i2c bus and still have universal working. As soon as I add the BB-I2C2-FAST-FPP-00A0.dtbo overlay, all the pinmux files are gone and thus none of the “config-pin” things work. :frowning:

Dan