* [PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz
@ 2023-11-07 16:31 Christoph Niedermaier
2023-11-07 17:47 ` Fabio Estevam
0 siblings, 1 reply; 3+ messages in thread
From: Christoph Niedermaier @ 2023-11-07 16:31 UTC (permalink / raw)
To: linux-arm-kernel
Cc: Christoph Niedermaier, Viresh Kumar, Rafael J. Wysocki,
Sébastien Szymanski, Stefan Agner, Shawn Guo, Marek Vasut,
Fabio Estevam, NXP Linux Team, linux-pm, linux-kernel
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@dh-electronics.com>
Reviewed-by: Marek Vasut <marex@denx.de>
---
Cc: Viresh Kumar <viresh.kumar@linaro.org>
Cc: "Rafael J. Wysocki" <rafael@kernel.org>
Cc: Sébastien Szymanski <sebastien.szymanski@armadeus.com>
Cc: Stefan Agner <stefan@agner.ch>
Cc: Shawn Guo <shawnguo@kernel.org>
Cc: Marek Vasut <marex@denx.de>
Cc: Fabio Estevam <festevam@denx.de>
Cc: NXP Linux Team <linux-imx@nxp.com>
Cc: linux-pm@vger.kernel.org
Cc: linux-kernel@vger.kernel.org
To: linux-arm-kernel@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
^ permalink raw reply related [flat|nested] 3+ messages in thread
* Re: [PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz
2023-11-07 16:31 [PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz Christoph Niedermaier
@ 2023-11-07 17:47 ` Fabio Estevam
2023-11-08 10:04 ` Christoph Niedermaier
0 siblings, 1 reply; 3+ messages in thread
From: Fabio Estevam @ 2023-11-07 17:47 UTC (permalink / raw)
To: Christoph Niedermaier
Cc: linux-arm-kernel, Viresh Kumar, Rafael J. Wysocki,
Sébastien Szymanski, Stefan Agner, Shawn Guo, Marek Vasut,
NXP Linux Team, linux-pm, linux-kernel
Hi Christoph,
Thanks for your patch.
On 07/11/2023 13:31, Christoph Niedermaier wrote:
> 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 find this part:
"792MHz isn't mentioned there isn't note that 792MHz OPP isn't allowed."
a bit confusing.
Maybe:
"However in [2] (page 24, table 10. "Operating Ranges"), it is not
mentioned that 792MHz OPP isn't allowed."
> [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@dh-electronics.com>
> Reviewed-by: Marek Vasut <marex@denx.de>
I think it is worth adding a Fixes tag so that this fix could be
backported
to stable kernels.
Reviewed-by: Fabio Estevam <festevam@denx.de>
Thanks
^ permalink raw reply [flat|nested] 3+ messages in thread
* RE: [PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz
2023-11-07 17:47 ` Fabio Estevam
@ 2023-11-08 10:04 ` Christoph Niedermaier
0 siblings, 0 replies; 3+ messages in thread
From: Christoph Niedermaier @ 2023-11-08 10:04 UTC (permalink / raw)
To: Fabio Estevam
Cc: linux-arm-kernel@lists.infradead.org, Viresh Kumar,
Rafael J. Wysocki, Sébastien Szymanski, Stefan Agner,
Shawn Guo, Marek Vasut, NXP Linux Team, linux-pm@vger.kernel.org,
linux-kernel@vger.kernel.org
From: Fabio Estevam
Sent: Tuesday, November 7, 2023 6:48 PM
>
> Hi Christoph,
>
> Thanks for your patch.
>
> On 07/11/2023 13:31, Christoph Niedermaier wrote:
>> 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 find this part:
>
> "792MHz isn't mentioned there isn't note that 792MHz OPP isn't allowed."
>
> a bit confusing.
>
> Maybe:
>
> "However in [2] (page 24, table 10. "Operating Ranges"), it is not
> mentioned that 792MHz OPP isn't allowed."
You are right, your suggestion expresses it more clearly.
I will change it in V2.
>
>
>> [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@dh-electronics.com>
>> Reviewed-by: Marek Vasut <marex@denx.de>
>
> I think it is worth adding a Fixes tag so that this fix could be
> backported
> to stable kernels.
You mean the following fixes tag when the change was introduced?
Fixes: 0aa9abd4c212 ("cpufreq: imx6q: check speed grades for i.MX6ULL")
But if I'm right, then it goes down to version 4.19 and maybe the
commit 11a3b0ac33d9 ("cpufreq: imx6q: don't warn for disabling a non-existing frequency")
is also needed to easily apply.
Regards
Christoph
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2023-11-08 10:05 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2023-11-07 16:31 [PATCH] cpufreq: imx6q: Only disabling 792MHz OPP for i.MX6ULL types below 792MHz Christoph Niedermaier
2023-11-07 17:47 ` Fabio Estevam
2023-11-08 10:04 ` Christoph Niedermaier
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox