Some customer need to config different I2C bus for their PMIC in DDR test period. There is a simple method can complete this, that is NXP DDR Config Tool.
The tool download link is below:
I'm going to use the i.MX 93 EVK board here as a demonstration. On i.MX 93 EVK board, the default PMIC I2C Bus is I2C2, I will show you how to change I2C2 to I2C1, the other i2c bus is same.
Step 1 : Rework the board and make sure the PMIC is connected to I2C1.
Remove R714 R715, connnect I2C1_SCL(C20) to U701 pin 41 and I2C1_SDA(C21) tp U701 pin 42.
Step 2 : Setup I2C1 PinMux:
Config Tool UI: Advance -> IOMUX config
Command: Address Size Value
memory set 0x443c0170 32 0x10
memory set 0x443c0174 32 0x10
memory set 0x443c0320 32 0x40000b9e
memory set 0x443c0324 32 0x40000b9e
Step 3 : Set PMIC VDDQ as 1.1 V
Config Tool UI: Advance -> Custom PMIC initialization enabled
# PMIC commands Value
0 pmic_cfg 0x0025 /*I2C bus 1, PMIC address 0x25 */ (0 for I2C1, 1 for I2C2, 2 for I2C3, 3 for I2c4 …)
1 pmic_set 0x0C29 /* BUCKxOUT_DVS0/1, preset_buck1=0.8V, preset_buck2=0.7V, preset_buck3=0.8V PCA9451_BUCK123_DVS, 0x29 */
2 pmic_set 0x1118 /* BUCK1OUT_DVS0=0.9V PCA9451_BUCK1OUT_DVS0, 0x18 */
3 pmic_set 0x1718 /* BUCK3OUT_DVS0=0.9V PCA9451_BUCK3OUT_DVS0, 0x18 */
4 pmic_set 0x1428 /* Set VDDQ to 1.1V PCA9451_BUCK2OUT_DVS0, 0x28 */
PS : About pmic register, The first two bytes are the register address and the next two bytes are the register setting.
Step 4 : Run the DDR "Firmware init test" and see the test result.
The success log is as follows:
DEBUG memtool.comm.serial_channel ==================hardware_init=======================
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel Power up ddr...
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel DDRMIX power on done...
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel DDRPHY coldreset...
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel ********Found PMIC PCA945X**********
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel Set VDDQ to 1.1V for LPDDR4
DEBUG memtool.comm.serial_channel
DEBUG memtool.comm.serial_channel ==================hardware_init exit==================