[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-ID: <5f508f1d-2d08-4687-86cd-d1944caa0a49@ti.com>
Date: Tue, 23 Sep 2025 16:22:31 +0530
From: Sebin Francis <sebin.francis@...com>
To: Peng Fan <peng.fan@....com>, Michael Turquette <mturquette@...libre.com>,
Stephen Boyd <sboyd@...nel.org>, Sudeep Holla <sudeep.holla@....com>,
Cristian Marussi <cristian.marussi@....com>,
Marco Felsch
<m.felsch@...gutronix.de>, Rob Herring <robh@...nel.org>,
Krzysztof Kozlowski
<krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Brian Masney
<bmasney@...hat.com>
CC: Dan Carpenter <dan.carpenter@...aro.org>,
Geert Uytterhoeven
<geert@...ux-m68k.org>,
<linux-clk@...r.kernel.org>, <linux-kernel@...r.kernel.org>,
<arm-scmi@...r.kernel.org>, <linux-arm-kernel@...ts.infradead.org>,
<devicetree@...r.kernel.org>
Subject: Re: [PATCH v4 5/5] clk: scmi: Support Spread Spectrum for NXP i.MX95
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@....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
Powered by blists - more mailing lists