mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Frank Li <Frank.li@nxp.com>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
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,
	Conor Dooley <conor.dooley@microchip.com>
Subject: Re: [PATCH v2 1/6] dt-bindings: clock: imx8m: document nominal/overdrive properties
Date: Mon, 6 Jan 2025 11:41:11 -0500	[thread overview]
Message-ID: <Z3wHp6eLQuV9GGvh@lizhi-Precision-Tower-5810> (raw)
In-Reply-To: <20250106-imx8m-clk-v2-1-6aaeadac65fe@pengutronix.de>

On Mon, Jan 06, 2025 at 03:21:42PM +0100, Ahmad Fatoum wrote:
> The imx8m-clock.yaml binding covers the clock controller inside all
> of the i.MX8M Q/M/N/P SoCs. All of them have in common that they
> support two operating modes: nominal and overdrive mode.
>
> While the overdrive mode allows for higher frequencies for many IPs,
> the nominal mode needs a lower SoC voltage, thereby reducing
> heat generation and power usage.
>
> As increasing clock rates beyond the maximum permitted by the supplied
> SoC voltage can lead to difficult to debug issues, device tree consumers
> would benefit from knowing what mode is active to enforce the clock rate
> limits that come with it.
>
> To facilitate this, extend the clock controller bindings with two mutually
> exclusive optional properties. Allowing for absence of both properties is
> needed, because there is no default suitable for all boards:
>
> For i.MX8M Mini and Nano, the kernel SoC DTSIs has assigned-clock-rates
> that are all achievable in nominal mode. For i.MX8MP, there are some
> rates only validated for overdrive mode.
>
> But even for the i.MX8M Mini/Nano boards, we don't know what rates they
> may configure at runtime, so it has not been possible so far to infer from
> just the device tree what the mode is.
>
> Acked-by: Conor Dooley <conor.dooley@microchip.com>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
>  Documentation/devicetree/bindings/clock/imx8m-clock.yaml | 14 ++++++++++++++
>  1 file changed, 14 insertions(+)
>
> diff --git a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml
> index c643d4a814786a1fc7e559140fe58911990f71bb..a6ae5257ef531f3fa8506d515d202f5b7842c4fa 100644
> --- a/Documentation/devicetree/bindings/clock/imx8m-clock.yaml
> +++ b/Documentation/devicetree/bindings/clock/imx8m-clock.yaml
> @@ -43,6 +43,14 @@ properties:
>        ID in its "clocks" phandle cell. See include/dt-bindings/clock/imx8m-clock.h
>        for the full list of i.MX8M clock IDs.
>
> +  fsl,nominal-mode:
> +    description: Set if SoC is operated in nominal mode
> +    $ref: /schemas/types.yaml#/definitions/flag
> +
> +  fsl,overdrive-mode:
> +    description: Set if SoC is operated in overdrive mode
> +    $ref: /schemas/types.yaml#/definitions/flag
> +

why need two flags? suppose "not set fsl,overdrive-mode" is equal to
fsl,nominal-mode

Frank

>  required:
>    - compatible
>    - reg
> @@ -95,6 +103,12 @@ allOf:
>              - const: clk_ext2
>              - const: clk_ext3
>              - const: clk_ext4
> +  - if:
> +      required:
> +        - fsl,overdrive-mode
> +    then:
> +      properties:
> +        fsl,nominal-mode: false
>
>  additionalProperties: false
>
>
> --
> 2.39.5
>

  reply	other threads:[~2025-01-06 16:41 UTC|newest]

Thread overview: 16+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-01-06 14:21 [PATCH v2 0/6] arm64: dts: freescale: imx8mp-skov: switch to nominal drive mode Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 1/6] dt-bindings: clock: imx8m: document nominal/overdrive properties Ahmad Fatoum
2025-01-06 16:41   ` Frank Li [this message]
2025-01-06 19:25     ` Ahmad Fatoum
2025-01-06 19:42       ` Frank Li
2025-01-06 19:55         ` Ahmad Fatoum
2025-01-07  6:52           ` Krzysztof Kozlowski
2025-01-13 13:51             ` Ahmad Fatoum
2025-01-13 13:52         ` Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 2/6] arm64: dts: imx8mp: Add optional nominal drive mode DTSI Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 3/6] arm64: dts: imx8mp: add fsl,nominal-mode property into nominal.dtsi Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 4/6] arm64: dts: freescale: imx8mp-skov: fix LDB clock rate configuration Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 5/6] arm64: dts: freescale: imx8mp-skov: operate SoC in nominal mode Ahmad Fatoum
2025-01-06 14:21 ` [PATCH v2 6/6] clk: imx8mp: inform CCF of maximum frequency of clocks Ahmad Fatoum
2025-01-06 23:42   ` Stephen Boyd
2025-01-13 13:48     ` 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=Z3wHp6eLQuV9GGvh@lizhi-Precision-Tower-5810 \
    --to=frank.li@nxp.com \
    --cc=a.fatoum@pengutronix.de \
    --cc=abel.vesa@linaro.org \
    --cc=abelvesa@kernel.org \
    --cc=conor+dt@kernel.org \
    --cc=conor.dooley@microchip.com \
    --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=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

all inboxes | Powered by JetHome®