[PATCH v1 2/4] imx: imx93_evk: change VDD_SOC for new pmic trimed
Joy Zou
joy.zou at nxp.com
Mon Jun 5 11:48:23 CEST 2023
Change VDD_SOC into 0.9v for over drive mode for new pmic.
Signed-off-by: Joy Zou <joy.zou at nxp.com>
---
board/freescale/imx93_evk/spl.c | 16 ++++++++++++++--
1 file changed, 14 insertions(+), 2 deletions(-)
diff --git a/board/freescale/imx93_evk/spl.c b/board/freescale/imx93_evk/spl.c
index 1aa2977b40..f0dbd0f0a5 100644
--- a/board/freescale/imx93_evk/spl.c
+++ b/board/freescale/imx93_evk/spl.c
@@ -55,6 +55,7 @@ int power_init_board(void)
{
struct udevice *dev;
int ret;
+ unsigned int val = 0;
ret = pmic_get("pmic at 25", &dev);
if (ret == -ENODEV) {
@@ -64,13 +65,24 @@ int power_init_board(void)
if (ret != 0)
return ret;
+ ret = pmic_reg_read(dev, PCA9450_PWR_CTRL);
+ if (ret < 0)
+ return ret;
+ else
+ val = ret;
+
/* BUCKxOUT_DVS0/1 control BUCK123 output */
pmic_reg_write(dev, PCA9450_BUCK123_DVS, 0x29);
/* 0.9v
*/
- pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x18);
- pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x18);
+ if (val & PCA9450_REG_PWRCTRL_TOFF_DEB) {
+ pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x14);
+ pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x14);
+ } else {
+ pmic_reg_write(dev, PCA9450_BUCK1OUT_DVS0, 0x18);
+ pmic_reg_write(dev, PCA9450_BUCK3OUT_DVS0, 0x18);
+ }
/* I2C_LT_EN*/
pmic_reg_write(dev, 0xa, 0x3);
--
2.37.1
More information about the U-Boot
mailing list