aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAnson Huang <b20788@freescale.com>2014-05-06 02:04:52 -0400
committerAnson Huang <b20788@freescale.com>2014-05-08 02:36:44 -0400
commit6e85aaf05d26b475fd760da7df5b195fb01f8cd2 (patch)
tree85dc5f924a4cb75d1e7457e26b9d362acf196f73
parent7cf791243f88792ce8a8e3363980c02eb1d0c1fc (diff)
ENGR00311992-3 ARM: imx: add cpufreq support for i.mx6sx
Enable cpufreq support for i.MX6SX, currently three setpoints are supported, the freq/volt table are as below: VDDARM_CAP VDDSOC_CAP 996M: 1.250V 1.175V 792M: 1.175V 1.175V 396M: 1.075V 1.175V All upper voltages are 25mV higher then the minimum value defined in datasheet, this 25mV is to cover board level IR drop. Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r--arch/arm/mach-imx/mach-imx6sx.c26
1 files changed, 26 insertions, 0 deletions
diff --git a/arch/arm/mach-imx/mach-imx6sx.c b/arch/arm/mach-imx/mach-imx6sx.c
index 96c79a0bb4f5..f711895e7019 100644
--- a/arch/arm/mach-imx/mach-imx6sx.c
+++ b/arch/arm/mach-imx/mach-imx6sx.c
@@ -190,6 +190,27 @@ static void __init imx6sx_init_machine(void)
190 imx6sx_qos_init(); 190 imx6sx_qos_init();
191} 191}
192 192
193static void __init imx6sx_opp_init(struct device *cpu_dev)
194{
195 struct device_node *np;
196
197 np = of_find_node_by_path("/cpus/cpu@0");
198 if (!np) {
199 pr_warn("failed to find cpu0 node\n");
200 return;
201 }
202
203 cpu_dev->of_node = np;
204 if (of_init_opp_table(cpu_dev))
205 pr_warn("failed to init OPP table\n");
206
207 of_node_put(np);
208}
209
210static struct platform_device imx6sx_cpufreq_pdev = {
211 .name = "imx6-cpufreq",
212};
213
193static void __init imx6sx_init_late(void) 214static void __init imx6sx_init_late(void)
194{ 215{
195 struct regmap *gpr; 216 struct regmap *gpr;
@@ -209,6 +230,11 @@ static void __init imx6sx_init_late(void)
209 if (of_machine_is_compatible("fsl,imx6sx-17x17-arm2") || 230 if (of_machine_is_compatible("fsl,imx6sx-17x17-arm2") ||
210 of_machine_is_compatible("fsl,imx6sx-sdb")) 231 of_machine_is_compatible("fsl,imx6sx-sdb"))
211 imx6sx_arm2_flexcan_fixup(); 232 imx6sx_arm2_flexcan_fixup();
233
234 if (IS_ENABLED(CONFIG_ARM_IMX6_CPUFREQ)) {
235 imx6sx_opp_init(&imx6sx_cpufreq_pdev.dev);
236 platform_device_register(&imx6sx_cpufreq_pdev);
237 }
212} 238}
213 239
214static void __init imx6sx_map_io(void) 240static void __init imx6sx_map_io(void)