Dear IMX Community,
Am using the I2C1 Bus for configuring the EEPROM (CAT24C08) & RTC (PCF8563) & did the following changes as below, but when I checked the logs, I2C device registration is getting failed, could you please let me know any other configuration needs to be done or any thing needs to be changed for getting registered , could you please kindly do the needful as am stuck with this issue from 2 days :smileysad:
Am using L2.6.35_10.12.01_ER_source I.MX28 BSP's for my custom board
Any help would be greatly appreciated
Thanks in advance,
For EEPROM:
=======================================================================================================
Device Driver
Misc devices
EEPROM support --->
<*> I2C EEPROMs from most vendors
FOR RTC:
=====================================================================================================
Device Drivers --->
<*> Real Time Clock --->
<*> Philips PCF8563/Epson RTC8564
For I2C BUS DRIVER:
=======================================================================================================
Device Driver
<*> I2C support --->
Enable I2C1 module
Board file changes /linux-2.6.35.3/arch/arm/mach-mx28/mx28evk.c :
=======================================================================================================
static struct at24_platform_data eepromat24c08 = {
.byte_len = SZ_8K / 8, // 1024 BYTES (EEPROM SIZE IN BYTES) = 1024*8 = 8192 bits = 1 Kb
.page_size = 16, // PAGE SIZE IN BYTES FOR WRITES , total 64 pages of 16 bytes = 8192 bits = 1Kb
};
static struct i2c_board_info __initdata mxs_i2c_device[] = {
// { I2C_BOARD_INFO("sgtl5000-i2c", 0xa), .flags = I2C_M_TEN },
// EEPROM
{
I2C_BOARD_INFO("24c08", 0x50), .flags = I2C_M_TEN,
.platform_data = &eepromat24c08,
},
//RTC
{ I2C_BOARD_INFO("pcf8563", 0x51), .flags = I2C_M_TEN }
};
static void __init i2c_device_init(void)
{
i2c_register_board_info(0, mxs_i2c_device, ARRAY_SIZE(mxs_i2c_device));
i2c_register_board_info(1, mxs_i2c_device, ARRAY_SIZE(mxs_i2c_device));
}
PAD CONFIGURATION for I2C1:(arch/arm/mach-mx28/mx28evk_pins.c):
=======================================================================================================
{
.name = "I2C1_SCL",
.id = PINID_I2C1_SCL,
.fun = PIN_FUN2,
.strength = PAD_8MA,
.voltage = PAD_3_3V,
.drive = 1,
},
{
.name = "I2C1_SDA",
.id = PINID_I2C1_SDA,
.fun = PIN_FUN2,
.strength = PAD_8MA,
.voltage = PAD_3_3V,
.drive = 1,
},
Using CHIP DRIVER file for EEPROM (drivers/misc/eeprom/at24.c) & for RTC (/drivers/rtcrtc-pcf8563.c)
==============================================
Kernel logs w.r.t I2C1
i2c i2c-1: Failed to register i2c client dummy at 0x51 (-16)
at24 1-0050: address 0x51 unavailable
at24: probe of 1-0050 failed with error -98
Many Thanks in advance,