Hi,
I think I have configured i2c-0 and i2c-2 correctly but maybe not; as i2c-2 at the moment is not reading...
For i2c-2 I have
D17 (I2C2_SCL, mode 3) and D18 (I2C2_SDA, mode 3)
Kernel built OK without error and I could see
root@localhost:~#ls /dev/i2c*
i2c-0
i2c-2
Also this:
root@localhost:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pinmux-pins
...
pin 94 (44e10978.0): 4819c000.i2c (GPIO UNCLAIMED) function pinmux_i2c2_pins group pinmux_i2c2_pins
pin 95 (44e1097c.0): 4819c000.i2c (GPIO UNCLAIMED) function pinmux_i2c2_pins group pinmux_i2c2_pins
...
pin 98 (44e10988.0): 44e0b000.i2c (GPIO UNCLAIMED) function pinmux_i2c0_pins group pinmux_i2c0_pins
pin 99 (44e1098c.0): 44e0b000.i2c (GPIO UNCLAIMED) function pinmux_i2c0_pins group pinmux_i2c0_pins
And this:
root@localhost:~# cat /sys/kernel/debug/pinctrl/44e10800.pinmux/pingroups
...
group: pinmux_i2c0_pins
pin 98 (44e10988.0)
pin 99 (44e1098c.0)
group: pinmux_i2c2_pins
pin 94 (44e10978.0)
pin 95 (44e1097c.0)
I know it's not working for me because when I plugged in a device I could see
root@localhost:~# i2cdetect -y -r 0
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- UU -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
But for I2C-2 I saw nothing
root@localhost:~# i2cdetect -y -r 2
0 1 2 3 4 5 6 7 8 9 a b c d e f
00: -- -- -- -- -- -- -- -- -- -- -- -- --
10: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
20: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
30: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
40: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
50: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
60: -- -- -- -- -- -- -- -- -- -- -- -- -- -- -- --
70: -- -- -- -- -- -- -- --
I also tried from the U-BOOT command:
U-Boot# i2c dev
Current bus is 0
U-Boot# i2c probe
Valid chip addresses: 24
U-Boot# i2c dev 2
Setting bus to 2
U-Boot# i2c probe
Valid chip addresses:
U-Boot#
I think I must have missed something and need some help...
My uboot
--------------------------------
under the am335x/mux.c I have added
static struct module_pin_mux midasos_i2c2_pin_mux[] = {
{OFFSET(uart1_ctsn), (MODE(3) | RXACTIVE | PULLUP_EN | SLEWCTRL)}, /* I2C_DATA */
{OFFSET(uart1_rtsn), (MODE(3) | RXACTIVE | PULLUP_EN | SLEWCTRL)}, /* I2C_SCLK */
{-1},
};
My device tree:
---------------------------------------
aliases {
i2c0 = "/ocp/i2c@44e0b000";
i2c2 = "/ocp/i2c@4819c000";
...};
pinmux_i2c2_pins {
pinctrl-single,pins = <0x178 0x73 0x17c 0x73>;
linux,phandle = <0x19>;
phandle = <0x19>;
};
i2c@4819c000 {
compatible = "ti,omap4-i2c";
#address-cells = <0x1>;
#size-cells = <0x0>;
ti,hwmods = "i2c3";
reg = <0x4819c000 0x1000>;
interrupts = <0x1e>;
pinctrl-names = "default";
pinctrl-0=<0x19>;
status = "okay";
};
Thanks