| Message ID | 20261202155430.918884-2-dario.binacchi@amarulasolutions.com |
|---|---|
| State | New |
| Headers |
Return-Path:
<linux-amarula+bncBCQ4XFG47UFRBQX6YDMAMGQEUJIDWPA@amarulasolutions.com>
X-Original-To: linux-amarula@patchwork.amarulasolutions.com
Delivered-To: linux-amarula@patchwork.amarulasolutions.com
Received: from mail-wm1-f72.google.com (mail-wm1-f72.google.com
[209.85.128.72])
by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 43C613F076
for <linux-amarula@patchwork.amarulasolutions.com>;
Wed, 2 Dec 2026 16:54:43 +0100 (CET)
Received: by mail-wm1-f72.google.com with SMTP id
5b1f17b1804b1-4b76ca8cdd3sf16451275e9.1
for <linux-amarula@patchwork.amarulasolutions.com>;
Wed, 02 Dec 2026 07:54:43 -0800 (PST)
ARC-Seal: i=2; a=rsa-sha256; t=1796226883; cv=pass;
d=google.com; s=arc-20260327;
b=A5fqcAxVq2V3jrLluA6/8V+HLW+UNUxxXEl4yE6Pf6faWIHhEc4HM+f7yp/exUqyLt
JtlV7fo9S8GMHiVIx7oedcKbTSu7fQeucznJQrFFGyyaPhIbzI1qa/mxXMnu+9iColic
W9gI3We31ElagIKch2WpaxJ14CsZFueLv5as9SptczT9aIJ4Wn5RDbOMwcxzGpJcFJZp
xqw5IKjiVbI2FNa6rq2NN8/rpfuV72X5qEfG0OnSmTBqaC0qZCQGDVxXoDDrEOqtx/q3
Svv/5/KgaMjPBJqTUtbRnxS8KO48q9w1c5B2TbqMpSiWk/SiiZm3QAr96hDgQmbURym1
M2gQ==
ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=qkeTqcN4YTf0017Xn+vgJCL42lwRZNtcst9PeR/gBRU=;
fh=YX0Tz+amofAcSanb9iXGvUWYk4lPvbqpDhU8LI/SR6A=;
b=HtFUNklDXYSzv/rGLUO9cyQLJINaNNFN7M6ikIcQTHvuQmoi2uFNzROSTvGr4jUYUH
v4h6uSS9GD6R7/wvuxqbetCNkRjwr+8qLIyzN2nwetKbsq865xxn8Vfc3TY82yJTTSmu
poQs/YxE2D2xh7blZMvU+YL8v9KV69O9pLMwrM26ZWzv7gUn1/bbHCNFRnC6VmAlptjm
/SW6XfwvCWM+MPlHovqC417T2Bd6CC5jyiOyb11UteP61b7cN2rBsZqQJlHSD3H2xpf0
dcJYK3nixxFH2zloyezmlmAfWBO/OYCqS4hfAaLhh7FbHQdU9zSFTvYKv6rPEiJpuyIA
otCg==;
darn=patchwork.amarulasolutions.com
ARC-Authentication-Results: i=2; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b="UfJ/A/0o";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=amarulasolutions.com; s=google; t=1796226883; x=1796831683;
darn=patchwork.amarulasolutions.com;
h=list-unsubscribe:list-archive:list-help:list-post:list-id
:mailing-list:precedence:content-type
:x-original-authentication-results:x-original-sender: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=qkeTqcN4YTf0017Xn+vgJCL42lwRZNtcst9PeR/gBRU=;
b=rICt2ua4YBU6o55049WxjhXi3vdN/+0sKE0TSyf+K+81OHY2rhwDenJXPCr4vKC37j
tXfc5Pp6uolFNoWE7dhrypLf0VfKOL3g+OoeK78fduuH4y6++utKwsXpPBWNb3bmZJE3
nUrCzN5yi1U2iDlIbs/xlzRqcQLCdvS90y8Ko=
X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed;
d=1e100.net; s=20260707; t=1796226883; x=1796831683;
h=list-unsubscribe:list-archive:list-help:list-post
:x-spam-checked-in-group:list-id:mailing-list:precedence
:content-type:x-original-authentication-results:x-original-sender
:mime-version:references:in-reply-to:message-id:date:subject:cc:to
:from:x-gm-gg:x-beenthere:x-gm-message-state:from:to:cc:subject:date
:message-id:reply-to:content-type;
bh=qkeTqcN4YTf0017Xn+vgJCL42lwRZNtcst9PeR/gBRU=;
b=oZwk9xFU1sDOU+/jDO0z0hxsMSf/aBOjWZXhDvrXk/HPsZ9977Ooc8IDaZCgh8O8Lo
kYo547X8FjPf5fBXY30HWpofnaKmK2smnxRf0FqpbW/AuLmPo4g6WrMYPtncA2+y+mbQ
tPVufnJ8vcve4HpVEOFF3n3C32ixzsH6UtToJSUNOoRNGzfPUBsKPNpnyGmuRaQDhJ64
PcCCMMZKiVgayBhQGiov2YHy17XyAUeOnUFd1Y73JmV02zaFA7vU6Of1xiYp57kuG5Vh
zfpUid2rNKwhJjS3W7yutrOi899XSPCdZ/V6IkaVEMap3EkoA8ez6E8fvVg6tNU/JlHa
B8NA==
X-Forwarded-Encrypted: i=2;
AL+hErEygueX4RHjma24rX1HUjbXcCNuUz++cp70L0b9oLrSf2yKw5wo4DxYwyQ8vjV/331xZNtawA6N/OW0CVXv@patchwork.amarulasolutions.com
X-Gm-Message-State: APuU4Z+aJUbVOYmU+psnOUjKYNxxyTj7zqKARUZOJYbj1ZCg4gT6hbvv
7GClkpZglu/56hXKLV5+Jp7bPXYhAidYLG5tIq+uLKg3G2KtrG9Ix6MQJYTU+tP5fHvhUQ==
X-Received: by 2002:a05:600c:8210:b0:4bb:7ad8:99f2 with SMTP id
5b1f17b1804b1-4bb88785da4mr748004365e9.0.1796226882863;
Wed, 02 Dec 2026 07:54:42 -0800 (PST)
X-BeenThere: linux-amarula@amarulasolutions.com;
h="ATskLdfbzBglgTDGHgcDdCn9FC9BGAtslb14jCK3z6TP4h++lw=="
Received: by 2002:a05:600c:3ba7:b0:4a1:9637:d304 with SMTP id
5b1f17b1804b1-4bb88f17b7bls54134455e9.0.-pod-prod-09-eu; Wed, 02 Dec 2026
07:54:41 -0800 (PST)
X-Forwarded-Encrypted: i=2;
AL+hErHI74fU6Gudpryj3xs6jOfsp+kGdb4aEMt5clVpl/YMnymOMMzOeFkeA5ujexOC4myGsEh8MVrf+Npqnrf6@amarulasolutions.com
X-Received: by 2002:a05:600c:674f:b0:4bb:56bb:1196 with SMTP id
5b1f17b1804b1-4bb8880fb9bmr778051625e9.23.1796226881144;
Wed, 02 Dec 2026 07:54:41 -0800 (PST)
ARC-Seal: i=1; a=rsa-sha256; t=1796226881; cv=none;
d=google.com; s=arc-20260327;
b=mDhMsBLpJmjn2j8Z2MjwSJiWlLIW77TrH7lMUC2kPErxxQ5jBDww4PRKsiyTTsfvqQ
+FyAxFreIxaKCYDmRhbBUhB0KG1lA3YAtzodv3jOZQzrmvTosTNXFHoatyYP3X1o4c7o
ymaV5hZ09BUlWdi053zAc9ISdpmzx78QSN60EbEyvNY5LgF5D3bOBccrXTOaB3tuDIHu
ISvT/ZEm6xpJXxHni/Pp9YyBq8CKBl99iB917eGTcuctP354SwB4Pgax7P3NAMhaWTuE
Ah1RRhP/HMFeAS6ldflivzD1JcTX0bYWH1wgXhGeOX7Pnztccuvqi6n9TcoGwAQBaoWd
KbZw==
ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;
s=arc-20260327;
h=content-transfer-encoding:mime-version:references:in-reply-to
:message-id:date:subject:cc:to:from:dkim-signature;
bh=iN/MSzvHVOlL4wzZnMdHRhiKpz8bw4hKxL3dwXs66Bk=;
fh=BV10AIKfKHNP44Gcj9D9kjk0E6bf1cJkpMO8tNIKPPc=;
b=iyhWbqzvULgA0/xlm8z579U7TnFbvw+dmU6Ytw2aVLWucmSTStdarNOyOYJZ8Ftoi8
cLX7Qlu9POn3NulNQZTrDvUXpXyge/9HJeC1HwL1AmsxRZd8l3ER8n1+0IX4jf9uiqxv
py+VNIzshnLURmNwg0R4qsxfZ+jgRAFFWeL8fxjiP7kl0dN2A5ql/3RSAfoCzs5d0gsp
/pm1yzCJjOOVEyX5sCB5rzFP5w+WrdBe42Xy9dZ+s+ZgJJWi+X0gNo8Nw6/sWH4Vj9fZ
vrUafdyhr0Rba1ITxzEcwi+RIhP4qjy6eTQHb2c9EamacGD7AaXnGBFjdqTHl/6vLAjv
rS6g==;
dara=google.com
ARC-Authentication-Results: i=1; mx.google.com;
dkim=pass header.i=@amarulasolutions.com header.s=google
header.b="UfJ/A/0o";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Received: from mail-sor-f41.google.com (mail-sor-f41.google.com.
[209.85.220.41])
by mx.google.com with SMTPS id
ffacd0b85a97d-4ab76339ef1sor7441817f8f.16.2026.12.02.07.54.41
for <linux-amarula@amarulasolutions.com>
(Google Transport Security);
Wed, 02 Dec 2026 07:54:41 -0800 (PST)
Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41;
X-Forwarded-Encrypted: i=1;
AL+hErEVcV7b8ddFZuWJjbGQPBD/KqNJxr/91V6CIf4/BJHP5agR1Lsfr1Cti7zwJtTdVOJd+veGiioByzjbJmtH@amarulasolutions.com
X-Gm-Gg: AZFdTZfZpQRu5MqSEvqV3pOGIeTuVZ+ywDJs0y/UxafFTXH6hNR2dXVMeAUQeuco+BR
BO9Qx3FJbDbxlzhE1N5Afs9hwTzLTKLLfoku3p8YzFOJE3lf7S17bbivJtZbq5n/3SLbmHLPUZQ
fVGyCLI5I2XKNSHjBzTB4iqMQzxYKuZxMr5Oeuw+KyOWYW0aUbDeqPAobSQFr2iJU18ahPwqs7Y
DNA3BcOFznMNNIXfm/MJ+sUFMup2rIPEakFpCi5cL9nX10koXgB6wr7o1CiOWAZjD6BL0gsQbSv
iswE0lReT1XF2+qMy3HjALb2D9e6jwzOjCE27Tw+2x5cioIQXrkaCft31lB1ChjgYjsgKR7ZwZE
lhBDXbP8Rl5MeBewEbTBMnY8i5E+LjoAp110U9Wneb/R+80WB8MBKeNe5Fux690h53HFop+Tpl+
zt9srYoM8FC7QPV1uw4JCepj8cuMUPzH3yk9Uwy9Eo9FSZFjkWaWyLLpX59iytdPisIzcamhSLs
Hd3evaLtHacb8guexPCt3lqT5HTYj9l0v63Y7PkHOKIu3bw+yudWbeYxHpom+c2Y0F5OSLnyGEv
79SSFEIxikJCYaxHGATxGwnhMqMDD8c6yMOgs2Ovgr0EJ4fiKRaHMeEXj40SMURW4qZL94kSHZG
3ayIK+3WtA8IaMEqgcRWb
X-Received: by 2002:a05:6000:29d3:b0:4a2:6542:989a with SMTP id
ffacd0b85a97d-4abb4b85a5cmr49520363f8f.52.1796226880643;
Wed, 02 Dec 2026 07:54:40 -0800 (PST)
Received: from localhost.localdomain ([2001:b07:6474:ebbf:6962:3ebc:7df:e6bf])
by smtp.gmail.com with ESMTPSA id
ffacd0b85a97d-4ab6c340df4sm88736914f8f.55.2026.12.02.07.54.39
(version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256);
Wed, 02 Dec 2026 07:54:40 -0800 (PST)
From: Dario Binacchi <dario.binacchi@amarulasolutions.com>
To: Sudeep Holla <sudeep.holla@kernel.org>,
Cristian Marussi <cristian.marussi@arm.com>
Cc: Peng Fan <peng.fan@nxp.com>,
linux-amarula@amarulasolutions.com,
linux-kernel@vger.kernel.org,
michael@amarulasolutions.com,
arm-scmi@vger.kernel.org,
imx@lists.linux.dev,
Dario Binacchi <dario.binacchi@amarulasolutions.com>,
stable@vger.kernel.org,
Sashiko <sashiko-bot@kernel.org>,
Brian Masney <bmasney+clk@redhat.com>,
Jerome Brunet <jbrunet+clk@baylibre.com>,
Sebin Francis <sebin.francis@ti.com>,
Stephen Boyd <sboyd@kernel.org>,
linux-clk@vger.kernel.org
Subject: [RESEND PATCH v15 1/2] clk: scmi: fix SSC spread conversion
Date: Wed, 2 Dec 2026 16:54:26 +0100
Message-ID: <20261202155430.918884-2-dario.binacchi@amarulasolutions.com>
X-Mailer: git-send-email 2.43.0
In-Reply-To: <20261202155430.918884-1-dario.binacchi@amarulasolutions.com>
References: <20261202155430.918884-1-dario.binacchi@amarulasolutions.com>
MIME-Version: 1.0
X-Original-Sender: dario.binacchi@amarulasolutions.com
X-Original-Authentication-Results: mx.google.com; dkim=pass
header.i=@amarulasolutions.com header.s=google header.b="UfJ/A/0o";
spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com
designates 209.85.220.41 as permitted sender)
smtp.mailfrom=dario.binacchi@amarulasolutions.com;
dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com;
dara=neutral header.i=@amarulasolutions.com
Content-Type: text/plain; charset="UTF-8"
Precedence: list
Mailing-list: list linux-amarula@amarulasolutions.com;
contact linux-amarula+owners@amarulasolutions.com
List-ID: <linux-amarula.amarulasolutions.com>
X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com
X-Google-Group-Id: 476853432473
List-Post:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/post>,
<mailto:linux-amarula@amarulasolutions.com>
List-Help:
<https://support.google.com/a/amarulasolutions.com/bin/topic.py?topic=25838>,
<mailto:linux-amarula+help@amarulasolutions.com>
List-Archive:
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/>
List-Unsubscribe:
<mailto:googlegroups-manage+476853432473+unsubscribe@googlegroups.com>,
<https://groups.google.com/a/amarulasolutions.com/group/linux-amarula/subscribe>
|
| Series |
clk: scmi: fix the i.MX OEM spread spectrum configuration
|
|
Commit Message
Dario Binacchi
Dec. 2, 2026, 3:54 p.m. UTC
The spread_bp field of struct clk_spread_spectrum holds the modulation
depth in permyriad (1/100 of a percent), as documented in
clk-provider.h and in the assigned-clock-sscs binding, while the i.MX
SCMI OEM extension expects a value in tenths of a percent, as pointed
out by Peng Fan.
The conversion divides spread_bp by 10000 instead of 10, as reported by
Sashiko, so any valid configuration is truncated to 0 and the hardware
is silently programmed with no spread at all.
Divide by 10 and fix the comment accordingly.
Fixes: 77369b1e6a37 ("clk: scmi: Add i.MX95 OEM extension support for SCMI clock driver")
Cc: stable@vger.kernel.org
Reported-by: Sashiko <sashiko-bot@kernel.org>
Closes: https://lore.kernel.org/r/20260901155657.6A5981F00A3A@smtp.kernel.org
Reported-by: Peng Fan <peng.fan@nxp.com>
Closes: https://lore.kernel.org/r/ZR6PR04MB375776A27E98F140534E8F7FE488B62@ZR6PR04MB375776.eurprd04.prod.outlook.com
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Reviewed-by: Cristian Marussi <cristian.marussi@arm.com>
Signed-off-by: Dario Binacchi <dario.binacchi@amarulasolutions.com>
---
Changes in v15:
- Add Cc to stable.
Changes in v14:
- Add Reviewed-by of Peng Fan
Changes in v13:
- Divide spread_bp by 10 instead of 100 as requested by Peng Fan.
- Rename the patch title and reword the description accordingly.
- Add the Reported-by/Closes tags for Sashiko and Peng Fan.
drivers/clk/clk-scmi-oem.c | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/drivers/clk/clk-scmi-oem.c b/drivers/clk/clk-scmi-oem.c index be11d359b4ec..c1ebbdc6bbc5 100644 --- a/drivers/clk/clk-scmi-oem.c +++ b/drivers/clk/clk-scmi-oem.c @@ -39,12 +39,12 @@ scmi_clk_imx_set_spread_spectrum(struct clk_hw *hw, u32 val; /* - * extConfigValue[7:0] - spread percentage (%) + * extConfigValue[7:0] - spread percentage in tenths of a percent * extConfigValue[23:8] - Modulation Frequency * extConfigValue[24] - Enable/Disable * extConfigValue[31:25] - Reserved */ - val = FIELD_PREP(SCMI_CLOCK_IMX_SS_PERCENTAGE_MASK, ss_conf->spread_bp / 10000); + val = FIELD_PREP(SCMI_CLOCK_IMX_SS_PERCENTAGE_MASK, ss_conf->spread_bp / 10); val |= FIELD_PREP(SCMI_CLOCK_IMX_SS_MOD_FREQ_MASK, ss_conf->modfreq_hz); if (ss_conf->method != CLK_SPREAD_NO) val |= SCMI_CLOCK_IMX_SS_ENABLE_MASK;