嵌入式系统移植 - uBoot : 优化 RK816 PMU-LDO 控制逻辑

优化 RK816 PMU-LDO 控制逻辑

说明

修改源码

diff --git a/drivers/power/pmic/pmic_rk816.c b/drivers/power/pmic/pmic_rk816.c
index 1e77c02..75dad60 100755
--- a/drivers/power/pmic/pmic_rk816.c
+++ b/drivers/power/pmic/pmic_rk816.c
@@ -327,14 +327,36 @@ static int rk816_set_regulator_init(struct fdt_regulator_match *matches, int id)
 	if (matches->boot_on) {
 		debug("%s: regulagor.%d boot on\n", __func__, id);
 		ret = rk816_regulator_enable(id);
+	} else {
+		// Modify Tower 20190411:
+		// if dts not define "regulator-boot-on". so I'm think need turn off
+		debug("%s: regulagor.%d boot off\n", __func__, id);
+		ret = rk816_regulator_disable(id);
 	}
 	
 	return ret;
 }
 
 static int rk816_pre_init_ldo(unsigned char bus, uchar addr)
 {
-	rk816_regulator_disable(9);
+	//rk816_regulator_disable(9);
 
 	/* disable boost5v and otg_en */
 	i2c_reg_write(rk8xx->pmic->hw.i2c.addr, RK816_DCDC_EN_REG2, 0x60);

发布了53 篇原创文章 · 获赞 19 · 访问量 8万+

猜你喜欢

转载自blog.csdn.net/qq_33443989/article/details/102984572