power: pmic: rk8xx: add not_save_power_en

add not_save_power_en to judge whether save the PMIC_POWER_EN register.

Signed-off-by: shengfei Xu <xsf@rock-chips.com>
Change-Id: I6e2117ca947dacee41eead631a5c877bd6be3e7a
This commit is contained in:
shengfei Xu 2021-02-21 17:56:00 +08:00 committed by Jianhong Chen
parent 8d4402d317
commit b9e9168c08
2 changed files with 7 additions and 0 deletions

View File

@ -411,6 +411,9 @@ static int rk8xx_ofdata_to_platdata(struct udevice *dev)
else
rk8xx->lp_action = RK8XX_LP_OFF;
val = dev_read_u32_default(dev, "not-save-power-en", 0);
rk8xx->not_save_power_en = val;
return 0;
}
@ -539,6 +542,9 @@ static int rk8xx_probe(struct udevice *dev)
lp_act_msk = RK8XX_LP_ACTION_MSK;
init_data = rk817_init_reg;
init_data_num = ARRAY_SIZE(rk817_init_reg);
/* judge whether save the PMIC_POWER_EN register */
if (priv->not_save_power_en)
break;
power_en0 = pmic_reg_read(dev, RK817_POWER_EN0);
power_en1 = pmic_reg_read(dev, RK817_POWER_EN1);
power_en2 = pmic_reg_read(dev, RK817_POWER_EN2);

View File

@ -283,6 +283,7 @@ struct rk8xx_priv {
int lp_off_time;
int lp_action;
uint8_t sleep_pin;
int not_save_power_en;
};
int rk8xx_spl_configure_buck(struct udevice *pmic, int buck, int uvolt);