imx.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [PATCH v2 0/4] clk: Support spread spectrum and use it in clk-pll144x and clk-scmi
@ 2025-02-05  9:49 Peng Fan (OSS)
  2025-02-05  9:49 ` [PATCH v2 1/4] clk: Introduce clk_hw_set_spread_spectrum Peng Fan (OSS)
                   ` (4 more replies)
  0 siblings, 5 replies; 24+ messages in thread
From: Peng Fan (OSS) @ 2025-02-05  9:49 UTC (permalink / raw)
  To: Michael Turquette, Stephen Boyd, Russell King, Sudeep Holla,
	Cristian Marussi, Abel Vesa
  Cc: linux-clk, linux-kernel, arm-scmi, linux-arm-kernel, Rob Herring,
	Krzysztof Kozlowski, Dario Binacchi, Shawn Guo, Sascha Hauer,
	Pengutronix Kernel Team, Fabio Estevam, imx, Peng Fan

- 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. The pull request for this property is at [1]
  This property is parsed before parsing clock rate.

- Enable this feature for clk-scmi on i.MX95.
  This may not the best, since checking machine compatibles.
  I am thinking to provide an API scmi_get_vendor_info, then driver
  could use it for OEM stuff, such as
  if (scmi_get_vendor_info returns NXP_IMX)
      ops->set_spread_spectrum = scmi_clk_set_spread_spectrum;

[1] https://github.com/devicetree-org/dt-schema/pull/154

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Changes in v2:
- Rename to clk_hw_set_spread_spectrum and not export it as consumer API.
- Fix error handling
- The enable parameter is still kept, because 0% is valid per
  https://www.ti.com/lit/an/scaa103/scaa103.pdf?ts=1738667308903
  https://www.synopsys.com/blogs/chip-design/understanding-pcie-spread-spectrum-clocking.html
- Include the i.MX clk pll14xx which was an effort to enable SSC on
i.MX8MN from https://lore.kernel.org/all/20250118124044.157308-1-dario.binacchi@amarulasolutions.com/
  With this patchset, things could be simplied a lot.
- Update the clk-scmi extconfig, marked as not apply, because spec not settle down.
- Link to v1: https://lore.kernel.org/linux-clk/20250124-clk-ssc-v1-0-2d39f6baf2af@nxp.com/T/#mce926ef10d3d9c1c960c21867c2f1509f1f87cb9

---
Peng Fan (4):
      clk: Introduce clk_hw_set_spread_spectrum
      clk: conf: Support assigned-clock-sscs
      clk: imx: pll14xx: support spread spectrum clock generation
      [NOT APPLY] clk: scmi: Support spread spectrum

 drivers/clk/clk-conf.c        | 70 +++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/clk-scmi.c        | 47 +++++++++++++++++++++++++++--
 drivers/clk/clk.c             | 34 +++++++++++++++++++++
 drivers/clk/imx/clk-pll14xx.c | 66 ++++++++++++++++++++++++++++++++++++++++
 include/linux/clk-provider.h  | 32 ++++++++++++++++++++
 include/linux/clk.h           | 22 ++++++++++++++
 include/linux/scmi_protocol.h |  6 ++++
 7 files changed, 275 insertions(+), 2 deletions(-)
---
base-commit: 40b8e93e17bff4a4e0cc129e04f9fdf5daa5397e
change-id: 20250124-clk-ssc-f3d70fb6cd1c

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


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

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

Thread overview: 24+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2025-02-05  9:49 [PATCH v2 0/4] clk: Support spread spectrum and use it in clk-pll144x and clk-scmi Peng Fan (OSS)
2025-02-05  9:49 ` [PATCH v2 1/4] clk: Introduce clk_hw_set_spread_spectrum Peng Fan (OSS)
2025-02-05 12:02   ` Marco Felsch
2025-02-06  0:38     ` Peng Fan
2025-02-06  9:47       ` Marco Felsch
2025-02-13 10:06   ` Geert Uytterhoeven
2025-02-05  9:49 ` [PATCH v2 2/4] clk: conf: Support assigned-clock-sscs Peng Fan (OSS)
2025-02-05  9:49 ` [PATCH v2 3/4] clk: imx: pll14xx: support spread spectrum clock generation Peng Fan (OSS)
2025-02-05 11:19   ` Dario Binacchi
2025-02-06  0:53     ` Peng Fan
2025-02-06 15:31       ` Dario Binacchi
2025-02-06 16:16         ` Sudeep Holla
2025-02-07 11:26           ` Peng Fan
2025-02-07 13:14             ` Sudeep Holla
2025-02-07 10:42         ` Peng Fan
2025-02-05  9:49 ` [PATCH NOT APPLY v2 4/4] clk: scmi: Support spread spectrum Peng Fan (OSS)
2025-02-06 12:26   ` Cristian Marussi
2025-02-06 14:00     ` Peng Fan
2025-03-03  4:11     ` Peng Fan
2025-03-05 17:29       ` Cristian Marussi
2025-03-10  8:16         ` Peng Fan
2025-03-12 15:07           ` Cristian Marussi
2025-02-24 13:09 ` [PATCH v2 0/4] clk: Support spread spectrum and use it in clk-pll144x and clk-scmi Peng Fan (OSS)
2025-03-12 16:02   ` Peng Fan

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