diff options
author | Anson Huang <b20788@freescale.com> | 2014-05-09 06:35:51 -0400 |
---|---|---|
committer | Anson Huang <b20788@freescale.com> | 2014-05-13 22:19:02 -0400 |
commit | 188d6d3df49f957e3af24b5ed37962b534d8d9a0 (patch) | |
tree | beb51da6872dccb287570d9587668c0e0a421c09 | |
parent | ef9b405510b379c70e71e1fa2bdbec1b4d89483d (diff) |
ENGR00313202 ARM: imx: add VPU 352M support for i.MX6Q
When VPU freq is set to 352MHz, it need to source clk
from PLL2_PFD2_396M, and PLL2_PFD2_396M need to change
freq to 352M.
VDDSOC/PU needs to be at highest setpoint when VPU@352Mhz,
cpufreq will be disabled as it will not save any power if
VDDSOC/PU's voltage stays at highest setpoint.
Busfreq will be disabled as it needs PLL2_PFD2 to be
as 396MHz to achieve low power audio freq setpoint.
To enable VPU 352MHz feature, select it in menuconfig,
it is disabled by default.
Signed-off-by: Anson Huang <b20788@freescale.com>
-rw-r--r-- | arch/arm/mach-imx/busfreq-imx6.c | 3 | ||||
-rw-r--r-- | arch/arm/mach-imx/clk-imx6q.c | 15 | ||||
-rw-r--r-- | arch/arm/mach-imx/mach-imx6q.c | 3 |
3 files changed, 19 insertions, 2 deletions
diff --git a/arch/arm/mach-imx/busfreq-imx6.c b/arch/arm/mach-imx/busfreq-imx6.c index 7d0cde0a7ffd..ecc020855fcc 100644 --- a/arch/arm/mach-imx/busfreq-imx6.c +++ b/arch/arm/mach-imx/busfreq-imx6.c | |||
@@ -1013,11 +1013,12 @@ static struct platform_driver busfreq_driver = { | |||
1013 | 1013 | ||
1014 | static int __init busfreq_init(void) | 1014 | static int __init busfreq_init(void) |
1015 | { | 1015 | { |
1016 | #ifndef CONFIG_MX6_VPU_352M | ||
1016 | if (platform_driver_register(&busfreq_driver) != 0) | 1017 | if (platform_driver_register(&busfreq_driver) != 0) |
1017 | return -ENODEV; | 1018 | return -ENODEV; |
1018 | 1019 | ||
1019 | printk(KERN_INFO "Bus freq driver module loaded\n"); | 1020 | printk(KERN_INFO "Bus freq driver module loaded\n"); |
1020 | 1021 | #endif | |
1021 | return 0; | 1022 | return 0; |
1022 | } | 1023 | } |
1023 | 1024 | ||
diff --git a/arch/arm/mach-imx/clk-imx6q.c b/arch/arm/mach-imx/clk-imx6q.c index 6aaaee22805c..78e616286e1e 100644 --- a/arch/arm/mach-imx/clk-imx6q.c +++ b/arch/arm/mach-imx/clk-imx6q.c | |||
@@ -701,6 +701,21 @@ static void __init imx6q_clocks_init(struct device_node *ccm_node) | |||
701 | /* Set pll4_audio to a value that can derive 5K-88.2KHz and 8K-96KHz */ | 701 | /* Set pll4_audio to a value that can derive 5K-88.2KHz and 8K-96KHz */ |
702 | clk_set_rate(clk[pll4_audio_div], 541900800); | 702 | clk_set_rate(clk[pll4_audio_div], 541900800); |
703 | 703 | ||
704 | #ifdef CONFIG_MX6_VPU_352M | ||
705 | /* | ||
706 | * If VPU 352M is enabled, then PLL2_PDF2 need to be | ||
707 | * set to 352M, cpufreq will be disabled as VDDSOC/PU | ||
708 | * need to be at highest voltage, scaling cpu freq is | ||
709 | * not saving any power, and busfreq will be also disabled | ||
710 | * as the PLL2_PFD2 is not at default freq, in a word, | ||
711 | * all modules that sourceing clk from PLL2_PFD2 will | ||
712 | * be impacted. | ||
713 | */ | ||
714 | clk_set_rate(clk[pll2_pfd2_396m], 352000000); | ||
715 | clk_set_parent(clk[vpu_axi_sel], clk[pll2_pfd2_396m]); | ||
716 | pr_info("VPU 352M is enabled!\n"); | ||
717 | #endif | ||
718 | |||
704 | /* Set initial power mode */ | 719 | /* Set initial power mode */ |
705 | imx6_set_lpm(WAIT_CLOCKED); | 720 | imx6_set_lpm(WAIT_CLOCKED); |
706 | 721 | ||
diff --git a/arch/arm/mach-imx/mach-imx6q.c b/arch/arm/mach-imx/mach-imx6q.c index 7ff96e7565aa..9a8fd6f01c62 100644 --- a/arch/arm/mach-imx/mach-imx6q.c +++ b/arch/arm/mach-imx/mach-imx6q.c | |||
@@ -466,7 +466,8 @@ static void __init imx6q_init_late(void) | |||
466 | IMX_CHIP_REVISION_1_0)) | 466 | IMX_CHIP_REVISION_1_0)) |
467 | imx6q_cpuidle_init(); | 467 | imx6q_cpuidle_init(); |
468 | 468 | ||
469 | if (IS_ENABLED(CONFIG_ARM_IMX6_CPUFREQ)) { | 469 | if (IS_ENABLED(CONFIG_ARM_IMX6_CPUFREQ) && |
470 | !IS_ENABLED(CONFIG_MX6_VPU_352M)) { | ||
470 | imx6q_opp_init(&imx6q_cpufreq_pdev.dev); | 471 | imx6q_opp_init(&imx6q_cpufreq_pdev.dev); |
471 | platform_device_register(&imx6q_cpufreq_pdev); | 472 | platform_device_register(&imx6q_cpufreq_pdev); |
472 | } | 473 | } |