From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: Peng Fan <peng.fan@oss.nxp.com>
Cc: Abel Vesa <abelvesa@kernel.org>, Peng Fan <peng.fan@nxp.com>,
Michael Turquette <mturquette@baylibre.com>,
Stephen Boyd <sboyd@kernel.org>, Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk+dt@kernel.org>,
Conor Dooley <conor+dt@kernel.org>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
Abel Vesa <abel.vesa@linaro.org>, Marek Vasut <marex@denx.de>,
linux-clk@vger.kernel.org, imx@lists.linux.dev,
devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
linux-kernel@vger.kernel.org
Subject: Re: [PATCH 6/6] clk: imx8mp: inform CCF of maximum frequency of clocks
Date: Fri, 20 Dec 2024 07:30:28 +0100 [thread overview]
Message-ID: <22faf38d-3e64-40b8-9896-dcccefcc181a@pengutronix.de> (raw)
In-Reply-To: <20241220061805.GC8295@localhost.localdomain>
Hi Peng,
On 20.12.24 07:18, Peng Fan wrote:
> On Thu, Dec 19, 2024 at 08:27:37AM +0100, Ahmad Fatoum wrote:
>> The IMX8MPCEC datasheet lists maximum frequencies allowed for different
>> modules. Some of these limits are universal, but some depend on
>> whether the SoC is operating in nominal or in overdrive mode.
>>
>> The imx8mp.dtsi currently assumes overdrive mode and configures some
>> clocks in accordance with this. Boards wishing to make use of nominal
>> mode will need to override some of the clock rates manually.
>>
>> As operating the clocks outside of their allowed range can lead to
>> difficult to debug issues, it makes sense to register the maximum rates
>> allowed in the driver, so the CCF can take them into account.
>>
>> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
>> + imx8mp_clocks_apply_constraints(imx8mp_clock_common_constraints);
>> +
>> + if (of_property_read_bool(np, "fsl,nominal-mode"))
>> + imx8mp_clocks_apply_constraints(imx8mp_clock_nominal_constraints);
>> + else if (of_property_read_bool(np, "fsl,overdrive-mode"))
>> + imx8mp_clocks_apply_constraints(imx8mp_clock_overdrive_constraints);
>
> As I replied, a boot parameter should be better? the mode is a soc level mode,
> not just clock controller.
I think it's counterproductive for a sanity check to be enforced via kernel
command-line.
The Skov board shouldn't run with overdrive frequencies and I prefer to encode
that in the same device tree, where I define the permissible VDD_SOC range
and configure the initial clock rates.
The mode is selected by the VDD_SOC voltage, but affects AFAICS only the clock
tree. IMO, the clock controller module is thus a natural place for the property.
Cheers,
Ahmad
>
> Thanks,
> Peng
>
>> +
>> err = of_clk_add_hw_provider(np, of_clk_hw_onecell_get, clk_hw_data);
>> if (err < 0) {
>> dev_err(dev, "failed to register hws for i.MX8MP\n");
>>
>> --
>> 2.39.5
>>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
next prev parent reply other threads:[~2024-12-20 6:30 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-12-19 7:27 [PATCH 0/6] arm64: dts: freescale: imx8mp-skov: switch to nominal drive mode Ahmad Fatoum
2024-12-19 7:27 ` [PATCH 1/6] dt-bindings: clock: imx8m: document nominal/overdrive properties Ahmad Fatoum
2024-12-19 19:49 ` Conor Dooley
2024-12-19 20:14 ` Ahmad Fatoum
2024-12-25 14:20 ` Conor Dooley
2024-12-26 16:54 ` Ahmad Fatoum
2024-12-27 17:48 ` Conor Dooley
2024-12-19 7:27 ` [PATCH 2/6] arm64: dts: imx8mp: Add optional nominal drive mode DTSI Ahmad Fatoum
2025-01-06 9:21 ` Peng Fan
2024-12-19 7:27 ` [PATCH 3/6] arm64: dts: imx8mp: add fsl,nominal-mode property into nominal.dtsi Ahmad Fatoum
2024-12-19 7:27 ` [PATCH 4/6] arm64: dts: freescale: imx8mp-skov: fix LDB clock rate configuration Ahmad Fatoum
2024-12-19 7:27 ` [PATCH 5/6] arm64: dts: freescale: imx8mp-skov: operate SoC in nominal mode Ahmad Fatoum
2024-12-19 7:27 ` [PATCH 6/6] clk: imx8mp: inform CCF of maximum frequency of clocks Ahmad Fatoum
2024-12-20 6:18 ` Peng Fan
2024-12-20 6:30 ` Ahmad Fatoum [this message]
2024-12-30 1:38 ` Peng Fan
2025-01-06 9:08 ` Peng Fan
2024-12-20 6:16 ` [PATCH 0/6] arm64: dts: freescale: imx8mp-skov: switch to nominal drive mode Peng Fan
2024-12-20 6:21 ` Ahmad Fatoum
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=22faf38d-3e64-40b8-9896-dcccefcc181a@pengutronix.de \
--to=a.fatoum@pengutronix.de \
--cc=abel.vesa@linaro.org \
--cc=abelvesa@kernel.org \
--cc=conor+dt@kernel.org \
--cc=devicetree@vger.kernel.org \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk+dt@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=marex@denx.de \
--cc=mturquette@baylibre.com \
--cc=peng.fan@nxp.com \
--cc=peng.fan@oss.nxp.com \
--cc=robh@kernel.org \
--cc=s.hauer@pengutronix.de \
--cc=sboyd@kernel.org \
--cc=shawnguo@kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox