i2c bus speed and cape universal...

83 views
Skip to first unread message

Daniel Kulp

unread,
Feb 19, 2019, 2:04:51 PM2/19/19
to BeagleBoard

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

Robert Nelson

unread,
Feb 19, 2019, 2:55:15 PM2/19/19
to Beagle Board, Daniel Kulp
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,


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

Daniel Kulp

unread,
Feb 19, 2019, 3:07:52 PM2/19/19
to Robert Nelson, Beagle Board
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.       


Robert Nelson

unread,
Feb 19, 2019, 3:11:08 PM2/19/19
to Daniel Kulp, Beagle Board
It shouldn't.. which means something else is going on..

Can you share:

sudo /opt/scripts/tools/version.sh

Daniel Kulp

unread,
Feb 19, 2019, 3:20:41 PM2/19/19
to beagl...@googlegroups.com

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

Can you share:

sudo /opt/scripts/tools/version.sh



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>]
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#

Robert Nelson

unread,
Feb 19, 2019, 4:07:21 PM2/19/19
to Beagle Board, Daniel Kulp
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..

Daniel Kulp

unread,
Feb 19, 2019, 4:41:47 PM2/19/19
to Robert Nelson, Beagle Board

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

Daniel Kulp

unread,
Mar 1, 2019, 4:54:05 PM3/1/19
to BeagleBoard

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.  :(

Dan



On Tuesday, February 19, 2019 at 4:41:47 PM UTC-5, Daniel Kulp wrote:

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



On Feb 19, 2019, at 4:06 PM, Robert Nelson wrote:


Reply all
Reply to author
Forward
0 new messages