This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

i2c on u boot for beagle

Hello,

We are using  i2c_read, i2c_write to talk to EEPROM in the U boot terminal. Somehow the read and write doesnot seem to work properly. Is there any other initialisations that needs to  be done for these functions to execute apart from i2c_init.

Also how to do the same from shell prompt.

  • Hi,

    Did you define the following in your board file,

    #define CONFIG_SOFT_I2C /* Always defined for software I2C support */
    #define I2C_INIT /* initialize your software i2c */
    #define I2C_ACTIVE /* activate SDA */
    #define I2C_TRISTATE /* deactivate SDA */
    #define I2C_READ /* read SDA */
    #define I2C_SDA(bit) /* set SDA to <bit> */
    #define I2C_SCL(bit) /* set SCL to <bit> */
    #define I2C_DELAY /* delay some time */
     
    #define CONFIG_SYS_I2C_SPEED /* default speed (in HZ) */
    #define CONFIG_SYS_I2C_SLAVE 0
    And #define CONFIG_CMD_I2C for CMD

    For setting the above look into some confiig files and set yours appropriately, and you should get going


    Thx,
    --Prabhakar Lad