public inbox for linux-clk@vger.kernel.org
 help / color / mirror / Atom feed
From: Sebin Francis <sebin.francis@ti.com>
To: Peng Fan <peng.fan@nxp.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Sudeep Holla <sudeep.holla@arm.com>,
	Cristian Marussi <cristian.marussi@arm.com>,
	Marco Felsch <m.felsch@pengutronix.de>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Brian Masney <bmasney@redhat.com>
Cc: Dan Carpenter <dan.carpenter@linaro.org>,
	Geert Uytterhoeven <geert@linux-m68k.org>,
	<linux-clk@vger.kernel.org>, <linux-kernel@vger.kernel.org>,
	<arm-scmi@vger.kernel.org>,
	<linux-arm-kernel@lists.infradead.org>,
	<devicetree@vger.kernel.org>
Subject: Re: [PATCH v4 5/5] clk: scmi: Support Spread Spectrum for NXP i.MX95
Date: Tue, 23 Sep 2025 16:22:31 +0530	[thread overview]
Message-ID: <5f508f1d-2d08-4687-86cd-d1944caa0a49@ti.com> (raw)
In-Reply-To: <20250915-clk-ssc-version1-v4-5-5a2cee2f0351@nxp.com>

Hi Peng

On 15/09/25 13:59, Peng Fan wrote:
> The PLL clocks on NXP i.MX95 SoCs support Spread Spectrum (SS).
> This patch introduces scmi_clk_imx_set_spread_spectrum to pass SS
> configuration to the SCMI firmware, which handles the actual
> implementation.
> 
> To ensure this feature is only enabled on NXP platforms,
> scmi_clk_imx_extended_config_oem is added. Since SS is only applicable
> to PLL clocks, config_oem_get is used to verify SS support for a given
> clock.
> 
> i.MX95 SCMI firmware Spread Spectrum extConfigValue definition is as
> below, no modulation method because firmware forces to use down spread.
> 	 extConfigValue[7:0]   - spread percentage (%)
> 	 extConfigValue[23:8]  - Modulation Frequency (KHz)
> 	 extConfigValue[24]    - Enable/Disable
> 	 extConfigValue[31:25] - Reserved
> 
> Signed-off-by: Peng Fan <peng.fan@nxp.com>
> ---

...

>   	if (WARN_ON(feats_key >= db_size))
>   		return NULL;
>   
> @@ -459,7 +515,7 @@ static int scmi_clocks_probe(struct scmi_device *sdev)
>   		 * to avoid sharing the devm_ allocated clk_ops between multiple
>   		 * SCMI clk driver instances.
>   		 */
> -		scmi_ops = scmi_clk_ops_select(sclk, transport_is_atomic,
> +		scmi_ops = scmi_clk_ops_select(handle, sclk, transport_is_atomic,
>   					       atomic_threshold_us,
>   					       scmi_clk_ops_db,
>   					       ARRAY_SIZE(scmi_clk_ops_db));
> diff --git a/include/linux/scmi_protocol.h b/include/linux/scmi_protocol.h
> index aafaac1496b06a6e4f0ca32eee58a9edf7d4a70f..37f422b4b1ef2af2b4231a1677161aa24e07d0e2 100644
> --- a/include/linux/scmi_protocol.h
> +++ b/include/linux/scmi_protocol.h
> @@ -80,9 +80,14 @@ enum scmi_clock_oem_config {
>   	SCMI_CLOCK_CFG_DUTY_CYCLE = 0x1,
>   	SCMI_CLOCK_CFG_PHASE,
>   	SCMI_CLOCK_CFG_OEM_START = 0x80,
> +	SCMI_CLOCK_CFG_IMX_SSC = 0x80,

TI is also planning to implement the same in our upcoming platform. so 
can we use a generic ID instead of vender specfic message ID?

>   	SCMI_CLOCK_CFG_OEM_END = 0xFF,
>   };
>   
> +#define SCMI_CLOCK_IMX_SS_PERCENTAGE_MASK	GENMASK(7, 0)
> +#define SCMI_CLOCK_IMX_SS_MOD_FREQ_MASK		GENMASK(23, 8)
> +#define SCMI_CLOCK_IMX_SS_ENABLE_MASK		BIT(24)
> +
>   /**
>    * struct scmi_clk_proto_ops - represents the various operations provided
>    *	by SCMI Clock Protocol
> 

Thanks
Sebin

  reply	other threads:[~2025-09-23 10:53 UTC|newest]

Thread overview: 24+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-09-15  8:29 [PATCH v4 0/5] clk: Support spread spectrum and use it in clk-scmi Peng Fan
2025-09-15  8:29 ` [PATCH v4 1/5] dt-bindings: clock: Add spread spectrum definition Peng Fan
2025-09-22 16:02   ` Rob Herring (Arm)
2025-09-15  8:29 ` [PATCH v4 2/5] clk: Introduce clk_hw_set_spread_spectrum Peng Fan
2025-09-21 20:53   ` Stephen Boyd
2025-09-22  2:05     ` Peng Fan
2025-09-15  8:29 ` [PATCH v4 3/5] clk: conf: Support assigned-clock-sscs Peng Fan
2025-10-06 10:44   ` Sebin Francis
2025-10-08 12:31     ` Peng Fan
2025-09-15  8:29 ` [PATCH v4 4/5] clk: Add KUnit tests for assigned-clock-sscs Peng Fan
2025-09-15 12:29   ` Brian Masney
2025-09-15  8:29 ` [PATCH v4 5/5] clk: scmi: Support Spread Spectrum for NXP i.MX95 Peng Fan
2025-09-23 10:52   ` Sebin Francis [this message]
2025-09-23 11:57     ` Peng Fan
2025-09-24  9:25       ` Sebin Francis
2025-09-24 11:43         ` Peng Fan
2025-09-24 12:15           ` Sebin Francis
2025-09-24 12:40             ` Cristian Marussi
2025-09-24 12:59               ` Sudeep Holla
2025-09-24 14:14               ` Peng Fan
2025-09-24 13:13           ` Sudeep Holla
2025-09-24 14:35             ` Peng Fan
2025-09-24 14:44 ` [PATCH v4 0/5] clk: Support spread spectrum and use it in clk-scmi Peng Fan
2025-09-24 15:33   ` Brian Masney

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=5f508f1d-2d08-4687-86cd-d1944caa0a49@ti.com \
    --to=sebin.francis@ti.com \
    --cc=arm-scmi@vger.kernel.org \
    --cc=bmasney@redhat.com \
    --cc=conor+dt@kernel.org \
    --cc=cristian.marussi@arm.com \
    --cc=dan.carpenter@linaro.org \
    --cc=devicetree@vger.kernel.org \
    --cc=geert@linux-m68k.org \
    --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=m.felsch@pengutronix.de \
    --cc=mturquette@baylibre.com \
    --cc=peng.fan@nxp.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=sudeep.holla@arm.com \
    /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