BBw - How to set i2c-2 baud rate to fast mode (400 kHz)

I am attempting to connect a peripheral that requires i2c Fast Mode, but I cannot set the i2c baud rate on Beaglebone Black Wireless.

(I am not very familiar with BBB or Device Tree)

Following instructions, I found at https://groups.google.com/g/beagleboard/c/vbuM-4oShS8

I decompiled, modified, and recompiled am335x-boneblack.dtb, changing the clock_frequency for i2c@4819c000 from 0x186a0 to 0x61a80. However, dmesg
sill shows 100 kHz.

Any help would be appreciated.

Here are the details -

version.sh

> debian@beaglebone:/opt/scripts/tools$ sudo ./version.sh
> git:/opt/scripts/:[b39ec679648a6be8f25f48bd1c9784c1fc5a0c46]
> eeprom:[A335BNLTBWA51646BBWG2761]
> model:[TI_AM335x_BeagleBone_Black_Wireless]
> dogtag:[BeagleBoard.org Debian Buster Console Image 2020-04-06]
> bootloader:[eMMC-(default)]:[/dev/mmcblk1]:[U-Boot 2019.04-00002-gc9b3922522]:[location: dd MBR]
> UBOOT: Booted Device-Tree:[am335x-boneblack-uboot-univ.dts]
> UBOOT: Loaded Overlay:[AM335X-PRU-RPROC-4-19-TI-00A0]
> UBOOT: Loaded Overlay:[BB-ADC-00A0.kernel]
> UBOOT: Loaded Overlay:[BB-BBBW-WL1835-00A0.kernel]
> UBOOT: Loaded Overlay:[BB-BONE-eMMC1-01-00A0.kernel]
> UBOOT: Loaded Overlay:[BB-HDMI-TDA998x-00A0.kernel]
> kernel:[4.19.94-ti-r73]
> /boot/uEnv.txt Settings:
> uboot_overlay_options:[enable_uboot_overlays=1]
> uboot_overlay_options:[uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-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.14.20210821.0-0~buster+20210821]
> pkg:[bb-wl18xx-firmware]:[1.20221201.0-0~buster+20221201]
> pkg:[kmod]:[26-1]
> WARNING:pkg:[librobotcontrol]:[NOT_INSTALLED]
> pkg:[firmware-ti-connectivity]:[20190717-2rcnee1~buster+20200305]
> groups:[debian : debian adm kmem dialout cdrom floppy audio dip video plugdev users systemd-journal bluetooth netdev gpio pwm eqep remoteproc admin spi iio i2c docker tisdk weston-launch xenomai cloud9ide]
> cmdline:[console=ttyO0,115200n8 bone_capemgr.uboot_capemgr_enabled=1 root=/dev/mmcblk1p1 ro rootfstype=ext4 rootwait coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet]
> dmesg | grep remote
> [   28.440247] Bluetooth: hci0: change remote baud rate command in firmware
> [   32.439281] remoteproc remoteproc0: wkup_m3 is available
> [   32.448934] remoteproc remoteproc0: powering up wkup_m3
> [   32.448966] remoteproc remoteproc0: Booting fw image am335x-pm-firmware.elf, size 217148
> [   32.449505] remoteproc remoteproc0: remote processor wkup_m3 is now up
> [   34.709123] remoteproc remoteproc1: 4a334000.pru is available
> [   34.739825] remoteproc remoteproc2: 4a338000.pru is available
> dmesg | grep pru
> [   34.709123] remoteproc remoteproc1: 4a334000.pru is available
> [   34.709311] pru-rproc 4a334000.pru: PRU rproc node pru@4a334000 probed successfully
> [   34.739825] remoteproc remoteproc2: 4a338000.pru is available
> [   34.739979] pru-rproc 4a338000.pru: PRU rproc node pru@4a338000 probed successfully
> dmesg | grep pinctrl-single
> [    0.959120] pinctrl-single 44e10800.pinmux: 142 pins, size 568
> dmesg | grep gpio-of-helper
> [    0.972639] gpio-of-helper ocp:cape-universal: ready
> END

Changes

debian@beaglebone:~$ uname -r
4.19.94-ti-r73

debian@beaglebone:~$ cd /boot/dtbs/`uname -r`
debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$

