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.

TPS659037: PMIC configuration in U-boot

Part Number: TPS659037
Other Parts Discussed in Thread: AM5749

Hi, 

I have a question regarding PMIC configuration.

In my system I am using AM5749 with TPS659037 Power management unit. When the system boots up U-BOOT starts by performing an early hardware initialization in which the PMIC is configured. This configuration changes the output voltage of the different regulators in order to supply the main SoC core power domains. The evaluation board uses these voltages to power other components of the system (eMMC for example). 

In U-BOOT the PMIC output voltage values are stored in a struct vcores data. A function “scale_vcores” is called to configure the PMIC using that structure. First it scales (usually down) to the fused values that are retrieved from the SoC.

On my custom board I use the PMIC to power my system with its default output voltages. Therefore I needed to make changes on U-BOOT to prevent it from configuring the different regulators of PMIC.

The way I do it is by defining a struct vcores data that has value fields zeroed as you can see below.

struct vcores_data custom_am574x_idk_volts = {

.mpu.value[OPP_NOM] = 0,

.mpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_MPU_NOM,

.mpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,

.mpu.addr = TPS659038_REG_ADDR_SMPS12,

.mpu.pmic = &tps659038,

.mpu.abb_tx_done_mask = OMAP_ABB_MPU_TXDONE_MASK,



.eve.value[OPP_NOM] = 0,

.eve.value[OPP_OD] = 0,

.eve.value[OPP_HIGH] = 0,

.eve.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_DSPEVE_NOM,

.eve.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_DSPEVE_OD,

.eve.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_DSPEVE_HIGH,

.eve.efuse.reg_bits = DRA752_EFUSE_REGBITS,

.eve.addr = TPS659038_REG_ADDR_SMPS45,

.eve.pmic = &tps659038,

.eve.abb_tx_done_mask = OMAP_ABB_EVE_TXDONE_MASK,



.gpu.value[OPP_NOM] = 0,

.gpu.value[OPP_OD] = 0,

.gpu.value[OPP_HIGH] = 0,

.gpu.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_GPU_NOM,

.gpu.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_GPU_OD,

.gpu.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_GPU_HIGH,

.gpu.efuse.reg_bits = DRA752_EFUSE_REGBITS,

.gpu.addr = TPS659038_REG_ADDR_SMPS6,

.gpu.pmic = &tps659038,

.gpu.abb_tx_done_mask = OMAP_ABB_GPU_TXDONE_MASK,



.core.value[OPP_NOM] = 0,

.core.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_CORE_NOM,

.core.efuse.reg_bits = DRA752_EFUSE_REGBITS,

.core.addr = TPS659038_REG_ADDR_SMPS7,

.core.pmic = &tps659038,



.iva.value[OPP_NOM] = 0,

.iva.value[OPP_OD] = 0,

.iva.value[OPP_HIGH] = 0,

.iva.efuse.reg[OPP_NOM] = STD_FUSE_OPP_VMIN_IVA_NOM,

.iva.efuse.reg[OPP_OD] = STD_FUSE_OPP_VMIN_IVA_OD,

.iva.efuse.reg[OPP_HIGH] = STD_FUSE_OPP_VMIN_IVA_HIGH,

.iva.efuse.reg_bits = DRA752_EFUSE_REGBITS,

.iva.addr = TPS659038_REG_ADDR_SMPS8,

.iva.pmic = &tps659038,

.iva.abb_tx_done_mask = OMAP_ABB_IVA_TXDONE_MASK,

};

My questions : Is this the correct way to configure u-boot in order to keep the default output voltages of the PMIC ?

Thanks

David

  • Hi David, 

    The code looks correct, but I am not sure if there is a preferred method for resetting the voltage values. I am going to assign this thread to the team supporting AM5749 to see if they can provide further feedback.

    Best regards,

    Matt

  • Hi David,

    My questions : Is this the correct way to configure u-boot in order to keep the default output voltages of the PMIC ?

    If you do not want to change voltages then you could just comment of scale_vcores altogether or 'return 0' from there?

    - Keerthy

  • Hi Keerthy,

    Thanks for your answer. Actually, that is what I've tried at first but the boot failed because the function scale_vcores performs IO delay recalibration.

    I could of course remove the part in the function that is changing voltages and leave the rest but I thought that it would become more of a hack than a proper configuration. I asssume that the maintainers must have setup a way to do it correctly. 

  • David,

    Thanks for trying that. Typically the changes you have done would be to take care of a different pmic. The scale_vcores also takes care of adaptive voltage scaling in U-Boot reading efuses to program the optimised voltage for a particular opp with which you boot. If your intent is to boot with reset voltage values you will have to comment out at least that part.

    Best Regards,

    Keerthy 

  • Thanks Keerthy for the exchange. In this case I will close this thread. (The implemeted solution is the one posted in question)