inspired by https://quadcopterdiaries.wordpress.com/2016/03/29/changing-i2c-bus-rate-on-beaglebone-black/) Set 400kHz bitrate for i2c-2 on Beaglebone Green Wireless: 1. Decompile the /boot/dtbs/4.4.68-ti-r106# am335x-boneblack-uboot.dtb file with: dtc -I dtb -O dts -o am335x-boneblack-uboot.dts am335x-boneblack-uboot.dtb
2. Edit the source file. Look for I2C definitions with a clock-frequency parameter. 0x61A80 is 400KHz and 0x186A0 is 100KHz. Change the second I2C (the one with clock-frequency of 100KHz) to 0x61a80. 3. Recompile the source file with: /boot/dtbs/4.4.68-ti-r106# dtc -I dts -O dtb -o am335x-boneblack-uboot.dtb am335x-boneblack-uboot.dts 4. Make sure you have the proper file at /boot/dtbs/<kernel version>/am335x-boneblack.dtb (wrong extensions here won’t let your BBB boot). 5. Reboot 6. Check dmesg to verify that the I2C bus is now running at 400KHz. root@beaglebone:~# dmesg |grep i2c [ 1.534908] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe [ 1.534964] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe [ 2.138650] i2c /dev entries driver [ 2.373860] input: tps65217_pwr_but as /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/input/input0 [ 2.400992] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz [ 2.404378] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz [ 14.689395] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz On Tuesday, October 24, 2017 at 2:12:41 PM UTC-4, edua...@yahoo.com wrote: > > I am trying to do the same for i2c-2 to 400000 on kernel 4.4.68-ti-r106 on > a Beaglebone Green wireless without recompiling the kernel. > I have modified clock to 400000 in univ-bbgw-00A0.dts and run > ./install.sh(changing clock in BB-I2C1-00A0.dts and BB-I2C2-00A0.dts and > adding these capes to capemgr does not have effect). > There is the result after reboot: > 1.534882] omap_i2c 44e0b000.i2c: could not find pctldev for node > /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring > probe > [ 1.534938] omap_i2c 4819c000.i2c: could not find pctldev for node > /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring > probe > [ 2.137847] i2c /dev entries driver > [ 2.373848] input: tps65217_pwr_but as > /devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/input/input0 > [ 2.400988] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz > [ 2.404366] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz > [ 15.453692] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 400 kHz > [ 1942.909929] omap_i2c 4802a000.i2c: timeout waiting for bus ready > > But I should use "P9.19", "P9.20" for I2C at 400kHz instead of 100kHz. > Please, can somebody help solve the puzzle? > Thanks in advance! > > > > > On Friday, June 2, 2017 at 5:34:05 PM UTC-4, jhalpin100 wrote: >> >> I'm trying to set the bus speed for i2c-2 to 400000. I'm running kernel >> 4.4.68-ti-r107 on a Beaglebone Black. So farI've tried >> >> 1. modifying am335x-boneblack.dtb to set the speed to 400000 >> >> 2. recompiling the kernel (after modifying i2c-core.c). >> in i2c_parse_fw_timings() i set t->bus_freq to 400000 explicitly. >> >> Neither of these had any affect on the bus speed. >> >> I've been searching for a couple days, and can't see another way to do >> it, can the bus speed actually be changed somehow? >> >> Thanks >> >> Joe >> >> -- For more options, visit http://beagleboard.org/discuss --- You received this message because you are subscribed to the Google Groups "BeagleBoard" group. To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/bf96ba5b-3939-4880-8c25-1e385f20d81c%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.