cp am335x-boneblack.dtb am335x-boneblack.dtb.orig

# generate the dts from the dtb
dtc -I dtb -O dts -o am335x-boneblack.dts ./am335x-boneblack.dtb
… lots of output …

sudo vi am335x-boneblack.dts

 
     16         aliases {
     17                 i2c0 = "/ocp/i2c@44e0b000";
     18                 i2c1 = "/ocp/i2c@4802a000";
     19                 i2c2 = "/ocp/i2c@4819c000";
     20                 serial0 = "/ocp/serial@44e09000";
….
   1440                 i2c@4819c000 {
   1441                         compatible = "ti,omap4-i2c";
   1442                         #address-cells = < 0x01 >;
   1443                         #size-cells = < 0x00 >;
   1444                         ti,hwmods = "i2c3";
   1445                         reg = < 0x4819c000 0x1000 >;
   1446                         interrupts = < 0x1e >;
   1447                         status = "okay";
   1448                         pinctrl-names = "default";
   1449                         pinctrl-0;
   1450                         clock-frequency = < 0x186a0 >;
   1451                         symlink = "bone/i2c/2";
   1452                         phandle = < 0xaf >;


Changed line 1450 
  1450                         clock-frequency = < 0x61a80 >;


debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$ sudo dtc -I dts -O dtb -o am335x-boneblack.dtb am335x-boneblack.dts
… lots of output …

debian@beaglebone:/boot/dtbs/4.19.94-ti-r73$ sudo  reboot

However i2c-2 is still at 100 kHz

debian@beaglebone:~$ dmesg | grep i2c
[    0.327699] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    0.329266] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    1.372367] i2c /dev entries driver
[    1.679137] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[    1.681296] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz

your editing the wrong device tree, your actually booting with: am335x-boneblack-uboot-univ.dtb

You’ll need to edit this value:

You’ll find this also located under /opt/sourct/dtb*(kernel specific)/ alrealy present on your system…

Regards,

1 Like

Thanks for the response; however, I’m still having some trouble and have a couple more questions -

I don’t seem to have those files under /opt/source, so I cloned the repo you posted and modified the file.

> sudo git clone https://github.com/beagleboard/BeagleBoard-DeviceTrees.git v4.19.x-ti-overlays

Modified the file

> clock-frequency = <400000>;

I attempted to use dtc to compile the individual file similar to what I see on many forum posts, but

> debian@beaglebone:/opt/source/dtb-v4.19.x-ti-overlays/src/arm$ sudo dtc -I dts -O dtb -o am335x-boneblack.dtb am335x-boneblack.dts
> Error: am335x-boneblack.dts:7.1-9 syntax error
> FATAL ERROR: Unable to parse input tree

Then I tried the make route

> debian@beaglebone:/opt/source/dtb-v4.19.x-ti-overlays$ sudo make clean
>  CLEAN   src/arm & src/arm/overlays
debian@beaglebone:/opt/source/dtb-v4.19.x-ti-overlays$ sudo make all_arm
... 
  DTC     src/arm/am335x-boneblack.dtb
...
...
  DTC     src/arm/am335x-boneblack-uboot.dtb
...
  DTC     src/arm/am335x-boneblack-uboot-univ.dtb
...
  DTC     src/arm/am335x-bone.dtb
  DTC     src/arm/am335x-bone-uboot-univ.dtb
  DTC     src/arm/am335x-boneblack-wireless.dtb
...
  DTC     src/arm/overlays/BONE-I2C2.dtbo
...
  DTC     src/arm/overlays/BONE-I2C1.dtbo
...
  DTC     src/arm/overlays/BONE-I2C2A.dtbo
...
  DTC     src/arm/overlays/BB-I2C2-BME680.dtbo
...
  DTC     src/arm/overlays/BONE-I2C3.dtbo

