|
|
Subscribe / Log in / New account

clk: Support spread spectrum and use it in clk-scmi

From:  "Peng Fan (OSS)" <peng.fan-AT-oss.nxp.com>
To:  Michael Turquette <mturquette-AT-baylibre.com>, Stephen Boyd <sboyd-AT-kernel.org>, Russell King <linux-AT-armlinux.org.uk>, Sudeep Holla <sudeep.holla-AT-arm.com>, Cristian Marussi <cristian.marussi-AT-arm.com>
Subject:  [PATCH 0/3] clk: Support spread spectrum and use it in clk-scmi
Date:  Fri, 24 Jan 2025 22:25:16 +0800
Message-ID:  <20250124-clk-ssc-v1-0-2d39f6baf2af@nxp.com>
Cc:  linux-clk-AT-vger.kernel.org, linux-kernel-AT-vger.kernel.org, arm-scmi-AT-vger.kernel.org, linux-arm-kernel-AT-lists.infradead.org, Rob Herring <robh-AT-kernel.org>, Krzysztof Kozlowski <krzk-AT-kernel.org>, Dario Binacchi <dario.binacchi-AT-amarulasolutions.com>, Shawn Guo <shawnguo-AT-kernel.org>, Sascha Hauer <s.hauer-AT-pengutronix.de>, Pengutronix Kernel Team <kernel-AT-pengutronix.de>, Fabio Estevam <festevam-AT-gmail.com>, imx-AT-lists.linux.dev, Peng Fan <peng.fan-AT-nxp.com>
Archive-link:  Article

- 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_imx;

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

Signed-off-by: Peng Fan <peng.fan@nxp.com>
---
Peng Fan (3):
      clk: Introduce clk_set_spread_spectrum
      clk: conf: Support assigned-clock-sscs
      clk: scmi: Support spread spectrum

 drivers/clk/clk-conf.c        | 68 +++++++++++++++++++++++++++++++++++++++++++
 drivers/clk/clk-scmi.c        | 37 +++++++++++++++++++++++
 drivers/clk/clk.c             | 39 +++++++++++++++++++++++++
 include/linux/clk-provider.h  | 22 ++++++++++++++
 include/linux/clk.h           | 22 ++++++++++++++
 include/linux/scmi_protocol.h |  5 ++++
 6 files changed, 193 insertions(+)
---
base-commit: 5ffa57f6eecefababb8cbe327222ef171943b183
change-id: 20250124-clk-ssc-fccd4f60d7e5

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




Copyright © 2025, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds