From: 陈亮 Date: Thu, 20 Mar 2014 16:15:08 +0000 (-0700) Subject: rk3288: add vepu node for dvfs X-Git-Tag: firefly_0821_release~5946 X-Git-Url: http://demsky.eecs.uci.edu/git/?a=commitdiff_plain;h=9cf11a63755f634a997fd0c1258dae757ec555f0;p=firefly-linux-kernel-4.4.55.git rk3288: add vepu node for dvfs --- diff --git a/arch/arm/boot/dts/rk3288.dtsi b/arch/arm/boot/dts/rk3288.dtsi index a05b749a6fb0..63d10981d58d 100755 --- a/arch/arm/boot/dts/rk3288.dtsi +++ b/arch/arm/boot/dts/rk3288.dtsi @@ -751,6 +751,19 @@ status = "disable"; }; }; + + pd_vpu { + clk_ddr_vepu_table: + clk_vepu { + operating-points = < + /* KHz uV */ + 200000 1200000 + 300000 1200000 + 400000 1200000 + >; + status = "okay"; + }; + }; }; vd_gpu: diff --git a/drivers/cpufreq/rockchip-cpufreq.c b/drivers/cpufreq/rockchip-cpufreq.c index f33e64e369ff..60dda48c6f76 100644 --- a/drivers/cpufreq/rockchip-cpufreq.c +++ b/drivers/cpufreq/rockchip-cpufreq.c @@ -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;