imx28 i2c at24c eeprom not probed.

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

imx28 i2c at24c eeprom not probed.

1,919件の閲覧回数
katte
Contributor II

Hi, Im' using 2.6.35_1.1.0_130130 BSP on my board.

I'm trying to add a 24c256 eeprom on it. I'm sure that all the hardware is ok. I have configured the board for booting from this eeprom and the system goes up without any problem.

This is what I've done:

For EEPROM:

=======================================================================================================

Device Driver

          Misc devices

                 EEPROM support  --->

                         <*> I2C EEPROMs from most vendors

 

Board file changes /linux-2.6.35_1.1.0_130130-source/arch/arm/mach-mx28/mx28evk.c :

=======================================================================================================

#include <linux/i2c/at24.h>

static struct at24_platform_data eepromat24c256 = {

        .byte_len       = SZ_256K / 8, //(EEPROM SIZE IN BYTES)

        .page_size      = 64, // PAGE SIZE IN BYTES FOR WRITES

};

static struct i2c_board_info __initdata mxs_i2c_device[] = {

  { I2C_BOARD_INFO("sgtl5000-i2c", 0xa), .flags = I2C_M_TEN },

  { I2C_BOARD_INFO("pcf8563", 0x51), },

  { I2C_BOARD_INFO("24c256", 0x50), .platform_data = &eepromat24c256,}

};

static void __init i2c_device_init(void)

{

  i2c_register_board_info(0, mxs_i2c_device, ARRAY_SIZE(mxs_i2c_device));

}

I've watched the signal on i2c bus with an oscilloscope.

The pcf and the sgtl are probed correctly without any problem, but I can't see any communication with the eeprom.

My dmesg report this:

dmesg |grep at24

at24 0-0050: probe

at24 0-0050: address 0x80 unavailable

at24: probe of 0-0050 failed with error -98

i2c-core: driver [at24] registered

dmesg |grep i2c

regulator: mxs-i2c-1: fast normal

i2c-core: driver [dummy] registered

i2c i2c-0: adapter [MXS I2C adapter] registered

i2c 0-0050: uevent

i2c i2c-0: client [24c256] registered with bus id 0-0050

i2c i2c-0: Invalid 7-bit I2C address 0x80

i2c-core: driver [at24] registered

i2c-core: driver [rtc-pcf8563] registered

i2c /dev entries driver

i2c-core: driver [dev_driver] registered

i2c-dev: adapter [MXS I2C adapter] registered as minor 0

i2c-core: driver [ir-kbd-i2c] registered

i2c-core: driver [sgtl5000-i2c] registered

i2c 0-0050: uevent

/sys/devices/platform/mxs-i2c.0/i2c-0/0-0050$ ls -la

-r--r--r--    1 root     root         4096 Jan  1 01:23 modalias

-r--r--r--    1 root     root         4096 Jan  1 01:23 name

drwxr-xr-x    2 root     root            0 Jan  1 01:23 power

lrwxrwxrwx    1 root     root            0 Jan  1 01:23 subsystem -> ../../../../../bus/i2c

-rw-r--r--    1 root     root         4096 Jan  1 01:18 uevent

I've also tryed to remove the probe of pcf and sgtl, but the eeprom still be unprobed and no signal is visible on i2c bus.

In the bsp I've added the i2c-tools and the mtd-utils.

The command mtdinfo gives me

Count of MTD devices:           0

The command i2cdetect gives me this output:

i2cdetect: error while loading shared libraries: libi2c.so.0: cannot open shared object file: No such file or directory

I've searched in the bsp for this library without success. Can you tell me where I can find this library?

Can you help me?

Thanks in advance.

ラベル(2)
0 件の賞賛
2 返答(返信)

1,094件の閲覧回数
jimmychan
NXP TechSupport
NXP TechSupport

According to your log, "at24 0-0050: address 0x80 unavailable". seems the I2C address passed not correct. You may go into the at24 driver source code to check why it get the address is 0x80 not 0x50.

0 件の賞賛

1,094件の閲覧回数
katte
Contributor II

I don't know how, but now my board can probe the eeprom.

Now my problem is that the i2cdetect, i2cget commands gives me the error : i2cdetect: error while loading shared libraries: libi2c.so.0: cannot open shared object file: No such file or directory

0 件の賞賛