自学内容网 自学内容网

[ RV1108_LINUX] 关于如何调整cpu中vdd_core的电压


问题描述

通过rv1108.dtsi调整其中dvfs节点下pd_core和pd_ddr对应频率的电压。发现修改后电压并没有改变,一直为11.25v。尝试了将pd_core下的operating-points中的1008000 1150000修改为1008000 1200000,也无作用。将operating-points中频率是留一个,指定电压为1200000。电压依旧为11.25v,那么应该如何修改vdd_core的电压的呢?


解决方案:

首先核查SDK的配置,SDK不要开启DVFS变频。
KERNEL下的.config配置如下: # CONFIG_DVFS is not set

如果要修改vdd_core的电压,可以单独加下代码:

diff --git a/drivers/regulator/rk816-regulator.c b/drivers/regulator/rk816-regulator.c
index 0b070b2..1609f60 100644
--- a/drivers/regulator/rk816-regulator.c
+++ b/drivers/regulator/rk816-regulator.c
@@ -766,6 +766,7 @@ static int rk816_regulator_probe(struct platform_device *pdev)
        struct regulator_config config = {};
        struct regulator_dev *rk816_rdev;
        int ret, i;
+    unsigned int sel;

        if (!pdata || !pdata->chip_name) {
                dev_err(&pdev->dev, "invalid platform data\n");
@@ -814,6 +815,11 @@ static int rk816_regulator_probe(struct platform_device *pdev)
                }

                rk816->rdev[i] = rk816_rdev;
+        if(rk8xx_reg->reg_desc[i].id==RK805_ID_DCDC1
+            ||rk8xx_reg->reg_desc[i].id==RK816_ID_DCDC1){
+           printk("%s>>>>set dcdc1 voltage\n",__func__);
+           rk816_dcdc_set_voltage(rk816->rdev[i],1200000,1200000,&sel);
+        }
        }



原文地址:https://blog.csdn.net/jay547063443/article/details/137262270

免责声明:本站文章内容转载自网络资源,如本站内容侵犯了原著者的合法权益,可联系本站删除。更多内容请关注自学内容网(zxcms.com)!