From 9cf11a63755f634a997fd0c1258dae757ec555f0 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E4=BA=AE?= Date: Thu, 20 Mar 2014 09:15:08 -0700 Subject: [PATCH] rk3288: add vepu node for dvfs --- arch/arm/boot/dts/rk3288.dtsi | 13 +++++++++++++ drivers/cpufreq/rockchip-cpufreq.c | 8 +++++++- 2 files changed, 20 insertions(+), 1 deletion(-) 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; -- 2.34.1