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 base address

Other Parts Discussed in Thread: DM8107

Hi,

What are the base addresses for the i2c buses for the dm8168 evm board?

I have no problem in accessing the i2c[0] bus and would now like to access the slaves on the i2c[1] bus on the dm8168 evm board.

Thanks.

  • Hi Wei Thiam,

    You can find it from DM8168 datasheet (Section 2.10.2 L4 Memory Map)

    http://www.ti.com/lit/ds/symlink/tms320dm8168.pdf

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil

    My code hangs when it tried to read i2c[1] registers, (I2c_CON and I2C_PSC) while it has no problem accessing i2c[0] registers.

    Is there any initialization for i2c[1] that I need to do? Any thing I can check with my dm8168 evm board?

    Thanks.

     

  • Hi Neo,

    Why are you modifiying the I2C registers? Driver is already present in the kernel, just we have to use the standard kernel API's to get the I2C functionality.

    Which slave (address) you are trying to access from I2C1?

    If you are trying to access a salve which is not listed on this array(ti816x_i2c_boardinfo1) then you have to add (arch/arm/mach-omap2/board-ti8168evm.c)

    Append this entry to ti816x_i2c_boardinfo1 array

    I2C_BOARD_INFO(<your driver name>, <salve address>),

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil,

    I am still at the uboot environment. I am modifying the "hello world" application found in the examples/standalone folder. My objective is to write a uboot application to test some of the dm8168 peripherals. So far, accessing the absolute addresses of i2c[0] registers (0x480280A4 etc) are fine. Once my application starts to access the i2c[1] register addresses (0x4802A0A4 etc), it hangs.

    Thanks.

  • Hi Neo,

    You have to enable the clock for I2C1, for doing this add bellow code snippet inside peripheral_enable() API inside "board/ti/ti8168/evm.c" file.

    /* I2C1 */
    __raw_writel(0x2, CM_ALWON_I2C_1_CLKCTRL);
    while(__raw_readl(CM_ALWON_I2C_1_CLKCTRL) != 0x2);

    And define CM_ALWON_I2C_1_CLKCTRL inside "arch/arm/include/asm/arch-ti81xx/cpu.h" file

    #define CM_ALWON_I2C_1_CLKCTRL          (PRCM_BASE + 0x1568)

    Then you can able to access I2C1 address space.

    Regards

    AnilKumar

    Please mark this Forum post as answered via the Verify Answer button below if it helps answer your question.  Thanks!

  • Hi Anil,

    I got the application working after the changes.

    Thanks!

  • Hi All,


              we are interfacing I2C CapSense module with I2C of DM8107, In that module ,CY8C20066 chip was used.We need to get i2c output from that module and that is to be given as input to I2c of DM8107 and process it.For that what are the things we need to do in code wise.Pls suggest us..