diff options
author | Anson Huang <Anson.Huang@nxp.com> | 2016-08-25 20:50:07 +0800 |
---|---|---|
committer | Leonard Crestez <leonard.crestez@nxp.com> | 2018-08-24 12:41:33 +0300 |
commit | c76dd8fe959e26026731dd45134359da3e1f4495 (patch) | |
tree | 43b4891441ef203c8bf50c2251e1d017367dab20 /drivers/cpufreq | |
parent | afbeebacebca847bc3d561b1005a7bebf4a98bae (diff) |
MLK-13119-3 cpufreq: imx6q: support VPU 396MHz
When VPU runs at 396MHz, VDDSOC_CAP's voltage
should be set to 1.275V for all set-points,
add VPU clock rate check to support this case.
Signed-off-by: Anson Huang <Anson.Huang@nxp.com>
Diffstat (limited to 'drivers/cpufreq')
-rw-r--r-- | drivers/cpufreq/imx6q-cpufreq.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c index 8887b1d92af1..bd79927b01f5 100644 --- a/drivers/cpufreq/imx6q-cpufreq.c +++ b/drivers/cpufreq/imx6q-cpufreq.c @@ -283,11 +283,13 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) { struct device_node *np; struct dev_pm_opp *opp; + struct clk *vpu_axi_podf; unsigned long min_volt, max_volt; int num, ret; const struct property *prop; const __be32 *val; u32 nr, j, i = 0; + u32 vpu_axi_rate = 0; cpu_dev = get_cpu_device(0); if (!cpu_dev) { @@ -327,6 +329,10 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) } } + vpu_axi_podf = devm_clk_get(cpu_dev, "vpu_axi_podf"); + if (!IS_ERR(vpu_axi_podf)) + vpu_axi_rate = clk_get_rate(vpu_axi_podf); + arm_reg = devm_regulator_get(cpu_dev, "arm"); pu_reg = devm_regulator_get_optional(cpu_dev, "pu"); soc_reg = devm_regulator_get(cpu_dev, "soc"); @@ -419,6 +425,13 @@ static int imx6q_cpufreq_probe(struct platform_device *pdev) imx6_soc_volt[soc_opp_count - 1] = 1250000; } #endif + if (vpu_axi_rate == 396000000) { + if (freq <= 996000) { + pr_info("increase SOC/PU voltage for VPU396MHz at %ld MHz\n", + freq / 1000); + imx6_soc_volt[soc_opp_count - 1] = 1275000; + } + } break; } } |