cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
Subsystems (2)
PATCH 1/2 cpufreq: Use imx-cpufreq-dt for i.MX8MP's speed grading
Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs.
--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)
drivers/cpufreq/cpufreq-dt-platdev.c +1 -0
@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "fsl,imx8mq", }, { .compatible = "fsl,imx8mm", }, { .compatible = "fsl,imx8mn", }, + { .compatible = "fsl,imx8mp", }, { .compatible = "marvell,armadaxp", },
Signature · 1 line
2.7.4
PATCH 2/2 cpufreq: imx-cpufreq-dt: Add i.MX8MP support
Add i.MX8MP cpufreq DT support for speed grading and market segment check.
--- drivers/cpufreq/imx-cpufreq-dt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)
drivers/cpufreq/imx-cpufreq-dt.c +3 -2
@@ -35,7 +35,7 @@ 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 +54,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 ; }
Signature · 1 line
2.7.4
Re: [PATCH 2/2] cpufreq: imx-cpufreq-dt: Add i.MX8MP support
Quoted 13 lines · Anson Huang
Add i.MX8MP cpufreq DT support for speed grading and market segment check.
Signed-off-by Anson Huang <[email protected]>--- drivers/cpufreq/imx-cpufreq-dt.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-)drivers/cpufreq/imx-cpufreq-dt.c +0
-0
drivers/cpufreq/imx-cpufreq-dt.c static int imx_cpufreq_dt_probe(struct platform_device *pdev) · line 38
Quoted 5 lines
drivers/cpufreq/imx-cpufreq-dt.c +1
-1@@ -35,7 +35,7 @@ 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" ))
Is there a way we could do this more generic so we won't have to add another of_machine_is_compatible if a new imx8m comes around ?
If not, please drop the second one on a new line to follow the 80 chars rule.
Then you can add:
Quoted 16 lines
drivers/cpufreq/imx-cpufreq-dt.c +2
-1speed_grade = (cell_value &IMX8MN_OCOTP_CFG3_SPEED_GRADE_MASK ) >>OCOTP_CFG3_SPEED_GRADE_SHIFT ; else@@ -54,7 +54,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 ; }Signature · 1 line
2.7.4
Quoted 13 lines · Anson Huang
Add i.MX8MP to blacklist, so that imx-cpufreq-dt driver can handle speed grading bits just like other i.MX8M SoCs.
Signed-off-by Anson Huang <[email protected]>--- drivers/cpufreq/cpufreq-dt-platdev.c | 1 + 1 file changed, 1 insertion(+)drivers/cpufreq/cpufreq-dt-platdev.c +0
-0
drivers/cpufreq/cpufreq-dt-platdev.c static const struct of_device_id blacklist[] __initconst = { · line 114
Quoted 6 lines
drivers/cpufreq/cpufreq-dt-platdev.c +1
-0@@ -109,6 +109,7 @@ static const struct of_device_id blacklist[] __initconst = { { .compatible = "fsl,imx8mq", }, { .compatible = "fsl,imx8mm", }, { .compatible = "fsl,imx8mn", }, + { .compatible = "fsl,imx8mp", }, { .compatible = "marvell,armadaxp", },
Applied both (after minor formatting fixes). Thanks.
Signature · 1 line
viresh