From: Cristian Marussi <cristian.marussi@arm.com>
To: Peng Fan <peng.fan@oss.nxp.com>
Cc: Cristian Marussi <cristian.marussi@arm.com>,
Stephen Boyd <sboyd@kernel.org>,
Michael Turquette <mturquette@baylibre.com>,
Russell King <linux@armlinux.org.uk>,
Sudeep Holla <sudeep.holla@arm.com>,
linux-clk@vger.kernel.org, linux-kernel@vger.kernel.org,
arm-scmi@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
Rob Herring <robh@kernel.org>,
Krzysztof Kozlowski <krzk@kernel.org>,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
Shawn Guo <shawnguo@kernel.org>,
Sascha Hauer <s.hauer@pengutronix.de>,
Pengutronix Kernel Team <kernel@pengutronix.de>,
Fabio Estevam <festevam@gmail.com>,
imx@lists.linux.dev, Peng Fan <peng.fan@nxp.com>
Subject: Re: [PATCH 1/3] clk: Introduce clk_set_spread_spectrum
Date: Mon, 3 Feb 2025 11:22:39 +0000 [thread overview]
Message-ID: <Z6Cm_4XTRHdDluhh@pluto> (raw)
In-Reply-To: <20250203114722.GA20298@localhost.localdomain>
On Mon, Feb 03, 2025 at 07:47:22PM +0800, Peng Fan wrote:
> On Mon, Feb 03, 2025 at 09:43:39AM +0000, Cristian Marussi wrote:
> >On Sun, Feb 02, 2025 at 06:42:56PM +0800, Peng Fan wrote:
> >> On Tue, Jan 28, 2025 at 12:25:28PM -0800, Stephen Boyd wrote:
> >> >Quoting Peng Fan (OSS) (2025-01-24 06:25:17)
> >> >> diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c
> >> >> index cf7720b9172ff223d86227aad144e15375ddfd86..a4fe4a60f839244b736e3c2751eeb38dc4577b1f 100644
> >> >> --- a/drivers/clk/clk.c
> >> >> +++ b/drivers/clk/clk.c
Hi Peng,
> >> >> @@ -2790,6 +2790,45 @@ int clk_set_max_rate(struct clk *clk, unsigned long rate)
> >> >> }
> >> >> EXPORT_SYMBOL_GPL(clk_set_max_rate);
[snip]
> >> >
> >> >> + *
> >> >> + * Configure the spread spectrum parameters for a clock.
> >> >> + *
> >> >> + * Returns success (0) or negative errno.
> >> >> + */
> >> >> +int clk_set_spread_spectrum(struct clk *clk, unsigned int modfreq,
> >> >
> >> >Does this need to be a consumer API at all? Usually SSC is figured out
> >> >when making a board and you have to pass some certification testing
> >> >because some harmonics are interfering. Is the DT property sufficient
> >> >for now and then we can do it when the driver probes in the framework?
> >>
> >> I suppose 'DT property' you are refering the stm32 and i.MX8M SSC patchsets.
> >> I am proposing a generic interface for drivers to enable SSC.
> >> Otherwise we need to introduce vendor properties for each vendor.
> >> And looking at clk-scmi.c, we need a generic way to enable SSC, I think SCMI
> >> maintainers not agree to add vendor properties for it.
> >>
> >
> >To clarify, from the SCMI point of view, I expressed the idea that it
> >would make sense to have a common SSC interface on the SCMI backend too
> >instead of a custom NXP since you are adding a common CLK framework feature,
> >BUT only if it turns out, from this discussion, that a common general way of
> >configuring SSC can be found...and I dont know that, so I am waiting to see
> >what this discussion with CLK framework and iMX maintainers goes before
> >excluding the SCMI CLK vendor OEM types scenario...it would be ideal and
> >easier NOT to use SCMI vendor extensions BUT ONLY if this NXP SSC/config generic
> >solution is deemed to be really generic and usable by any other vendor.
>
> You may misunderstand. Using DT properties for clk-scmi.c to configure SSC
> of a single clock means to add properties under clk scmi node, such
> as:
> "arm,modfreq = <x>, <y>, <z>;
> arm,moddepth = <a>, <b>, <c>;
> arm,modmethod = <j>, <l>, <m>;"
>
> And during probe in clk-scmi.c, the properties needs to be parsed and when
> clk is configured, the ssc settings need to be passed to scmi platform.
>
> But per the i.MX8M SSC patchset that DT maintainers raised,
> the properties(fsl,modfreq and etc) needs to in consumer side,
> not provider side.
>
> So it is not feasible to add properties here.
>
Thanks for the clarification.
> "assigned-clock-sscs" could be put under consumer node and clocks
> could be configured with SSC when needed. This is a generic property.
>
Yes I understood this, the property that describes SSC that you are
adding is generic BUT are also the related params needed to describe
effectively the SSC
IOW, if we add, as desirable, a generic new SSC type in extended configs
instead of using a vendor oem, will these info down below passed to the SCMI:
+ /*
+ * extConfigValue[7:0] - spread percentage (%)
+ * extConfigValue[23:8] - Modulation Frequency (KHz)
+ * extConfigValue[24] - Enable/Disable
+ * extConfigValue[31:25] - Reserved
+ */
... be enough to describe the required SSC config to any generic SCMI server
from any vendor using any HW ?
... or is it plausible and maybe frequent/usual that other vendors could
need additional specific params to be fed to the server, so that we
will end up using the new standard SSC only for NXP ?
IOW the property is generic, agreed, but are the described params above
generic enough too ? ... that was my concern from an UN-educated point
of view...of course, I am talking about the most common scenarios, if
some other vendor ends up needing some arcane/magic specific param that
cannot fit the above, they will be relegated to the OEM custom spaces
even if this common SSC is available.
> Back to NXP SCMI vendor extension, if SCMI spec could include SSC, NXP
> SCMI could move to align with spec and not use vendor extension.
>
Agreed, conditional to the above doubts.
Apologies if I have asked dumb/obvious questions, but I am not familiar
with the subject matter enough...
Thanks,
Cristian
next prev parent reply other threads:[~2025-02-03 11:24 UTC|newest]
Thread overview: 18+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-01-24 14:25 [PATCH 0/3] clk: Support spread spectrum and use it in clk-scmi Peng Fan (OSS)
2025-01-24 14:25 ` [PATCH 1/3] clk: Introduce clk_set_spread_spectrum Peng Fan (OSS)
2025-01-24 13:51 ` Dan Carpenter
2025-01-28 20:25 ` Stephen Boyd
2025-02-02 10:42 ` Peng Fan
2025-02-03 9:43 ` Cristian Marussi
2025-02-03 11:47 ` Peng Fan
2025-02-03 11:22 ` Cristian Marussi [this message]
2025-02-04 0:31 ` Peng Fan
2025-01-24 14:25 ` [PATCH 2/3] clk: conf: Support assigned-clock-sscs Peng Fan (OSS)
2025-01-24 14:25 ` [PATCH 3/3] clk: scmi: Support spread spectrum Peng Fan (OSS)
2025-01-24 21:33 ` kernel test robot
2025-01-28 12:07 ` Cristian Marussi
2025-01-25 12:58 ` [PATCH 0/3] clk: Support spread spectrum and use it in clk-scmi Dario Binacchi
2025-01-27 7:42 ` Krzysztof Kozlowski
2025-01-27 7:59 ` Dario Binacchi
2025-01-27 8:31 ` Krzysztof Kozlowski
2025-01-27 8:35 ` Dario Binacchi
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=Z6Cm_4XTRHdDluhh@pluto \
--to=cristian.marussi@arm.com \
--cc=arm-scmi@vger.kernel.org \
--cc=dario.binacchi@amarulasolutions.com \
--cc=festevam@gmail.com \
--cc=imx@lists.linux.dev \
--cc=kernel@pengutronix.de \
--cc=krzk@kernel.org \
--cc=linux-arm-kernel@lists.infradead.org \
--cc=linux-clk@vger.kernel.org \
--cc=linux-kernel@vger.kernel.org \
--cc=linux@armlinux.org.uk \
--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 \
--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;
as well as URLs for NNTP newsgroup(s).