rk312x: add dvfs config
author陈亮 <cl@rock-chips.com>
Mon, 28 Jul 2014 07:52:25 +0000 (00:52 -0700)
committer陈亮 <cl@rock-chips.com>
Mon, 28 Jul 2014 08:01:59 +0000 (01:01 -0700)
Signed-off-by: 陈亮 <cl@rock-chips.com>
arch/arm/boot/dts/rk3126-sdk.dts
arch/arm/boot/dts/rk312x.dtsi
arch/arm/mach-rockchip/rk312x.c

index 9e2a195c339680dcf5200abb56e22b18d0ee40a9..9d43859cc15fa51292325e7e15802ab7354471e2 100755 (executable)
        };
 
 };
+&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";
+};
index 4dd787fd44997dbcae242400a1dbc3f9dbec6a11..c25b9237113bdca61c31216ea606a42cfa7945ee 100755 (executable)
@@ -1,6 +1,7 @@
 #include <dt-bindings/interrupt-controller/arm-gic.h>
 #include <dt-bindings/suspend/rockchip-pm.h>
 #include <dt-bindings/sensor-dev.h>
+#include <dt-bindings/clock/rk_system_status.h>
 
 #include "skeleton.dtsi"
 #include "rk312x-clocks.dtsi"
                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>;
+                               };
+                       };
+               };
+       };
+
 };
index 5c96d45e7d4a33694f5e84a0df1cc4d9b3d8effc..c2be5b7813e7f4b9885ec9653aaf45f0edb091bf 100755 (executable)
@@ -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)