summaryrefslogtreecommitdiffstats
path: root/drivers/cpufreq/imx-cpufreq-dt.c
diff options
context:
space:
mode:
authorAnson Huang <Anson.Huang@nxp.com>2019-12-26 07:52:47 +0100
committerViresh Kumar <viresh.kumar@linaro.org>2020-01-07 08:59:58 +0100
commit83fe39ad0a489200d731c78bfdd40e199e5a9cd2 (patch)
tree334057621924a1cbfc311db3f7bbd2b91a91e0cf /drivers/cpufreq/imx-cpufreq-dt.c
parentcpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading (diff)
downloadlinux-83fe39ad0a489200d731c78bfdd40e199e5a9cd2.tar.xz
linux-83fe39ad0a489200d731c78bfdd40e199e5a9cd2.zip
cpufreq: imx-cpufreq-dt: Add i.MX8MP support
Add i.MX8MP cpufreq DT support for speed grading and market segment check. Reviewed-by: Abel Vesa <abel.vesa@nxp.com> Signed-off-by: Anson Huang <Anson.Huang@nxp.com> [ Viresh: Minor formatting fixes ] Signed-off-by: Viresh Kumar <viresh.kumar@linaro.org>
Diffstat (limited to 'drivers/cpufreq/imx-cpufreq-dt.c')
-rw-r--r--drivers/cpufreq/imx-cpufreq-dt.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/drivers/cpufreq/imx-cpufreq-dt.c b/drivers/cpufreq/imx-cpufreq-dt.c
index 85a6efd6b68f..6cb8193421ea 100644
--- a/drivers/cpufreq/imx-cpufreq-dt.c
+++ b/drivers/cpufreq/imx-cpufreq-dt.c
@@ -35,7 +35,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
if (ret)
return ret;
- if (of_machine_is_compatible("fsl,imx8mn"))
+ if (of_machine_is_compatible("fsl,imx8mn") ||
+ of_machine_is_compatible("fsl,imx8mp"))
speed_grade = (cell_value & IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK)
>> OCOTP_CFG3_SPEED_GRADE_SHIFT;
else
@@ -54,7 +55,8 @@ static int imx_cpufreq_dt_probe(struct platform_device *pdev)
if (of_machine_is_compatible("fsl,imx8mm") ||
of_machine_is_compatible("fsl,imx8mq"))
speed_grade = 1;
- if (of_machine_is_compatible("fsl,imx8mn"))
+ if (of_machine_is_compatible("fsl,imx8mn") ||
+ of_machine_is_compatible("fsl,imx8mp"))
speed_grade = 0xb;
}