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.

AM5708: Using TPS62361B AVS on AM570x

Part Number: AM5708
Other Parts Discussed in Thread: TPS62361B, TPS62362, DRA718, LP8733

Hello,

I'm trying to get the TPS62361B working in combination with the AM5708 in u-boot. We have a total of 3 devices (i2c1, i2c3 and i2c4) connected.

There is a tps62362 driver available. But it looks like it has a slightly different interface to the lp873x driver we are currently using. There is also no mention of it in the configuration (Kconfig). Is this an older to be set to tobsolete driver perhaps?

I also found some defines regarding the tps62361 in "arch/arm/include/asm/arch-omap5/clock.h" which seems to imply a different way of using the device then the lp87x which uses configuration data from the device tree.

My question is what is the quickest way to get the TPS62361B working under u-boot? Out u-boot is based on a ti2019.04 tag. Should I use existing code or just plain send i2c commands to the devices over the i2c buses?

Kind regards,

Johan

  • Looks like the driver in drivers/power/pmic are not responsible for the functionality at all. When I rudely delete them everything still compiles.

    I have created following definition for the tps62361 in arch/arm/mach-omap2/omap5/hw_data.c:

    struct pmic_data tps62361 = {
            .base_offset = TPS62361_BASE_VOLT_UV,
            .step = 10000, /* 10 mV represented in uV */
            .start_code = 0,
            .i2c_slave_addr = TPS62361_I2C_SLAVE_ADDR,
            .pmic_bus_init  = gpi2c_init,
            .pmic_write     = palmas_i2c_write_u8,
    };

    This allows me to use &tps62361 as .core.pmic in my "struct vcores_data dra718_volts" in our own board.c file. And sends out the right commonds on the i2c1 bus.

    So much for the tps62361 connected to i2c1. My next issue is how to communicate with the other ones connected to i2c3 and i2c4.

    Johan

  • Johan,

    TI on AM57xx boards never designed multiple PMICs on multiple I2C busses. It was one PMIC or 2 on the same I2C bus
    with different slave IDs. So you can let the above change done on i2c1 bus. I believe you have done the job right on the i2c1.

    You also need to hook them here:

    struct vcores_data dra718_volts = {
    /*
    * In the case of dra71x GPU MPU and CORE
    * are all powered up by BUCK0 of LP873X PMIC
    */
    .mpu.value[OPP_NOM] = VDD_MPU_DRA7_NOM,
    .mpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_MPU_NOM,
    .mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,
    .mpu.addr = LP873X_REG_ADDR_BUCK0,
    .mpu.pmic = &lp8733,
    .mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,

    Instead of lp8733.

    For the other instances that are on different i2c bus. You could try i2c commands. The framework as of today is assuming all PMIC
    over one I2C bus.

    - Keerthy

  • Thanks Keerthy. The first device is working.

    I have tried to make some changes in the framework to approach the other buses. But it seems I am running into security exceptions in out HS Soc. I guess the HW firewall is blocking them. Is there an easy way to enable the other buses?

  • Johan,

    Once you get to u-boot prompt are you able to access the I2C slave registers on I2C3 & I2C4?

    Using 'i2c md' & 'i2c mw' commands.

    You need to make sure that I2C instances are enabled.



    - Keerthy

  • Thanks, that a good idea. I was looking into getting it working from the LInux kernel instead. 

    If I set the devices using the i2c commands how would I get the value from the SoC (CTRL_CORE_STD_FUSE_OPP_VMIN_CORE_2  0x4A0025F4) in uboot?

  • Johan,

    md 0x4A0025F4 0x1

    Should give you the value & the you can use that value to the TPS on I2C3 & I2C4.

    If no other questions please click on verify answer.

    - Keerthy

  • Thank you very much for your support. We now have a working solution on our board :-)