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.

add i2c_write in first stage uboot

Other Parts Discussed in Thread: TPS56921

Hello,

We have customize board based on TI DM8148. We have TPS56921 as "12V TO 1.1V BUCK CONVERTER" for processor's voltage and according to TPS56921 datasheet, we can configure its output voltage using I2C register.

For this I want to add i2c_write support in First stage uboot of DM8148. Is there ready to use support for I2C in first stage uboot?

We are using u-boot-2010.06 in DVR RDK 4.1

  • Vaibhav,

    Vaibhav Dhingani said:
    For this I want to add i2c_write support in First stage uboot of DM8148

    Why you need to add I2C support to the 1st stage uboot (u-boot-MIN)? We have I2C support in the 2nd stage u-boot (u-boot.bin), from where you can control the TPS56921.

    TI8148_EVM#i2c -h
    i2c - I2C sub-system

    Usage:
    i2c crc32 chip address[.0, .1, .2] count - compute CRC32 checksum
    i2c loop chip address[.0, .1, .2] [# of objects] - looping read of device
    i2c md chip address[.0, .1, .2] [# of objects] - read from I2C device
    i2c mm chip address[.0, .1, .2] - write to I2C device (auto-incrementing)
    i2c mw chip address[.0, .1, .2] value [count] - write to I2C device (fill)
    i2c nm chip address[.0, .1, .2] - write to I2C device (constant address)
    i2c probe - show devices on the I2C bus
    i2c read chip address[.0, .1, .2] length memaddress - read to memory
    i2c reset - re-init the I2C Controller
    i2c speed [speed] - show or set I2C bus speed

    And we are using this I2C to switch to the higher voltage (1.1V -> 1.35V):

    TI8148_EVM#i2c mw 0x2D 0x22 0x3C

    This command works with the PMIC IC integrated in the DM8148 EVM hardware - Power Management chip TPS659113, attached to I2C0 at address 0x2D

    Regards,
    Pavel

  • Vaibhav,

    Vaibhav Dhingani said:
    For this I want to add i2c_write support in First stage uboot of DM8148. Is there ready to use support for I2C in first stage uboot?

    I tried with UART 1st stage (u-boot.min.uart) and it seems it is working fine. By default the u-boot.min.uart is 53KB, after add I2C support, the size is 57.7KB which is still less than 110KB.

    u-boot-omap3/Makefile

    elif [ "$(findstring uart,$@)" ] ; then \
                echo "#define CONFIG_UART_BOOT"    >>$(obj)include/config.h ; \
                echo "#define CONFIG_I2C"    >>$(obj)include/config.h ; \
                echo "#define CONFIG_NO_ETH"    >>$(obj)include/config.h ; \
                echo "#define CONFIG_SYS_NO_FLASH"    >>$(obj)include/config.h ; \
                echo "#define CONFIG_TI81XX_PERIPHERAL_BOOT"    >>$(obj)include/config.h; \
                echo "TI_IMAGE = u-boot.min.uart" >> $(obj)board/ti/ti8148/config.tmp;\