rk3x:pmic: rk818:enable hdmi5v in sleep mode and improve buck efficiency

enable hdmi5v in sleep mode for low power.
improve buck efficiency for low power.

Signed-off-by: chenjianhong <chenjianhong@rock-chips.com>
This commit is contained in:
zhangqing
2015-07-14 08:19:40 -07:00
parent 248ccf1164
commit 6e30d4ffb7

View File

@@ -1169,15 +1169,28 @@ static int rk818_pre_init(struct rk818 *rk818)
ret = rk818_clear_bits(rk818, RK818_INT_STS_MSK_REG1,(0x3<<5)); //open rtc int when power on
ret = rk818_set_bits(rk818, RK818_RTC_INT_REG,(0x1<<3),(0x1<<3)); //open rtc int when power on
/*****disable otg and boost when in sleep mode****/
/*****disable otg when in sleep mode****/
val = rk818_reg_read(rk818, RK818_SLEEP_SET_OFF_REG1);
val |= ((0x1 << 7) | (0x1 << 4));
val |= (0x1 << 7);
ret = rk818_reg_write(rk818, RK818_SLEEP_SET_OFF_REG1, val);
if (ret < 0) {
pr_err("Unable to write RK818_SLEEP_SET_OFF_REG1 reg\n");
return ret;
}
/*************** improve efficiency **********************/
ret = rk818_reg_write(rk818, RK818_BUCK2_CONFIG_REG, 0x1c);
if (ret < 0) {
pr_err("Unable to write RK818_BUCK2_CONFIG_REG reg\n");
return ret;
}
ret = rk818_reg_write(rk818, RK818_BUCK4_CONFIG_REG, 0x04);
if (ret < 0) {
pr_err("Unable to write RK818_BUCK4_CONFIG_REG reg\n");
return ret;
}
return 0;
}