[U-Boot-Users] How to use I2C in uboot
arun c
arun.edarath at gmail.com
Tue Jul 17 13:13:08 CEST 2007
Hi all,
I am working on a custom omap2430 board. Its similar to
omap2430SDP. I ported uboot to that board.
I want to test the working of a keypad in uboot which is
connected through the TWL4030 power module.
My kepad registers are accessed through I2C.
omap 2430's I2C2_SCL and I2C2_SDA are
connected to 4030.
I enabled I2C in uboot.(added CFG_I2C_CMD)
the default uboot settings are given below
#if (CONFIG_COMMANDS & CFG_CMD_I2C)
#define CFG_I2C_SPEED 100
#define CFG_I2C_SLAVE 1
#define CFG_I2C_BUS 0
#define CFG_I2C_BUS_SELECT 1
#define CONFIG_DRIVER_OMAP24XX_I2C 1
#endif
I booted uboot with these settings. But reading
the chip address 0x49(using imd) gives only zeros.
0x49 is the keypad register bank address in i2c
As per datasheet of 2430 some registers are set
to values other than zero on reset. So I strongly
think my settings are wrong.
Please somebody tell me the correct way use the
I2C bus for checking the keypad in uboot.
Best regards
Arun
More information about the U-Boot
mailing list