Re: [beagleboard] Re: i2c bus speed

2018-03-22 Thread yassyass
I was on the IRC a little while ago and was told to modify the 
am335x-boneblack-uboot.dtb file instead as these newer releases are Uboot 
releases.
Doing so actually solved my issue of not being able to change the i2c 
frequency of i2c-2.

Big shout out to zmatt for the help!



On Friday, March 23, 2018 at 2:37:48 PM UTC+13, yassyass wrote:
>
>
> Heres the boot log:
> https://pastebin.com/fgkRkCRv
>
> It seems to say that the I2C busses are set at 100 kHz because "could not 
> find pctldev for node 
> /ocp/l4_wkup@44c0/scm@21/pinmux@800/pinmux_i2c2_pins"
>
> On Thursday, March 22, 2018 at 2:49:01 AM UTC+13, RobertCNelson wrote:
>>
>> On Wed, Mar 21, 2018 at 12:47 AM,   wrote: 
>> > I am having the same issue with my BBB. Modifying the device tree with 
>> > values that should run the I2C clock to 400 kHz does not seem to change 
>> the 
>> > speed upon rebooting. I validated that the .dtb was modified by 
>> unpacking it 
>> > into a .dts again to check if the value was 400 kHz. 
>> > 
>> > Is this method of modifying the device tree not effective anymore in 
>> the 
>> > latest images of Debian? 
>>
>> Check your serial boot log, are you booting what you expect? 
>>
>> Regards, 
>>
>> -- 
>> Robert Nelson 
>> https://rcn-ee.com/ 
>>
>

-- 
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/2edb8939-5a19-47b9-8e1a-2cf6f5ed0d64%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: i2c bus speed

2018-03-22 Thread yasirhilali

Heres the boot log:
https://pastebin.com/fgkRkCRv

It seems to say that the I2C busses are set at 100 kHz because "could not 
find pctldev for node 
/ocp/l4_wkup@44c0/scm@21/pinmux@800/pinmux_i2c2_pins"

On Thursday, March 22, 2018 at 2:49:01 AM UTC+13, RobertCNelson wrote:
>
> On Wed, Mar 21, 2018 at 12:47 AM,   
> wrote: 
> > I am having the same issue with my BBB. Modifying the device tree with 
> > values that should run the I2C clock to 400 kHz does not seem to change 
> the 
> > speed upon rebooting. I validated that the .dtb was modified by 
> unpacking it 
> > into a .dts again to check if the value was 400 kHz. 
> > 
> > Is this method of modifying the device tree not effective anymore in the 
> > latest images of Debian? 
>
> Check your serial boot log, are you booting what you expect? 
>
> Regards, 
>
> -- 
> Robert Nelson 
> https://rcn-ee.com/ 
>

-- 
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/f6740f70-0b6e-47f1-ae01-01e7c9f05d71%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: i2c bus speed

2018-03-21 Thread Robert Nelson
On Wed, Mar 21, 2018 at 12:47 AM,   wrote:
> I am having the same issue with my BBB. Modifying the device tree with
> values that should run the I2C clock to 400 kHz does not seem to change the
> speed upon rebooting. I validated that the .dtb was modified by unpacking it
> into a .dts again to check if the value was 400 kHz.
>
> Is this method of modifying the device tree not effective anymore in the
> latest images of Debian?

Check your serial boot log, are you booting what you expect?

Regards,

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

-- 
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/CAOCHtYiHuv6JsiO5z%3DL6HBB6MhMU7qdPX%2BxQaAkYonRM03j84g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: i2c bus speed

2018-03-21 Thread yasirhilali
I am having the same issue with my BBB. Modifying the device tree with 
values that should run the I2C clock to 400 kHz does not seem to change the 
speed upon rebooting. I validated that the .dtb was modified by unpacking 
it into a .dts again to check if the value was 400 kHz.

Is this method of modifying the device tree not effective anymore in the 
latest images of Debian?

-- 
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/307175c1-931e-492f-aeea-9e8353f5cc84%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: i2c bus speed

2017-12-16 Thread Davide Aguiari
Following your example I'm trying to set 400KHz on my i2c-1 too. I have a 
Beaglebone Black WIRELESS that loads am335x-boneblack-uboot.dtb as overlay.

UBOOT: https://pastebin.com/hA4RbNUm

1) Decompilation: dtc -I dtb -O dts -o am335x-boneblack-uboot.dts 
am335x-boneblack-uboot.dtb
2) Actually my i2c-1 is disabled. *WHY*?

i2c@4802a000 {
> compatible = "ti,omap4-i2c";
> #address-cells = <0x1>;
> #size-cells = <0x0>;
> ti,hwmods = "i2c2";
> reg = <0x4802a000 0x1000>;
> interrupts = <0x47>;
> status = "disabled";
> linux,phandle = <0xa6>;
> phandle = <0xa6>;
> };


I edited it with 

status = "okay";
> clock-frequency = <0x61A80>;
>

3) Compiling: root@beaglebone:/boot/dtbs/4.4.91-ti-r139# dtc -I dts -O dtb 
-o am335x-boneblack-uboot.dtb am335x-boneblack-uboot.dts
4) Reboot
> i2c-2 still 100KHz. Why?

debian@beaglebone:~$ dmesg | grep i2c
[1.617222] omap_i2c 44e0b000.i2c: could not find pctldev for node 
/ocp/l4_wkup@44c0/scm@21/pinmux@800/pinmux_i2c0_pins, deferring 
probe
[1.618167] omap_i2c 4802a000.i2c: bus 1 rev0.11 at 100 kHz
[1.619474] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 100 kHz
[2.341082] i2c /dev entries driver
[2.572081] input: tps65217_pwr_but as 
/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0024/input/input0
[2.598709] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz


-- 
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/24e3e6bb-0701-4dee-b55e-1aba149b3656%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: i2c bus speed

2017-10-24 Thread eduards66 via BeagleBoard
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//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@44c0/scm@21/pinmux@800/pinmux_i2c0_pins, deferring 
probe
[1.534964] omap_i2c 4819c000.i2c: could not find pctldev for node 
/ocp/l4_wkup@44c0/scm@21/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 40 on kernel 4.4.68-ti-r106 on 
> a Beaglebone Green wireless without recompiling the kernel.
> I have modified clock to 40 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@44c0/scm@21/pinmux@800/pinmux_i2c0_pins, deferring 
> probe
> [1.534938] omap_i2c 4819c000.i2c: could not find pctldev for node 
> /ocp/l4_wkup@44c0/scm@21/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 40. 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 40
>>
>> 2. recompiling the kernel (after modifying i2c-core.c).
>> in i2c_parse_fw_timings() i set t->bus_freq to 40 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.


[beagleboard] Re: i2c bus speed

2017-10-24 Thread eduards66 via BeagleBoard
I am trying to do the same for i2c-2 to 40 on kernel 4.4.68-ti-r106 on 
a Beaglebone Green wireless without recompiling the kernel.
I have modified clock to 40 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@44c0/scm@21/pinmux@800/pinmux_i2c0_pins, deferring 
probe
[1.534938] omap_i2c 4819c000.i2c: could not find pctldev for node 
/ocp/l4_wkup@44c0/scm@21/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 40. 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 40
>
> 2. recompiling the kernel (after modifying i2c-core.c).
> in i2c_parse_fw_timings() i set t->bus_freq to 40 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/ed60ba56-8042-48c9-825c-a5d578af0c30%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.