cpufreq: imx-cpufreq-dt: Add i.MX8MP support
authorAnson Huang <Anson.Huang@nxp.com>
Thu, 26 Dec 2019 06:52:47 +0000 (14:52 +0800)
committerViresh Kumar <viresh.kumar@linaro.org>
Tue, 7 Jan 2020 07:59:58 +0000 (13:29 +0530)
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>
drivers/cpufreq/imx-cpufreq-dt.c

index 85a6efd..6cb8193 100644 (file)
@@ -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;
        }