From nobody Sat Sep 26 13:08:28 2026 Received: from mail-wr1-f54.google.com (mail-wr1-f54.google.com [209.85.221.54]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 5C3B6339383 for ; Tue, 1 Sep 2026 09:09:32 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.54 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788253777; cv=none; b=tB24eRTbE7LSmy1tMiXq6dzuAAAd14FuEkepeRGLi6jpFVTUetW0N6qmObc1NG+fYxWPQbw3UEqpFYcUXvvPOSJeh6ucDfMna8Da+zE8mJ35w/Gle9qyQhbTlmxeuirzHNjnCH9V/PgfzlBaTYEzduIUne/DorTCqzHeYSMvhtg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788253777; c=relaxed/simple; bh=5CTW8T/SpDQx4JzZBtps7+Yl+CTAibFCz311cgv/i+4=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=NjWe4qCWq+g7CICDoUgPYHbWZ/e66H2uV3qIvbvyZ9iqlcmnSDbxWuMHU1GQJIUx/Ki9JOMp7Z6pPWzMwyZ/AUQP8ko4/mv7KtZDQEntQWBGoym85XsEpxtbBFqXTmaR7Ni8L8Xv2iOwhndBi4izbZTmKhfsqDZcXbRF2Ys0DCk= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=Qs77gbQj; arc=none smtp.client-ip=209.85.221.54 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="Qs77gbQj" Received: by mail-wr1-f54.google.com with SMTP id ffacd0b85a97d-48433e9562bso485588f8f.3 for ; Tue, 01 Sep 2026 02:09:31 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1788253769; x=1788858569; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=SfZRa8H2WDMJkcsjpztb8rt8s89URmJ5lnAVHSoTHTw=; b=Qs77gbQjzrU0BsvTzTzf9mNjalnGkzbClUFQVBBidj+3ay3koDqn+5DpNWbNe0wUfH mQjGnz9921N8EP9aKtz/xjvXkXq+k9IzHWvoD1omVsXMH1HZzjMG82bq2PTxodj67NDH AG9ikpKjNIPYtJL3rkMl0DmCPI5SNXXX6C5kY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788253769; x=1788858569; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=SfZRa8H2WDMJkcsjpztb8rt8s89URmJ5lnAVHSoTHTw=; b=aj83zs9w6xU+e12Kn2Vq3CMHlAKx0Abvm7xwm57OJ2iPHtVR6sWdtk0N5g7zWk6m+y /ZiCzFM3vbyX92VTCEmR0dWpjywie3MbIoNHNQ6zAKR6JJ21vB/IrhULmk7eKOZndfvs 76N/920RX3QQ34b4Bcn+kLyrdYFl98mq+XixmXKJEt1Mf/N2qqI79ZQPKruXfywe9cDL YpRzTvw+JDkxwSspu7Yewft6xHMgvVkLY9bkmCVLTdNWKBBwkD0bFv7O8+qRC3GxADQB q06oyQocxpz8mwmFSigKVl+EvOKxj0lMHEhI9nfsQBgPiKSwMru+2Yb/2rGR2q4pOqo5 gDEA== X-Gm-Message-State: AFuF++nJAUhWhrVyRHrJCQZyjoaaPOkWRaYHYyRlosOEUuMFKw+SFPTv Z3wcCnfQ+P3QHI7v8XLsRxjFA9R1s0lWwcQtV1EV8zbBsCRFtU6OMVFGLjUu+qQIr6VW9kdcaPz AxgQvwx0= X-Gm-Gg: AYBFou0fWcngJ+Yb3iUX9mPGI+4DjNwGaXQSaPkEqAO9MsB4UluTxxkFLTEWaO/+ZST goqI7DaUNJDhvnJKvk0yl8btBQ4PkPVB5ckzg5D0lNFzd4JJ0pFgKA8bBdtFBHDoMue+hLeQK2j wA3vNhiPOMdQfzsn5vkr4ZqzUPbaOUyPIYpTx0dJ5iizT7PrDE1iCMDi4qocDzSxEm2z4Tr8l/Q nH4eLiaQsXc8fDVlVTJYHVOPdLLZVcV00XrXxX6CWQ6NYiR++pv+f2vuZwh4ERhkOunli9Sy68K 5nrNtuuWYwo2oPHO6pkTI6ay7f8d+tbI1Yl+Tke7Db7nHRp3wPva5nc+CgxzdgdV9k+LBrjz6Qg V5aIrkaV4q0gjLGt2WRnQOfdSHOHpbVaGSYDKPsTz5/Zj/HxMcn1mn2l0bzwWtU/l5IvZmZX5yl 2GB9wLDEAQ3XSLP/Me8zoYJkqkbtpoWldhzHcpqrtsI2o8Nmxa1VHLrNhuCsX7Y+XulEs+R77N/ 5j/FVyo7jTIG2ALxGebntlhZdKtJJuOp4rwBwLWsi7slnoq6Sm5zBA9+598rsIs3YihXiVN3Rzz uSU3Xw5TPFkKa9/p4e+M6YUrUbFbVX36SD81V38JTOmI/ExkLt03sOffBpYW9MmHXg== X-Received: by 2002:a5d:4702:0:b0:481:bb82:3f31 with SMTP id ffacd0b85a97d-482f79db522mr40181489f8f.10.1788253769303; Tue, 01 Sep 2026 02:09:29 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com (host-87-9-102-148.retail.telecomitalia.it. [87.9.102.148]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48442c425cesm3825273f8f.6.2026.09.01.02.09.28 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2026 02:09:28 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Brian Masney , Jerome Brunet , Peng Fan , Sebin Francis , Stephen Boyd , linux-clk@vger.kernel.org Subject: [PATCH v11 1/2] clk: validate spread spectrum configuration Date: Tue, 1 Sep 2026 11:05:17 +0200 Message-ID: <20260901090912.585681-2-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260901090912.585681-1-dario.binacchi@amarulasolutions.com> References: <20260901090912.585681-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" The spread spectrum configuration is passed to the provider's set_spread_spectrum() callback without any validation, as clk-conf.c only skips all-zero triplets from "assigned-clock-sscs". An invalid device tree can hand providers a zero modulation frequency or a spread ratio above 100%, and each provider would have to add the same checks to protect e.g. divisions in its rate computations. Fixes: c86814e70390 ("clk: Introduce clk_hw_set_spread_spectrum") Signed-off-by: Dario Binacchi --- (no changes since v1) drivers/clk/clk.c | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index fef87167a60b..208caf60eeb5 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -2851,6 +2851,20 @@ int clk_hw_set_spread_spectrum(struct clk_hw *hw, co= nst struct clk_spread_spectr if (!hw) return 0; =20 + switch (ss_conf->method) { + case CLK_SPREAD_NO: + break; + case CLK_SPREAD_CENTER: + case CLK_SPREAD_UP: + case CLK_SPREAD_DOWN: + if (!ss_conf->modfreq_hz || !ss_conf->spread_bp || + ss_conf->spread_bp > 10000) + return -EINVAL; + break; + default: + return -EINVAL; + } + core =3D hw->core; =20 clk_prepare_lock(); --=20 2.43.0 From nobody Sat Sep 26 13:08:28 2026 Received: from mail-wr1-f53.google.com (mail-wr1-f53.google.com [209.85.221.53]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 63E47477980 for ; Tue, 1 Sep 2026 09:09:34 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.221.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788253780; cv=none; b=ObvqBwXLNX0TulNPI6GnbTTkt56tW4D+X4hIdkHgqex511ee/ELJOQEsMgzMoDOoJWKL+/Luz5O/Mda+bqBBwk0ttv3wl2h5zdhJszeCQ+cYOEhD1JVasYBlAAXW53tjCZ/FTa3XJYFFKt+eh0t8PCEJQ/WvEvf1sjY4OLlx+kA= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1788253780; c=relaxed/simple; bh=e3RnKQxvSBBwrBU/uS1PB5FHAGGn080Zg3kehKoxACc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=Pt6cLQer1nVE0A2hbI1ZxYEzvVqhJTtCjlidTJ2DvJAedw4y24OPQwcAw0ZBdsj4CE5NSHrio3vtK5O10EgG1r79Up6glCv9sKq6FlWI2S0u2xjOJC/Z75t4Vpyir4kNDWF1xI3mSAaRImrs301/JVDQ9AjqhahRkshLRhQGFNg= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=XyoU5rZa; arc=none smtp.client-ip=209.85.221.53 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="XyoU5rZa" Received: by mail-wr1-f53.google.com with SMTP id ffacd0b85a97d-4843f205a5bso928943f8f.1 for ; Tue, 01 Sep 2026 02:09:34 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1788253771; x=1788858571; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=awL7EJRIIWZmZbuML6Yj4uYN8A8XYeaOTFa5cFWKueY=; b=XyoU5rZaN8DrLnoHg7O0uShD5n0JbSMPhWCwfM8jt4cIwcfljbTH1K3afb0N5Qo3d9 f0+HMoNtBd8eKwwFHzfVhS/H3GdJZq6bv1bR82Kaj1MLTFTVallEJDrkTUvjJfGSob6k +nTPpq7akidGBKRMVxFJKnCEmwURBS2EVbUnk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788253771; x=1788858571; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=awL7EJRIIWZmZbuML6Yj4uYN8A8XYeaOTFa5cFWKueY=; b=L/HJ9HRIgQK2e2yaxlrDupPgLsU4rO4CFXGAWyA6w7DvOm/5JOSQ763Jf0Bc0+4Ubk v3a/5l0FPEXjcc/dtZN8Rnr2hzn1Mrl1mkB+kktTPdMwuyIS3NSnKbJIF5eOetp+Qqmc D3tb/SuxQlY0InQYXMXzdexqDEOr0IAveP90yAd9uYSPX6rgmrSyp27bAonDpYSjpUwn N+8AQtAjF4/1k0MXsQyJ6KujcWBBvB4Rnbkp3bQ9/C3FjqA9Gx6AXgdUlc9sen64piJs 7KA3Ba1GrAo0cebucao6TPxJXflrA8M/VL4YrPBbVKoWQ5TU3SjKhdzqLG2mcINJRuuk gZWQ== X-Gm-Message-State: AFuF++ky4Ofv1ZVQB6xZwpuFbv6FiFHG489kEcbr/PH9E00pUmryTTHs bDYB73GkpebBOInmyjsPx75ZYkX6MB53gjpu47SpfTWq//dqsr6kuJfs3GTBqRLGB7cfxjuX0JS NG9TdYyY= X-Gm-Gg: AR+sD10pWjUdEzXk8Jh42iy4QeHWtiHyUSAMDUex0jhcMa7vSwK/t7K2MiGKXLInP8/ USATfONZmo/DCyJVw3oeIbpJdztA4HZQteWEPsUoWbY+Mdu9e9vqpo7YXZTO45dzhAVMpMzqPlr coq/eq2jQnfSuZrBm1v/QypNXFwu/1HH3oJNOYGG1uwoIKTuiaR1phhOVo9O0zJQCW1g2yR2fOj Ov/XlmaG5/eQLGJ6nDSgYNjZG746ZD3EhxL8w9v3OpA/D6r4RuVcR2dHm7ySHVMwp4ijiSZB0DT ub8P4YC2GLHb2BVlT3Tk9PvgAobGEB1RcdVhjEUrH4YzXIY3hmXN6pN1BUXSLDrQnzcitjtxvJV Ia6uVZcn+/1m3HwqvY9zP24GuTs+3COl9rmeuGKy/YObV1NwZRBfDGl943HxTtRoInKPbAguqgl lZ5uf2Ig09NICMX/DQnvapTXMlLfbLYxDgXQyBefAMGa+kdqPCseeWij8OTXPfP4TxxaXMJhbp1 d87NfPFGZdB/t0uQYFtFu9O5muXvFHRhdFiEtrk1m5oWxanlzUrGdA+ZoRgjLGgx2YOg1SKeID4 l1YWZxnUkL6PyuSSeYxSoVMu6bSR636Gcx71d2R00zGK6K496Shl/20= X-Received: by 2002:a05:600c:19c8:b0:49b:c8e:a211 with SMTP id 5b1f17b1804b1-49b91c20bfamr497636215e9.5.1788253771241; Tue, 01 Sep 2026 02:09:31 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com (host-87-9-102-148.retail.telecomitalia.it. [87.9.102.148]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48442c425cesm3825273f8f.6.2026.09.01.02.09.29 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Tue, 01 Sep 2026 02:09:30 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Brian Masney , Fabio Estevam , Frank Li , Jerome Brunet , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH v11 2/2] clk: imx: pll14xx: support spread spectrum clock generation Date: Tue, 1 Sep 2026 11:05:18 +0200 Message-ID: <20260901090912.585681-3-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260901090912.585681-1-dario.binacchi@amarulasolutions.com> References: <20260901090912.585681-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" Add support for spread spectrum clock (SSC) generation to the pll14xx driver. Tested on the video PLL of i.MX8MN and i.MX8MP based boards. Signed-off-by: Dario Binacchi --- Changes in v11: - Drop the dt-bindings/clock/clock.h include and use the enum clk_ssc_method values from clk-provider.h, as clk-scmi-oem.c does. - Disable SSC and clear the modulation fields in SSCG_CTRL when no spread method is configured, so that a setup left enabled by the bootloader is not kept active. - Skip the SSC setup instead of dividing by zero when modfreq_hz is zero or mfr truncates to zero. - Reject mfr and mrr values that do not fit the MFREQ_CTL and MRAT_CTL register fields instead of letting FIELD_PREP silently truncate them. This also prevents the 10000 * mfr multiplication from overflowing. - Compute the mfr divisor in 64-bit arithmetic, as the 32-bit product could wrap with out of range modfreq_hz values. Changes in v10: - Drop 'Reviewed-by' tag of Peng Fan. - Adapt the driver to the new infrastructure. Implement the set_spread_spectrum() and get the modulation parameters from struct clk_spread_spectrum. Changes in v9: - Add 'Reviewed-by' tag of Peng Fan. drivers/clk/imx/clk-pll14xx.c | 79 +++++++++++++++++++++++++++++++++++ 1 file changed, 79 insertions(+) diff --git a/drivers/clk/imx/clk-pll14xx.c b/drivers/clk/imx/clk-pll14xx.c index b6f1cc9f5700..0c2b812ba20c 100644 --- a/drivers/clk/imx/clk-pll14xx.c +++ b/drivers/clk/imx/clk-pll14xx.c @@ -13,6 +13,7 @@ #include #include #include +#include #include #include #include @@ -22,6 +23,8 @@ #define GNRL_CTL 0x0 #define DIV_CTL0 0x4 #define DIV_CTL1 0x8 +#define SSCG_CTRL 0xc + #define LOCK_STATUS BIT(31) #define LOCK_SEL_MASK BIT(29) #define CLKE_MASK BIT(11) @@ -33,6 +36,13 @@ #define KDIV_MASK GENMASK(15, 0) #define KDIV_MIN SHRT_MIN #define KDIV_MAX SHRT_MAX +#define SSCG_ENABLE BIT(31) +#define MFREQ_CTL_MASK GENMASK(19, 12) +#define MRAT_CTL_MASK GENMASK(9, 4) +#define SEL_PF_DOWN_SPREAD 0 +#define SEL_PF_UP_SPREAD 1 +#define SEL_PF_CENTER_SPREAD 2 +#define SEL_PF_MASK GENMASK(1, 0) =20 #define LOCK_TIMEOUT_US 10000 =20 @@ -44,6 +54,7 @@ struct clk_pll14xx { int rate_count; s16 delta_k; spinlock_t lock; + struct clk_spread_spectrum ss_conf; }; =20 #define to_clk_pll14xx(_hw) container_of(_hw, struct clk_pll14xx, hw) @@ -366,6 +377,58 @@ static int clk_pll1416x_set_rate(struct clk_hw *hw, un= signed long drate, return 0; } =20 +static void __clk_pll1443x_set_spread_spectrum(struct clk_hw *hw, + unsigned long parent_rate, + unsigned int pdiv, + unsigned int mdiv) +{ + struct clk_pll14xx *pll =3D to_clk_pll14xx(hw); + struct clk_spread_spectrum *conf =3D &pll->ss_conf; + u32 sscg_ctrl, mfr, mrr, sel_pf; + + sscg_ctrl =3D readl_relaxed(pll->base + SSCG_CTRL); + sscg_ctrl &=3D ~(SSCG_ENABLE | MFREQ_CTL_MASK | MRAT_CTL_MASK | SEL_PF_MA= SK); + + switch (conf->method) { + case CLK_SPREAD_CENTER: + sel_pf =3D SEL_PF_CENTER_SPREAD; + break; + case CLK_SPREAD_UP: + sel_pf =3D SEL_PF_UP_SPREAD; + break; + case CLK_SPREAD_DOWN: + sel_pf =3D SEL_PF_DOWN_SPREAD; + break; + default: + /* No spread: disable modulation and clear any stale state */ + goto out; + } + + if (!conf->modfreq_hz) + goto out; + + mfr =3D div64_u64(parent_rate, (u64)conf->modfreq_hz * pdiv * BIT(5)); + if (!mfr || mfr > FIELD_MAX(MFREQ_CTL_MASK)) { + pr_warn("%s: SSC disabled, modulation frequency (%u Hz) out of range\n", + clk_hw_get_name(hw), conf->modfreq_hz); + goto out; + } + + mrr =3D (conf->spread_bp * mdiv * BIT(6)) / (10000 * mfr); + if (!mrr || mrr > FIELD_MAX(MRAT_CTL_MASK)) { + pr_warn("%s: SSC disabled, spread (%u permyriad) out of range\n", + clk_hw_get_name(hw), conf->spread_bp); + goto out; + } + + sscg_ctrl |=3D SSCG_ENABLE | FIELD_PREP(MFREQ_CTL_MASK, mfr) | + FIELD_PREP(MRAT_CTL_MASK, mrr) | + FIELD_PREP(SEL_PF_MASK, sel_pf); + +out: + writel_relaxed(sscg_ctrl, pll->base + SSCG_CTRL); +} + static int clk_pll1443x_set_rate(struct clk_hw *hw, unsigned long drate, unsigned long prate) { @@ -390,6 +453,9 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, uns= igned long drate, writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv), pll->base + DIV_CTL1); =20 + __clk_pll1443x_set_spread_spectrum(hw, prate, rate.pdiv, + rate.mdiv); + spin_unlock_irqrestore(&pll->lock, flags); =20 return 0; @@ -411,6 +477,8 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, uns= igned long drate, =20 writel_relaxed(FIELD_PREP(KDIV_MASK, rate.kdiv), pll->base + DIV_CTL1); =20 + __clk_pll1443x_set_spread_spectrum(hw, prate, rate.pdiv, rate.mdiv); + spin_unlock_irqrestore(&pll->lock, flags); =20 /* @@ -437,6 +505,16 @@ static int clk_pll1443x_set_rate(struct clk_hw *hw, un= signed long drate, return 0; } =20 +static int clk_pll1443x_set_spread_spectrum(struct clk_hw *hw, + const struct clk_spread_spectrum *ss_conf) +{ + struct clk_pll14xx *pll =3D to_clk_pll14xx(hw); + + memcpy(&pll->ss_conf, ss_conf, sizeof(pll->ss_conf)); + + return 0; +} + static int clk_pll14xx_prepare(struct clk_hw *hw) { struct clk_pll14xx *pll =3D to_clk_pll14xx(hw); @@ -509,6 +587,7 @@ static const struct clk_ops clk_pll1443x_ops =3D { .recalc_rate =3D clk_pll14xx_recalc_rate, .determine_rate =3D clk_pll1443x_determine_rate, .set_rate =3D clk_pll1443x_set_rate, + .set_spread_spectrum =3D clk_pll1443x_set_spread_spectrum, }; =20 struct clk_hw *imx_dev_clk_hw_pll14xx(struct device *dev, const char *name, --=20 2.43.0