&clk_core_dvfs_table {
operating-points = <
/* KHz uV */
+ 126000 850000
+ 216000 850000
312000 850000
- 504000 850000
+ 408000 850000
+ 600000 850000
+ 696000 900000
816000 950000
1008000 1000000
1200000 1050000
1416000 1150000
>;
+ status="okay";
};
&clk_gpu_dvfs_table {
400000 1000000
600000 1250000
>;
+ status="okay";
};
&clk_ddr_dvfs_table {
operating-points = <
/* KHz uV */
- 200000 1200000
- 300000 1200000
- 400000 1200000
+ 200000 950000
+ 300000 950000
+ 400000 1000000
+ 533000 1050000
>;
freq_table = <
SYS_STATUS_VIDEO 300000
SYS_STATUS_DUALVIEW 500000
>;
+ status="okay";
};
/include/ "rk808.dtsi"
300000 1300000
400000 1300000
>;
- status = "okay";
+ status = "disable";
};
};
};
return ret;
}
-late_initcall(ddrfreq_init);
+//late_initcall(ddrfreq_init);
clk_dvfs_node->freq_limit_en = 1;
dvfs_table_round_volt(clk_dvfs_node);
clk_dvfs_node->set_freq = clk_dvfs_node_get_rate_kz(clk_dvfs_node->clk);
- clk_dvfs_node->last_set_rate = clk_dvfs_node->set_freq;
+ clk_dvfs_node->last_set_rate = clk_dvfs_node->set_freq*1000;
DVFS_DBG("%s: %s get freq %u!\n",
__func__, clk_dvfs_node->name, clk_dvfs_node->set_freq);
static int __init rk3188_ddr_init(void)
{
- ddr_change_freq = _ddr_change_freq;
- ddr_round_rate = _ddr_round_rate;
- ddr_set_auto_self_refresh = _ddr_set_auto_self_refresh;
-
- if (cpu_is_rk3188())
+ if (cpu_is_rk3188()) {
+
+ ddr_change_freq = _ddr_change_freq;
+ ddr_round_rate = _ddr_round_rate;
+ ddr_set_auto_self_refresh = _ddr_set_auto_self_refresh;
+
ddr_init(DDR3_DEFAULT, 300);
+ }
return 0;
}
if (!ddr_round_rate) {
/* Do nothing before ddr init */
- best = __clk_get_rate(hw->clk);
+ best = rate;//__clk_get_rate(hw->clk);
} else {
/* Func provided by ddr driver */
best = ddr_round_rate(rate/MHZ) * MHZ;
struct dvfs_node *clk_cpu_dvfs_node = NULL;
struct dvfs_node *clk_gpu_dvfs_node = NULL;
struct dvfs_node *clk_vepu_dvfs_node = NULL;
+struct dvfs_node *clk_ddr_dvfs_node = NULL;
/*******************************************************/
static unsigned int cpufreq_get_rate(unsigned int cpu)
{
clk_enable_dvfs(clk_vepu_dvfs_node);
}
+ clk_ddr_dvfs_node = clk_get_dvfs_node("clk_ddr");
+ if (clk_ddr_dvfs_node){
+ clk_enable_dvfs(clk_ddr_dvfs_node);
+ }
+
clk_cpu_dvfs_node = clk_get_dvfs_node("clk_core");
if (!clk_cpu_dvfs_node){
return -EINVAL;