From ca32c0ff855f688a2dda48bffa2b37fb06bfb507 Mon Sep 17 00:00:00 2001 From: =?utf8?q?=E9=99=88=E4=BA=AE?= Date: Mon, 28 Jul 2014 00:52:25 -0700 Subject: [PATCH] rk312x: add dvfs config MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Signed-off-by: 陈亮 --- arch/arm/boot/dts/rk3126-sdk.dts | 49 +++++++++++++++++++++ arch/arm/boot/dts/rk312x.dtsi | 73 ++++++++++++++++++++++++++++++++ arch/arm/mach-rockchip/rk312x.c | 1 + 3 files changed, 123 insertions(+) diff --git a/arch/arm/boot/dts/rk3126-sdk.dts b/arch/arm/boot/dts/rk3126-sdk.dts index 9e2a195c3396..9d43859cc15f 100755 --- a/arch/arm/boot/dts/rk3126-sdk.dts +++ b/arch/arm/boot/dts/rk3126-sdk.dts @@ -228,3 +228,52 @@ }; }; +&clk_core_dvfs_table { + operating-points = < + /* KHz uV */ + 408000 1250000 + 600000 1250000 + 696000 1250000 + 816000 1250000 + >; + status="okay"; +}; + +&clk_gpu_dvfs_table { + operating-points = < + /* KHz uV */ + 200000 125000 + 300000 125000 + >; + status="okay"; +}; + +&clk_ddr_dvfs_table { + operating-points = < + /* KHz uV */ + 200000 950000 + 300000 950000 + 400000 1000000 + 533000 1050000 + >; + + freq-table = < + /*status freq(KHz)*/ + SYS_STATUS_NORMAL 400000 + SYS_STATUS_SUSPEND 200000 + SYS_STATUS_VIDEO_1080P 240000 + SYS_STATUS_VIDEO_4K 400000 + SYS_STATUS_PERFORMANCE 528000 + SYS_STATUS_DUALVIEW 400000 + SYS_STATUS_BOOST 324000 + SYS_STATUS_ISP 533000 + >; + auto-freq-table = < + 240000 + 324000 + 396000 + 528000 + >; + auto-freq=<0>; + status="disable"; +}; diff --git a/arch/arm/boot/dts/rk312x.dtsi b/arch/arm/boot/dts/rk312x.dtsi index 4dd787fd4499..c25b9237113b 100755 --- a/arch/arm/boot/dts/rk312x.dtsi +++ b/arch/arm/boot/dts/rk312x.dtsi @@ -1,6 +1,7 @@ #include #include #include +#include #include "skeleton.dtsi" #include "rk312x-clocks.dtsi" @@ -602,4 +603,76 @@ interrupt-names = "iep_mmu"; }; + dvfs { + temp-limit-enable = <0>; + target-temp = <80>; + + vd_arm: vd_arm { + regulator_name = "vdd_arm"; + pd_core { + clk_core_dvfs_table: clk_core { + operating-points = < + /* KHz uV */ + 312000 1100000 + 504000 1100000 + 816000 1100000 + 1008000 1100000 + >; + temp-channel = <1>; + normal-temp-limit = < + /*delta-temp delta-freq*/ + 3 96000 + 6 144000 + 9 192000 + 15 384000 + >; + performance-temp-limit = < + /*temp freq*/ + 110 816000 + >; + status = "okay"; + regu-mode-table = < + /*freq mode*/ + 1008000 4 + 0 3 + >; + regu-mode-en = <0>; + }; + }; + }; + + vd_logic: vd_logic { + regulator_name = "vdd_logic"; + pd_ddr { + clk_ddr_dvfs_table: clk_ddr { + operating-points = < + /* KHz uV */ + 200000 1200000 + 300000 1200000 + 400000 1200000 + >; + status = "disabled"; + }; + }; + + pd_gpu { + clk_gpu_dvfs_table: clk_gpu { + operating-points = < + /* KHz uV */ + 200000 1200000 + 300000 1200000 + 400000 1200000 + >; + status = "okay"; + regu-mode-table = < + /*freq mode*/ + 200000 4 + 0 3 + >; + regu-mode-en = <0>; + }; + }; + }; + }; + }; diff --git a/arch/arm/mach-rockchip/rk312x.c b/arch/arm/mach-rockchip/rk312x.c index 5c96d45e7d4a..c2be5b7813e7 100755 --- a/arch/arm/mach-rockchip/rk312x.c +++ b/arch/arm/mach-rockchip/rk312x.c @@ -112,6 +112,7 @@ static void __init rk312x_dt_init_timer(void) { of_clk_init(NULL); clocksource_of_init(); + of_dvfs_init(); } static void __init rk312x_reserve(void) -- 2.34.1