[PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz

Christoph Niedermaier cniedermaier at dh-electronics.com
Tue Nov 7 08:31:36 PST 2023


For a 900MHz i.MX6ULL CPU the 792MHz OPP is disabled. There is no
convincing reason to disable this OPP. If a CPU can run at 900MHz,
it should also be able to cope with 792MHz. Looking at the voltage
level of 792MHz in [1] (page 24, table 10. "Operating Ranges") the
current defined OPP is above the minimum. So the voltage level
shouldn't be a problem. Although in [2] (page 24, table 10.
"Operating Ranges") 792MHz isn't mentioned there isn't note that
792MHz OPP isn't allowed. Change it to only disable 792MHz OPP for
i.MX6ULL types below 792 MHz.

[1] https://www.nxp.com/docs/en/data-sheet/IMX6ULLIEC.pdf
[2] https://www.nxp.com/docs/en/data-sheet/IMX6ULLCEC.pdf

Signed-off-by: Christoph Niedermaier <cniedermaier at dh-electronics.com>
Reviewed-by: Marek Vasut <marex at denx.de>
---
Cc: Viresh Kumar <viresh.kumar at linaro.org>
Cc: "Rafael J. Wysocki" <rafael at kernel.org>
Cc: Sébastien Szymanski <sebastien.szymanski at armadeus.com>
Cc: Stefan Agner <stefan at agner.ch>
Cc: Shawn Guo <shawnguo at kernel.org>
Cc: Marek Vasut <marex at denx.de>
Cc: Fabio Estevam <festevam at denx.de>
Cc: NXP Linux Team <linux-imx at nxp.com>
Cc: linux-pm at vger.kernel.org
Cc: linux-kernel at vger.kernel.org
To: linux-arm-kernel at lists.infradead.org
---
 drivers/cpufreq/imx6q-cpufreq.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/drivers/cpufreq/imx6q-cpufreq.c b/drivers/cpufreq/imx6q-cpufreq.c
index 494d044b9e72..33728c242f66 100644
--- a/drivers/cpufreq/imx6q-cpufreq.c
+++ b/drivers/cpufreq/imx6q-cpufreq.c
@@ -327,7 +327,7 @@ static int imx6ul_opp_check_speed_grading(struct device *dev)
 			imx6x_disable_freq_in_opp(dev, 696000000);
 
 	if (of_machine_is_compatible("fsl,imx6ull")) {
-		if (val != OCOTP_CFG3_6ULL_SPEED_792MHZ)
+		if (val < OCOTP_CFG3_6ULL_SPEED_792MHZ)
 			imx6x_disable_freq_in_opp(dev, 792000000);
 
 		if (val != OCOTP_CFG3_6ULL_SPEED_900MHZ)
-- 
2.11.0




More information about the linux-arm-kernel mailing list