rk3288: add vepu node for dvfs
author陈亮 <cl@rock-chips.com>
Thu, 20 Mar 2014 16:15:08 +0000 (09:15 -0700)
committer陈亮 <cl@rock-chips.com>
Thu, 20 Mar 2014 16:15:21 +0000 (09:15 -0700)
arch/arm/boot/dts/rk3288.dtsi
drivers/cpufreq/rockchip-cpufreq.c

index a05b749a6fb098a5320939f667de2772ff78ece2..63d10981d58db51641c4493f921039d5e752882b 100755 (executable)
                                        status = "disable";
                                };
                        };
+
+                       pd_vpu {
+                               clk_ddr_vepu_table:
+                               clk_vepu {
+                                       operating-points = <
+                                               /* KHz    uV */
+                                               200000 1200000
+                                               300000 1200000
+                                               400000 1200000
+                                               >;
+                                       status = "okay";
+                               };
+                       };
                };
 
                vd_gpu:
index f33e64e369ff3075917542b6ed58a2645e31f576..60dda48c6f76d229cb1dd4bfb03b366dc65023ab 100644 (file)
@@ -74,6 +74,7 @@ static DEFINE_MUTEX(cpufreq_mutex);
 static bool gpu_is_mali400;
 struct dvfs_node *clk_cpu_dvfs_node = NULL;
 struct dvfs_node *clk_gpu_dvfs_node = NULL;
+struct dvfs_node *clk_vepu_dvfs_node = NULL;
 /*******************************************************/
 static unsigned int cpufreq_get_rate(unsigned int cpu)
 {
@@ -366,7 +367,6 @@ static int cpufreq_scale_rate_for_dvfs(struct clk *clk, unsigned long rate)
        
 }
 
-
 static int cpufreq_init_cpu0(struct cpufreq_policy *policy)
 {
        unsigned int i;
@@ -379,6 +379,12 @@ static int cpufreq_init_cpu0(struct cpufreq_policy *policy)
                        dvfs_clk_enable_limit(clk_gpu_dvfs_node, 133000000, 600000000); 
        }
 
+       clk_vepu_dvfs_node = clk_get_dvfs_node("clk_vepu");
+       if (clk_vepu_dvfs_node){
+               clk_enable_dvfs(clk_vepu_dvfs_node);
+               dvfs_clk_set_rate(clk_vepu_dvfs_node, 297000000);
+       }
+
        clk_cpu_dvfs_node = clk_get_dvfs_node("clk_core");
        if (!clk_cpu_dvfs_node){
                return -EINVAL;