Other Parts Discussed in Thread: TPS65217
Hi,
SDK : ti-processor-sdk-linux-am335x-evm-03.03.00.04-Linux-x86-Install.bin
Compile the file: am335x_boneblack_defconfig
Power chip: TPS65217DRSL
am3354 hardware voltage value : VDDS_DDR 1.35V, VDD_MPU 1.01V, VDD_CORE 1.101V , Clock crystal : 24MHZ
The purpose is to configure VDDS_DDR to 1.35V, 1.01V to VDD_MPU, 1.101V to VDD_CORE to 600M during uboot.
am3354 run to the following location card will be powered down:
The test found that uboot stage power-down chip power supply card.
dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev); //read dpll_mpu_opp100.m is 1000MHZ
dpll_mpu_opp100.m = MPUPLL_M_600; // dpll_mpu_opp100.m is 600MHZ
do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev); //After setting read dpll_mpu_opp100.m value is still 1000MHZ
How to set the MPU frequency to 600M ??
code show as below(board/ti/am335x/board.c). AM3354 name is board_is_bone_lt() :
void am33xx_spl_board_init(void)
{
int mpu_vdd;
/* Get the frequency */
dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
printf("clk = %d\n",dpll_mpu_opp100.m); //printf clk = 1000
if (board_is_bone() || board_is_bone_lt()) {
/* BeagleBone PMIC Code */
int usb_cur_lim;
/*
* Only perform PMIC configurations if board rev > A1
* on Beaglebone White
*/
if (board_is_bone() && !strncmp(board_ti_get_rev(), "00A1", 4))
return;
if (i2c_probe(TPS65217_CHIP_PM))
return;
/*
* On Beaglebone White we need to ensure we have AC power
* before increasing the frequency.
*/
if (board_is_bone()) {
uchar pmic_status_reg;
if (tps65217_reg_read(TPS65217_STATUS,
&pmic_status_reg))
return;
if (!(pmic_status_reg & TPS65217_PWR_SRC_AC_BITMASK)) {
puts("No AC power, disabling frequency switch\n");
return;
}
}
/*
* Override what we have detected since we know if we have
* a Beaglebone Black it supports 1GHz.
*/
if (board_is_bone_lt())
dpll_mpu_opp100.m = MPUPLL_M_600;
/*
* Increase USB current limit to 1300mA or 1800mA and set
* the MPU voltage controller as needed.
*/
if (dpll_mpu_opp100.m == MPUPLL_M_600) {
usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1800MA;
mpu_vdd = TPS65217_DCDC_VOLT_SEL_1125MV;
} else {
usb_cur_lim = TPS65217_USB_INPUT_CUR_LIMIT_1300MA;
mpu_vdd = TPS65217_DCDC_VOLT_SEL_1125MV;
}
if (tps65217_reg_write(TPS65217_PROT_LEVEL_NONE,
TPS65217_POWER_PATH,
usb_cur_lim,
TPS65217_USB_INPUT_CUR_LIMIT_MASK))
puts("tps65217_reg_write failure\n");
/* Set DCDC3 (CORE) voltage to 1.125V */
if (tps65217_voltage_update(TPS65217_DEFDCDC3,
TPS65217_DCDC_VOLT_SEL_1125MV)) {
puts("tps65217_voltage_update failure\n");
return;
}
/* Set CORE Frequencies to OPP100 */
do_setup_dpll(&dpll_core_regs, &dpll_core_opp100);
/* Set DCDC2 (MPU) voltage */
if (tps65217_voltage_update(TPS65217_DEFDCDC2, mpu_vdd)) {
puts("tps65217_voltage_update failure\n");
return;
}
/*
* Set LDO3, LDO4 output voltage to 3.3V for Beaglebone.
* Set LDO3 to 1.8V and LDO4 to 3.3V for Beaglebone Black.
*/
if (board_is_bone()) {
if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS1,
TPS65217_LDO_VOLTAGE_OUT_3_3,
TPS65217_LDO_MASK))
puts("tps65217_reg_write failure\n");
} else {
if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS1,
TPS65217_LDO_VOLTAGE_OUT_1_8,
TPS65217_LDO_MASK))
puts("tps65217_reg_write failure\n");
}
if (tps65217_reg_write(TPS65217_PROT_LEVEL_2,
TPS65217_DEFLS2,
TPS65217_LDO_VOLTAGE_OUT_3_3,
TPS65217_LDO_MASK))
puts("tps65217_reg_write failure\n");
}
printf("write be clk = %d\n",dpll_mpu_opp100.m);
/* Set MPU Frequency to what we detected now that voltages are set */
do_setup_dpll(&dpll_mpu_regs, &dpll_mpu_opp100);
dpll_mpu_opp100.m = am335x_get_efuse_mpu_max_freq(cdev);
printf("clk = %d\n",dpll_mpu_opp100.m);
}
BR