olinuxino maxi, i2c not detected

Started by slashdotted, September 28, 2012, 05:08:59 PM

Previous topic - Next topic

slashdotted

hello,
I just started working with a olinuxino maxi board (rev. B). I'm using Arch and compiled a kernel (Linux/arm 3.6.0-rc2) following this tutorial -> http://www.jann.cc/2012/08/23/building_a_kernel_3_x_for_the_olinuxino_from_sources.html.
Unfortunately I'm unable to get the i2c controller detected. In the kernel configuration I enabled support for I2C_MXS:

CONFIG_MXS_HAVE_PLATFORM_MXS_I2C=y
CONFIG_REGMAP_I2C=y
CONFIG_OF_I2C=y
CONFIG_I2C=y
CONFIG_I2C_BOARDINFO=y
CONFIG_I2C_COMPAT=y
CONFIG_I2C_CHARDEV=y
CONFIG_I2C_HELPER_AUTO=y
CONFIG_I2C_MXS=y
CONFIG_I2C_DEBUG_CORE=y
CONFIG_I2C_DEBUG_ALGO=y
CONFIG_I2C_DEBUG_BUS=y
CONFIG_SND_SOC_I2C_AND_SPI=y


(full config available at http://pastebin.com/ANt2x4g3 )

but i2cdetect -l does not list anything, and there are no i2c devices in /dev or /sys/class/i2c-dev/

From dmesg | grep i2c I get:

[root@ska ~]# dmesg | grep i2c
[    0.120000] i2c-core: driver [dummy] registered
[    1.230000] i2c /dev entries driver
[    1.700000] i2c-core: driver [sgtl5000] registered


I am missing something?

Thank you very much for your help!

Amos


dpwhittaker

Did you enable i2c in the device tree?  Arch/arm/boot... somewhere in there is an imx233.dtsi and olinuxino.DTS - something like that.  I don't have my build computer with me at work.  Edit the DTS to match the dtsi with enabled="true"... Sorry for being short on details, but see if that points you in the right direction.

davidjf2001

I don't see /dev/i2c either until I modprobe i2c-dev.

Fadil Berisha

Quote from: slashdotted on September 28, 2012, 05:08:59 PM

[root@ska ~]# dmesg | grep i2c
[    0.120000] i2c-core: driver [dummy] registered
[    1.230000] i2c /dev entries driver
[    1.700000] i2c-core: driver [sgtl5000] registered




Hi Amos,

I am working on i2c support on olinuxino with kernel 3.x. Patch is published at http://pastebin.com/HrgB1hAW and  final fixes are at https://www.olimex.com/forum/index.php?topic=16.msg496#msg496. My results are as follow:
[    0.130000] i2c-core: driver [dummy] registered
[    0.470000] i2c i2c-0: adapter [MXS I2C adapter] registered
[    0.480000] i2c 0-000a: uevent
[    0.480000] i2c i2c-0: client [sgtl5000] registered with bus id 0-000a
[    0.480000] i2c 0-0051: uevent
[    0.480000] i2c i2c-0: client [24c32] registered with bus id 0-0051
[    0.950000] imx23-pinctrl 80018000.pinctrl: pin I2C_SCL already requested by 80058000.i2c; cannot claim for 8006c000.serial
[    1.200000] i2c /dev entries driver
[    1.200000] i2c-dev: adapter [MXS I2C adapter] registered as minor 0
[    1.300000] i2c-core: driver [sgtl5000] registered

Can you get time to test?

Regards
Fadil Berisha