devicetree.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH v4 0/5] clk: Support spread spectrum and use it in clk-scmi
@ 2025-09-15  8:29 Peng Fan
  2025-09-15  8:29 ` [PATCH v4 1/5] dt-bindings: clock: Add spread spectrum definition Peng Fan
                   ` (5 more replies)
  0 siblings, 6 replies; 24+ messages in thread
From: Peng Fan @ 2025-09-15  8:29 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Sudeep Holla, Cristian Marussi,
	Marco Felsch, Rob Herring, Krzysztof Kozlowski, Conor Dooley,
	Brian Masney
  Cc: Dan Carpenter, Geert Uytterhoeven, linux-clk, linux-kernel,
	arm-scmi, linux-arm-kernel, devicetree, Peng Fan

Since the assigned-clock-sscs property [1] has been accepted into the device
tree schema, we can now support it in the Linux clock driver. Therefore,
I’ve picked up the previously submitted work [2] titled “clk: Support
spread spectrum and use it in clk-pll144x and clk-scmi.”
As more than six months have passed since [2] was posted, I’m treating this
patchset as a new submission rather than a v3.

- Introduce clk_set_spread_spectrum to set the parameters for enabling
  spread spectrum of a clock.
- Parse 'assigned-clock-sscs' and configure it by default before using the
  clock. This property is parsed before parsing clock rate.
- Enable this feature for clk-scmi on i.MX95.

Because SCMI spec will not include spread spectrum as a standard
extension, we still need to use NXP i.MX OEM extension.

[1] https://github.com/devicetree-org/dt-schema/pull/154
[2] https://lore.kernel.org/all/20250205-clk-ssc-v2-0-fa73083caa92@nxp.com/

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v4:
- Add R-b for patch 1 from Brian
- Drop unecessary change in patch 4 Per Brian
- Link to v3: https://lore.kernel.org/r/20250912-clk-ssc-version1-v3-0-fd1e07476ba1@nxp.com

Changes in v3:
- New patch 1 for dt-bindings per comment from Brian
  https://lore.kernel.org/all/aLeEFzXkPog_dt2B@x1/
  This might not be good to add a new dt-binding file in v3. But this is
  quite a simple file that just has four macros to encode modulation
  method. So hope this is fine for DT maintainers.
- Add Brain's R-b for patch 2
- New patch 3 to add Kunit test per Brain. Since Brain helped
  draft part of the code, I added Co-developed-by tag from Brain.
- Link to v2: https://lore.kernel.org/r/20250901-clk-ssc-version1-v2-0-1d0a486dffe6@nxp.com

Changes in v2:
- Simplify the code in patch 2 per Dan Carpenter and Brian Masney
- Rebased to next-20250829
- Link to v1: https://lore.kernel.org/r/20250812-clk-ssc-version1-v1-0-cef60f20d770@nxp.com

---
Peng Fan (5):
      dt-bindings: clock: Add spread spectrum definition
      clk: Introduce clk_hw_set_spread_spectrum
      clk: conf: Support assigned-clock-sscs
      clk: Add KUnit tests for assigned-clock-sscs
      clk: scmi: Support Spread Spectrum for NXP i.MX95

 drivers/clk/Makefile                               |   6 +
 drivers/clk/clk-conf.c                             |  69 ++++++++++++
 drivers/clk/clk-scmi.c                             |  64 ++++++++++-
 drivers/clk/clk.c                                  |  26 +++++
 drivers/clk/clk_test.c                             | 121 ++++++++++++++++++++-
 drivers/clk/kunit_clk_assigned_rates.h             |  10 ++
 drivers/clk/kunit_clk_assigned_rates_multiple.dtso |   6 +
 ...kunit_clk_assigned_rates_multiple_consumer.dtso |   6 +
 drivers/clk/kunit_clk_assigned_rates_one.dtso      |   3 +
 .../clk/kunit_clk_assigned_rates_one_consumer.dtso |   3 +
 .../clk/kunit_clk_assigned_rates_u64_multiple.dtso |   6 +
 ...t_clk_assigned_rates_u64_multiple_consumer.dtso |   6 +
 drivers/clk/kunit_clk_assigned_rates_u64_one.dtso  |   3 +
 .../kunit_clk_assigned_rates_u64_one_consumer.dtso |   3 +
 drivers/clk/kunit_clk_assigned_sscs_null.dtso      |  16 +++
 .../clk/kunit_clk_assigned_sscs_null_consumer.dtso |  20 ++++
 drivers/clk/kunit_clk_assigned_sscs_without.dtso   |  15 +++
 .../kunit_clk_assigned_sscs_without_consumer.dtso  |  19 ++++
 drivers/clk/kunit_clk_assigned_sscs_zero.dtso      |  12 ++
 .../clk/kunit_clk_assigned_sscs_zero_consumer.dtso |  16 +++
 include/dt-bindings/clock/clock.h                  |  14 +++
 include/linux/clk-provider.h                       |  22 ++++
 include/linux/scmi_protocol.h                      |   5 +
 23 files changed, 464 insertions(+), 7 deletions(-)
---
base-commit: 8941e75c0f122fdd76dc54ed45c4ce917587e006
change-id: 20250812-clk-ssc-version1-acf6f6efbd96

Best regards,
-- 
Peng Fan <peng.fan@nxp.com>


^ permalink raw reply	[flat|nested] 24+ messages in thread

end of thread, other threads:[~2025-10-08 12:31 UTC | newest]

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
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
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

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).