debian@beaglebone:/opt/source/dtb-v4.19.x-ti-overlays$ sudo make install_arm
# install Device Tree
mkdir -p /boot/dtbs/4.19.94-ti-r73/
cp -v src/arm/*.dtb /boot/dtbs/4.19.94-ti-r73/
'src/arm/am335x-abbbi.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-abbbi.dtb'
'src/arm/am335x-bone-uboot-univ.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bone-uboot-univ.dtb'
'src/arm/am335x-bone.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bone.dtb'
'src/arm/am335x-boneblack-audio.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-audio.dtb'
'src/arm/am335x-boneblack-bbb-exp-c.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-bbb-exp-c.dtb'
'src/arm/am335x-boneblack-bbb-exp-r.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-bbb-exp-r.dtb'
'src/arm/am335x-boneblack-bbbmini.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-bbbmini.dtb'
'src/arm/am335x-boneblack-prusuart.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-prusuart.dtb'
'src/arm/am335x-boneblack-roboticscape.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-roboticscape.dtb'
'src/arm/am335x-boneblack-uboot-univ.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-uboot-univ.dtb'
'src/arm/am335x-boneblack-uboot.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-uboot.dtb'
'src/arm/am335x-boneblack-wireless-roboticscape.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-wireless-roboticscape.dtb'
'src/arm/am335x-boneblack-wireless.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-wireless.dtb'
'src/arm/am335x-boneblack-wl1835mod.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack-wl1835mod.dtb'
'src/arm/am335x-boneblack.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblack.dtb'
'src/arm/am335x-boneblue.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-boneblue.dtb'
'src/arm/am335x-bonegreen-gateway.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bonegreen-gateway.dtb'
'src/arm/am335x-bonegreen-wireless-uboot-univ.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bonegreen-wireless-uboot-univ.dtb'
'src/arm/am335x-bonegreen-wireless.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bonegreen-wireless.dtb'
'src/arm/am335x-bonegreen.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-bonegreen.dtb'
'src/arm/am335x-osd3358-sm-red-v4.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-osd3358-sm-red-v4.dtb'
'src/arm/am335x-osd3358-sm-red.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-osd3358-sm-red.dtb'
'src/arm/am335x-pocketbeagle.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-pocketbeagle.dtb'
'src/arm/am335x-sancloud-bbe-uboot-univ.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-sancloud-bbe-uboot-univ.dtb'
'src/arm/am335x-sancloud-bbe-uboot.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-sancloud-bbe-uboot.dtb'
'src/arm/am335x-sancloud-bbe.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am335x-sancloud-bbe.dtb'
'src/arm/am5729-beagleboneai-roboticscape.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am5729-beagleboneai-roboticscape.dtb'
'src/arm/am5729-beagleboneai.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am5729-beagleboneai.dtb'
'src/arm/am57xx-beagle-x15-revb1.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am57xx-beagle-x15-revb1.dtb'
'src/arm/am57xx-beagle-x15-revc.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am57xx-beagle-x15-revc.dtb'
'src/arm/am57xx-beagle-x15.dtb' -> '/boot/dtbs/4.19.94-ti-r73/am57xx-beagle-x15.dtb'
'src/arm/dra71-evm.dtb' -> '/boot/dtbs/4.19.94-ti-r73/dra71-evm.dtb'
'src/arm/dra72-evm.dtb' -> '/boot/dtbs/4.19.94-ti-r73/dra72-evm.dtb'
'src/arm/omap5-uevm.dtb' -> '/boot/dtbs/4.19.94-ti-r73/omap5-uevm.dtb'
# install DT overlays
mkdir -p /boot/dtbs/4.19.94-ti-r73/overlays/
cp -v src/arm/overlays/*.dtbo /boot/dtbs/4.19.94-ti-r73/overlays
'src/arm/overlays/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo'
'src/arm/overlays/BB-ADC-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-ADC-00A0.dtbo'
'src/arm/overlays/BB-BBBW-WL1835-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BBBW-WL1835-00A0.dtbo'
'src/arm/overlays/BB-BBGG-WL1835-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BBGG-WL1835-00A0.dtbo'
'src/arm/overlays/BB-BBGW-WL1835-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BBGW-WL1835-00A0.dtbo'
'src/arm/overlays/BB-BONE-4D4C-01-00A1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-4D4C-01-00A1.dtbo'
'src/arm/overlays/BB-BONE-4D5R-01-00A1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-4D5R-01-00A1.dtbo'
'src/arm/overlays/BB-BONE-LCD4-01-00A1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-LCD4-01-00A1.dtbo'
'src/arm/overlays/BB-BONE-NH7C-01-A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-NH7C-01-A0.dtbo'
'src/arm/overlays/BB-BONE-eMMC1-01-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-BONE-eMMC1-01-00A0.dtbo'
'src/arm/overlays/BB-CAPE-DISP-CT4-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-CAPE-DISP-CT4-00A0.dtbo'
'src/arm/overlays/BB-CTAG-SW-8CH-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-CTAG-SW-8CH-00A0.dtbo'
'src/arm/overlays/BB-HDMI-TDA998x-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-HDMI-TDA998x-00A0.dtbo'
'src/arm/overlays/BB-I2C2-BME680.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-I2C2-BME680.dtbo'
'src/arm/overlays/BB-SPIDEV0-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-SPIDEV0-00A0.dtbo'
'src/arm/overlays/BB-SPIDEV1-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-SPIDEV1-00A0.dtbo'
'src/arm/overlays/BB-W1-P9.12-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BB-W1-P9.12-00A0.dtbo'
'src/arm/overlays/BBAI-4D4C-00A1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-4D4C-00A1.dtbo'
'src/arm/overlays/BBAI-AUDI-02-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-AUDI-02-00A0.dtbo'
'src/arm/overlays/BBAI-PR1_UART0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PR1_UART0.dtbo'
'src/arm/overlays/BBAI-PR2_UART0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PR2_UART0.dtbo'
'src/arm/overlays/BBAI-PRUIN_PRU1_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUIN_PRU1_0.dtbo'
'src/arm/overlays/BBAI-PRUIN_PRU1_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUIN_PRU1_1.dtbo'
'src/arm/overlays/BBAI-PRUIN_PRU2_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUIN_PRU2_0.dtbo'
'src/arm/overlays/BBAI-PRUIN_PRU2_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUIN_PRU2_1.dtbo'
'src/arm/overlays/BBAI-PRUOUT_PRU1_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUOUT_PRU1_0.dtbo'
'src/arm/overlays/BBAI-PRUOUT_PRU1_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUOUT_PRU1_1.dtbo'
'src/arm/overlays/BBAI-PRUOUT_PRU2_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUOUT_PRU2_0.dtbo'
'src/arm/overlays/BBAI-PRUOUT_PRU2_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRUOUT_PRU2_1.dtbo'
'src/arm/overlays/BBAI-PRU_eCAP.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-PRU_eCAP.dtbo'
'src/arm/overlays/BBAI-SPI0_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-SPI0_1.dtbo'
'src/arm/overlays/BBAI-eCAP1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-eCAP1.dtbo'
'src/arm/overlays/BBAI-eCAP2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-eCAP2.dtbo'
'src/arm/overlays/BBAI-eCAP2A.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-eCAP2A.dtbo'
'src/arm/overlays/BBAI-eCAP3.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-eCAP3.dtbo'
'src/arm/overlays/BBAI-eCAP3A.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBAI-eCAP3A.dtbo'
'src/arm/overlays/BBB-PRU_eCAP.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBB-PRU_eCAP.dtbo'
'src/arm/overlays/BBB-eCAP0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBB-eCAP0.dtbo'
'src/arm/overlays/BBB-eCAP2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBB-eCAP2.dtbo'
'src/arm/overlays/BBORG_COMMS-00A2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_COMMS-00A2.dtbo'
'src/arm/overlays/BBORG_FAN-A000.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_FAN-A000.dtbo'
'src/arm/overlays/BBORG_LOAD-00A2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_LOAD-00A2.dtbo'
'src/arm/overlays/BBORG_MOTOR-00A2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_MOTOR-00A2.dtbo'
'src/arm/overlays/BBORG_RELAY-00A2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_RELAY-00A2.dtbo'
'src/arm/overlays/BBORG_SERVO-00A2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BBORG_SERVO-00A2.dtbo'
'src/arm/overlays/BONE-ADC.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-ADC.dtbo'
'src/arm/overlays/BONE-BACKLIGHT.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-BACKLIGHT.dtbo'
'src/arm/overlays/BONE-CAN0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-CAN0.dtbo'
'src/arm/overlays/BONE-CAN1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-CAN1.dtbo'
'src/arm/overlays/BONE-I2C1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C1.dtbo'
'src/arm/overlays/BONE-I2C2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C2.dtbo'
'src/arm/overlays/BONE-I2C2A.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C2A.dtbo'
'src/arm/overlays/BONE-I2C3.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C3.dtbo'
'src/arm/overlays/BONE-LED_P8_03.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-LED_P8_03.dtbo'
'src/arm/overlays/BONE-LED_P9_11.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-LED_P9_11.dtbo'
'src/arm/overlays/BONE-PRU_eCAP.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-PRU_eCAP.dtbo'
'src/arm/overlays/BONE-PWM0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-PWM0.dtbo'
'src/arm/overlays/BONE-PWM1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-PWM1.dtbo'
'src/arm/overlays/BONE-PWM2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-PWM2.dtbo'
'src/arm/overlays/BONE-SPI0_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-SPI0_0.dtbo'
'src/arm/overlays/BONE-SPI1_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-SPI1_0.dtbo'
'src/arm/overlays/BONE-SPI1_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-SPI1_1.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_0.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_1.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_2.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_3.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_3.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_4.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_4.dtbo'
'src/arm/overlays/BONE-TIMER_PWM_5.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-TIMER_PWM_5.dtbo'
'src/arm/overlays/BONE-UART1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-UART1.dtbo'
'src/arm/overlays/BONE-UART2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-UART2.dtbo'
'src/arm/overlays/BONE-UART3.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-UART3.dtbo'
'src/arm/overlays/BONE-UART4.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-UART4.dtbo'
'src/arm/overlays/BONE-UART5.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-UART5.dtbo'
'src/arm/overlays/BONE-eMMC.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-eMMC.dtbo'
'src/arm/overlays/BONE-eQEP0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-eQEP0.dtbo'
'src/arm/overlays/BONE-eQEP1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-eQEP1.dtbo'
'src/arm/overlays/BONE-eQEP2.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-eQEP2.dtbo'
'src/arm/overlays/BONE-eQEP2A.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BONE-eQEP2A.dtbo'
'src/arm/overlays/BW-ICE40Cape-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BW-ICE40Cape-00A0.dtbo'
'src/arm/overlays/BW-ICE40Cape-00A0_LKM.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/BW-ICE40Cape-00A0_LKM.dtbo'
'src/arm/overlays/M-BB-BBG-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/M-BB-BBG-00A0.dtbo'
'src/arm/overlays/M-BB-BBGG-00A0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/M-BB-BBGG-00A0.dtbo'
'src/arm/overlays/PB-MIKROBUS-0.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/PB-MIKROBUS-0.dtbo'
'src/arm/overlays/PB-MIKROBUS-1.dtbo' -> '/boot/dtbs/4.19.94-ti-r73/overlays/PB-MIKROBUS-1.dtbo'

Rebooted

But it is still at 100 kHz

debian@beaglebone:/opt/source/dtb-v4.19.x-ti-overlays$ dmesg | grep i2c
[    0.327760] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[    0.329329] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[    1.369504] i2c /dev entries driver
[    1.675057] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/tps65217-pwrbutton/input/input0
[    1.677213] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz

I’m not sure how to get the /boot/…/.dtbo to take effect? Is this done with the /sys/devices/bone_capemgr slots files? introduction-to-the-beaglebone-black-device-tree.pdf (I don’t seem to have bone_capemgr files currently and didn’t see where to activate them)

I was thinking the make install would produce *.dts and copy to /boot/dtbs/4.19.94-ti-r73/.

A related question - In /lib/firmware/ there is BB-I2C1-FAST-00A0.dtbo and BB-I2C2-FAST-00A0.dtbo files in ```/lib/firmware/````. Is there a configuration setting to activate these files to get 400kHz?

1 Like

@CPrince ,

in uEnv.txt, there is a location in it and you can place your compiled .dts files in those locations.

So, if you have a .dtbo file you already compiled, it would go in /boot/uEnv.txt. This is one way of doing things w/ the am335x supported BBB.

Seth

P.S. Have you tried to add those or at least one of the .dtbo files you listed in /boot/uEnv.txt yet?

These would be used in /boot/uEnv.txt under the overlays sections.

I think this might be a point of confusion for me, I’m not too clear on the process.

Is changing the i2c baud rate adding a new feature or changing the configuration of an existing feature? I thought that in this process, I would be modifying an existing configuration file or adding a file to a folder that is all loaded rather than specifying individual files.

There are multiple i2c-2 related files -

Three new files were generated by modifying am335x-bone-common.dtsi and one existing file in /lib/firmware

  • /boot/dtbs/4.19.94-ti-r73/overlays/BB-I2C2-BME680.dtbo
  • /boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C2.dtbo
  • /boot/dtbs/4.19.94-ti-r73/overlays/BONE-I2C2A.dtbo
  • /lib/firmware/BB-I2C2-FAST-00A0.dtbo

So which .dtbo file should be added to the /boot/uEnv.txt? (all 4?) What type of cape is the built-in i2c-2 bus?

> debian@beaglebone:/boot$ less -N ./uEnv.txt
> ...
>      12 ###Overide capes with eeprom
>      13 #uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
>      14 #uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
>      15 #uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
>      16 #uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
>      17 ###
>      18 ###Additional custom capes
>      19 #uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
>      20 #uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
>      21 #uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
>      22 #uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
>      23 ###
>      24 ###Custom Cape
>      25 #dtb_overlay=/lib/firmware/<file8>.dtbo
>      26 ###
> ...
>      53 ###U-Boot Overlays###
>      54
> ...

I appreciate all the replies, i know i have lots of questions.

Hello @CPrince ,

Seth here again. I say ask and ask away. Now, w/ my limited experience that is generalized, I can only answer so much…

But!

If you want to make a .dts file and try to compile it, good on you. If you are just using the already written .dts files and compiling them, that is okay too.

Right now, I do not know what the BB-I2C2-FAST-00A0.dtbo files entails or its contents. I will research this idea and get back to you.

w/ your command, less -N ./uEnv.txt , line 13 through line 16 can be used to add in a .dtbo file like the one you are looking to use.

If you think that the files, all four files, would not interfere w/ one another, go for it. Just remember this though…

  1. If something odd happens…
    a. It could be that interference is taking place
    b. This interference is or may be two .dtbo files in /boot/uEnv.txt that allocate the same muxing
  2. Build!

Seth

P.S. Off to look up the file for FAST-I2C2!

Hello @CPrince ,

I do not see the file for kernel 5.10.x @ src/arm/overlays · v5.10.x-ti-unified · BeagleBoard.org / BeagleBoard-DeviceTrees · GitLab .

So, this may be a small setback for now. But, if you are using another version of the kernel or a different DeviceTrees source, it may be listed like you stated.

Seth

P.S. For now, I am trying to catch up to what is added, enabled, and ready. Outside of those ideas, I may not be of anymore assistance as of now.

If you do not mind, will you please give these command outputs?

  1. uname -a
  2. cat /etc/dogtag

Hello @CPrince ,

Just some updates here…

I tried aufs for building a kernel. No go so far. I guess I will try your method…

Also:

  1. uname -a
  2. cat /etc/dogtag

Those two commands will give me a better idea of what is going on during your build…

I will keep searching the logs and DeviceTrees source for when this idea was available for i2s.

Seth

P.S. If you have gotten closer to adding in the (M) instead of the (*) modules in runtime, good. If not, I am still trying over here to bring on a build and i2s for the am335x supported BBB.

@CPrince : I totally forgot how this forum works. No posting past two posts inline. So, I just threw my arms up and was done earlier. There was something that I just remembered that I wanted to show you:

  1. Sensors — BeagleBoard Documentation

Also…this bit of info. may provide some assistance:

pcm.!default {
  type plug
  slave {
    pcm "hw:1,0"
  }
}
ctl.!default {
  type hw
  card 1
}

That bit of text goes in ~/.asoundrc

This may help since the files are already on your board and image.

Not sure what the issue is, the “fast” overlay changes one thing, i2c clock-frequency

clock-frequency = <400000>;

Regards,

1 Like

The issue in short, is that the process of changing the one .dts file generated 3 dtbo files that seem to be i2c related, these file then need to be applied in the the configuration some how.

However, it looks like the dts file doesn’t need to be changed at all. There is an /lib/firmware/BB-I2C2-FAST-00A0.dtbo. As it turns out, adding this as one of the capes in /boot/uEnv.txt seems to work.

(Next issue is that i2cdetect, doesn’t detect any devices, but I can see responses from the devices on the logic analyzer. But i2c-tools are not always reliable)

1 Like