Olimex Support Forum

OLinuXino Android / Linux boards and System On Modules => AM3352 => Topic started by: bruceuk on May 26, 2015, 02:04:51 PM

Title: i2c1 - controller timed out
Post by: bruceuk on May 26, 2015, 02:04:51 PM
Hi

Anybody else using the i2c buses?  I'm having some trouble with timeouts.

I used this very cool web based tool to generate the i2c DTS:
https://dev.ti.com/pinmux/app.html#/default/


I'm not using i2c1 as it clashes with the ethernet which I need for network booting.

Kernel dmesg:
[    0.223869] omap_i2c 44e0b000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c0_pins, deferring probe
[    0.223918] omap_i2c 4819c000.i2c: could not find pctldev for node /ocp/l4_wkup@44c00000/scm@210000/pinmux@800/pinmux_i2c2_pins, deferring probe
[    1.067544] i2c /dev entries driver
[    1.251443] omap_i2c 44e0b000.i2c: bus 0 rev0.11 at 400 kHz
[    1.261585] omap_i2c 4819c000.i2c: bus 2 rev0.11 at 400 kHz



Shell session showing the timeout:

#
# i2cdetect -l
i2c-0   i2c             OMAP I2C adapter                        I2C adapter
i2c-2   i2c             OMAP I2C adapter                        I2C adapter
#
# i2cdetect -r -y 0
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --                         
#
# i2cdetect -r -y 2
     0  1  2  3  4  5  6  7  8  9  a  b  c  d  e  f
00:          [55942.158243] omap_i2c 4819c000.i2c: controller timed out
-- [55943.178248] omap_i2c 4819c000.i2c: controller timed out
-- [55944.198248] omap_i2c 4819c000.i2c: controller timed out
-- [55945.238984] omap_i2c 4819c000.i2c: controller timed out
-- ^C[55946.278232] omap_i2c 4819c000.i2c: controller timed out

#



Nothing connected to any of the i2c pins on the evb.....in fact nothing connected to the evb besides the uart cable for the console.



My DTS (am335x-bone-common.dtsi):
        i2c0_pins: pinmux_i2c0_pins {
                pinctrl-single,pins = <
                        0x188 (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_sda.i2c0_sda */
                        0x18c (PIN_INPUT_PULLUP | MUX_MODE0)    /* i2c0_scl.i2c0_scl */
                >;
        };

        i2c2_pins: pinmux_i2c2_pins {
                pinctrl-single,pins = <
                        0x17c ( PIN_INPUT | MUX_MODE3 ) /* (D17) uart1_rtsn.I2C2_SCL */
                        0x178 ( PIN_INPUT | MUX_MODE3 ) /* (D18) uart1_ctsn.I2C2_SDA */
                >;
        };


.........
&i2c0 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c0_pins>;

        status = "okay";
        clock-frequency = <400000>;

        tps: tps@24 {
                reg = <0x24>;
        };

};
&i2c2 {
        pinctrl-names = "default";
        pinctrl-0 = <&i2c2_pins>;

        status = "okay";
        clock-frequency = <400000>;

};


Perhaps my i2c2 is clashing with the uart1 that is defined in (am33xx.dtsi)

                uart1: serial@48022000 {
                        compatible = "ti,omap3-uart";
                        ti,hwmods = "uart2";
                        clock-frequency = <48000000>;
                        reg = <0x48022000 0x2000>;
                        interrupts = <73>;
                        status = "disabled";
                        dmas = <&edma 28>, <&edma 29>;
                        dma-names = "tx", "rx";
                };








Any ideas?


Thanks
Bruce