From mboxrd@z Thu Jan 1 00:00:00 1970 Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.remote-ip=209.85.221.43 ARC-Seal: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; cv=none; t=1796226882; b=BVdG396Lq8KgOEy6Rc2KuAo2bKF59MLDGl1e33aNm5/49h9s4v0EagmUMg7lO0zRxssl c33XAuzBXXXkyR4JvrlMXUP7Ciys2nigk5kNbJFLVq2ux9rn2YpP83/LYLhJeTq/DRCdq bkjoScd0Y3uLRnVoZqY31UJ6OeHfIdZOqRCCRP5OFOHFkCtUrnRvghPp3jMbEEObl/twV eSP2QPVgAzAxvIgCe/OWMnkIpD1XgHljcCWvxfsAySt44RvvkZ2jc2jYk1h4cO9sG2eud UB+rcT2LeUUGmmscMT0X/NweqEYr+AJr0MEv7WOIcUgTvSwjdnEUe11M8b39tQzPRkw== ARC-Message-Signature: i=1; d=subspace.kernel.org; s=arc20261015; a=rsa-sha256; c=relaxed/relaxed; t=1796226882; h=DMARC-Filter:Received:DKIM-Signature:X-Google-DKIM-Signature: X-Forwarded-Encrypted:X-Gm-Message-State:X-Gm-Gg:X-Received:Received: From:To:Cc:Subject:Date:Message-ID:X-Mailer:In-Reply-To:References: MIME-Version:Content-Transfer-Encoding; bh=iN/MSzvHVOlL4wzZnMdHRhiKpz8bw4hKxL3dwXs66Bk=; b=0uBm86+Rj3XvPmyr0XbXYuDOAgVT4jn2IaTAo7rkSraIr4W0jpQXdu4U06slVZ0ZXJH3 LBDaZ0NwwpzAtWK1lHASIOub9oldajy+OR/qrB9sT+QjOTfJu5UKxV62kyGFVOecuG8Su eF4MqRkn/xBEoP8rY0lB26GVS/Pjm8f1QPpYvH6RRIlbAPqpIFOhk3eTHoqf3wX8wDtlK 7wlYscbVbyCUikVfDpPSmfb6yjkRwjBE43V2i7hF5m27ffCevsJysZW1arn8r8XFFgaN1 vUy5s/+43U3AhFNtrMazs6cCR/r+uGqH1C4Mqb+ySMH5pC73IlVcKLTzobGD7awZ5UA== ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass header.d=amarulasolutions.com header.i=@amarulasolutions.com header.a=rsa-sha256 header.s=google header.b=NbAvW+tO; arc=none smtp.remote-ip=209.85.221.43 Received: from mail-wr1-f43.google.com (mail-wr1-f43.google.com [209.85.221.43]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits) key-exchange X25519 server-signature ECDSA (prime256v1) server-digest SHA256) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 3AE50606A33F for ; Wed, 2 Dec 2026 15:54:42 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.2 smtp.subspace.kernel.org 3AE50606A33F 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.a=rsa-sha256 header.s=google header.b=NbAvW+tO Received: by mail-wr1-f43.google.com with SMTP id ffacd0b85a97d-491971ac844so11540497f8f.2 for ; Wed, 02 Dec 2026 07:54:42 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1796226881; x=1796831681; 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=iN/MSzvHVOlL4wzZnMdHRhiKpz8bw4hKxL3dwXs66Bk=; b=NbAvW+tO3AyU/d4rMN5lzzxJP26DlwqanWH6q92c41ogUbLPDxxnumC/WBsJo5KEdz reOshSqHGII6W0u/X5EwCiN00Wrn9tS3xzK18/Y8XJbiW3OdIL1/Q9z4PxeVK18Q9xJo rNLRoPF7WeA9VcnHB/WhX+kCbykpznK2zL3Yk= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20260707; t=1796226881; x=1796831681; 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=iN/MSzvHVOlL4wzZnMdHRhiKpz8bw4hKxL3dwXs66Bk=; b=uJKzVTZqtvCyzRHMYcRfWQMC6DnxDBRF8u+gIehOsNRyA9s9pwqFc1BFTRy+uN7BJN /MpKotTxSqe8hfrz3PJ4puirX17O18oltxb1fdxVtR94pHr0hRC8Thc/M8o0nbagtbz9 JMbC+Nrej+/0vAAgk+2ydASldPtft7fTZVG6Yy4PH+7kjYlXjVylPAaKeMqIDQglqAUE 6sGKhU2mTrxz9BhKh29+3D2uWQpWKqXvFJr8YxGQdAeA7fF4obz6e3ht74LHmVsGVeJe YxokJuzRn5mxKoC50YWrKIyFveauBg7MznmjU8teUOMnMHie9BsGZilscpRJ4F1QUj85 /kgw== X-Forwarded-Encrypted: i=1; AL+hErGGRi+CvwjtE6mJyvorg8Ub+Ze+dXHjncVdF9PS1iZlMGKN4wGUXpO2aZjH9GWa5EaA0OEdXEMrWVbuqMc=@vger.kernel.org X-Gm-Message-State: APuU4Z+QLKr8/PnEDBIS5NV87AlMJHnYDoKgnNsMjYG84QJGbc1o4OAi tqcMB7PUN7Q9GnkPytPLFx37vQZbJC3n6AsvXvgtm3y6J/UY+llyHf+jPjld5/zAW6w= X-Gm-Gg: AZFdTZc94LbpcZ2HNmL/Fp+zoWJMOYSyBqh3fPdllyN7OCdyeZUwMzKzvE6sjlyCpyi njcO8zOE87qP8zGrWCFl5BUFZWhmQlDR89FFP4GZv5qGY8xHFgll6JWlgPht+8Zi/JO50smKVIm Ax2KKIR78XacEfBUFEmLA6XorBiy1Rxwymph0wsRwkRYtNrdiON54tq6Rg4fOvcXl2mRHXtNZJu RQy5Zg8VUa17x5a4OCUGIUJRFcc7EYCZiF9UiuWiEjUTk0CF3vRz7sCSk4og1C9JC784O2s5O4j TvZ877SlY5KrlH4G+ISqEMiCeLKwTcrpyiCXnbafBSn459WYsf5dczHmnTWrUxJLopbzmUxyGCO AeS31pQuhtX2+wmCgm56NlAZHMwqEuj+3Ejnu8frCz3AeeER9rPlwqu77eiS3xg+VlJAiIz01vm 1sqtM3ZA/U7qaexQgCwCmbKaj6zsQTfadj+7xxPJhb5wJLqaP37a2bqc9TjhXp45noR0rKPIUcy JS0T8zD8SDXe4UpciBbx/YDnIoXDSP2ykc6kJkyCvA1EDsWlwkpoY1CL8jB7W/qvAy/pCim9S71 Pq1AWsvus5PSWt6Dl9uoZ9TG6Bvoc44WvZoBqOXKk8hCtx4TH1BC1e54wkW1nh0/SVB8UlTqYuY py4NUJKgMr+xPGLT16vxd 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 To: Sudeep Holla , Cristian Marussi Cc: Peng Fan , linux-amarula@amarulasolutions.com, linux-kernel@vger.kernel.org, michael@amarulasolutions.com, arm-scmi@vger.kernel.org, imx@lists.linux.dev, Dario Binacchi , stable@vger.kernel.org, Sashiko , Brian Masney , Jerome Brunet , Sebin Francis , Stephen Boyd , 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> X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Post: List-Help: List-Subscribe: List-Unsubscribe: List-Owner: Precedence: list MIME-Version: 1.0 Content-Transfer-Encoding: 8bit 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 Closes: https://lore.kernel.org/r/20260901155657.6A5981F00A3A@smtp.kernel.org Reported-by: Peng Fan Closes: https://lore.kernel.org/r/ZR6PR04MB375776A27E98F140534E8F7FE488B62@ZR6PR04MB375776.eurprd04.prod.outlook.com Reviewed-by: Peng Fan Reviewed-by: Cristian Marussi Signed-off-by: Dario Binacchi --- 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; -- 2.43.0