From patchwork Fri Sep 4 10:06:29 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4838 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wr1-f69.google.com (mail-wr1-f69.google.com [209.85.221.69]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 987193F1D4 for ; Fri, 4 Sep 2026 12:12:52 +0200 (CEST) Received: by mail-wr1-f69.google.com with SMTP id ffacd0b85a97d-482e05af072sf730981f8f.3 for ; Fri, 04 Sep 2026 03:12:52 -0700 (PDT) ARC-Seal: i=2; a=rsa-sha256; t=1788516772; cv=pass; d=google.com; s=arc-20260327; b=KKwgdq0CvN6J9D7vzlEkYe7lVfFmi4n4Y/nNnAMvREuLLabXmv+6fyCxUxcYrncN0U hLT0ztiSW6RMicjtHOBdi5tE8ieWHtDitkH8QlCmnrVVy/wk2dkX2L4Lec7ba3Z13UWe D/KkFXCblgPQmZHx0H/CfbqpKoO9wDO6hPaIAfy3InwV4IVmm4Naa5LDaZh05OALu/iv JTJDBfGnhH1TdRGFOTPJgX2R+sc2q06Rt8x8RY7md9EOjWZUgUEZdeGfwEcecV/ei7XJ vVPeqqRmNNy5no+LxfiJPyi8cKR1FnCc6+TNhyJRdXt2fXltBcpHAnYCRciZfbOJmMVv JcOg== 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:message-id:date:subject:cc:to :from:dkim-signature; bh=3cz0l2HZBFmfa1hDTofx+CQA16UkkTalUXgq0d6uX2U=; fh=hAkvevKoavZVjTQWzofnz/VUqwby2xc+PTN79As0bM8=; b=mcsYndiGyofUneg79NXvqoIr8Q3dTGrv3B5YqxGTx3T2xrjwTyExP75pkRsnrysawP PuPs2Do2yRl1KP8Dd7GCvEQCjDiaEj7bjmgtCDMfyw66lZGYSDEiiaUp8BGv/VRREy6Q x8d+gn4y+O7Mt0rNAarbeiIFjGysgFKjM5FwzZdicz2tRU8lIeWUaos6MdrG+2yi41bp Tc1UlQcDeVplsHo5xeP5BLBcSictxcuv/HGMgFHLOSFzFsZzlPfFJ2IYgyPeEb7j8Arm C+1cgD0Xb2U+OYO7RQ884qoAiobFjy+HWuqxy0jTNXbZeofRrImnfHSmO6D0q4b/Z0tR k1qA==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Xyt94ZLI; 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=1788516772; x=1789121572; 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 :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=3cz0l2HZBFmfa1hDTofx+CQA16UkkTalUXgq0d6uX2U=; b=LiK9mJamz/Vb9QCdprwa0UO1A8QY0vkLEQ2mRMzp1AYNpni7qsRLiM2C1hV5B77KXT QG3RXI+QU29BpYcj/t8Ri0h0sUwG8itruvfFldGdEczUVPd8i/rxoFYEN9K4eMLlXdGl /i1RHflibk6YF29RSnR7OMRgwx68Z2DlULPt8= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1788516772; x=1789121572; 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: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=3cz0l2HZBFmfa1hDTofx+CQA16UkkTalUXgq0d6uX2U=; b=DJyyPVYSQhyfsE/pN6f6mw5/91yExtPgCsBj4Ps0NXtkID59DDhIZW5BiuROOSxhC8 MKsgD4K18N57WZ+BQeUe7wNownfRCahSTWsU8MEy4nKC/P+phg7QChIcrq7MxgzUSfeb tDteu2KMT6m7Gw4oohouuXNpzib3vsEY0RfV20jfTmnp04K5UtGvTVSYWglZ+czH4W7h 9zqwJUsXAYIs2uJVBjwABHt9xkY0efJNoIpG9fh+srWaoD3aB2JJ0cb2+9FqD1gHTXT/ r1FFo//zoW6MB7heqQMgrRV+3wqXIicFa+TsMn8wsHLutHH+QgfRNjJhrJ+cLkdOSq79 L1AA== X-Forwarded-Encrypted: i=2; AKwUvBxBMbcqW4ryW9KXvWPHnff73DS4MMbMCA399ygjgCXAp+uddVid2fjiX01B1Npc5t2ikEoZfuk9u3/Y4kzk@patchwork.amarulasolutions.com X-Gm-Message-State: AFuF++ksXPn2cdFkwjqJNgT9c2JJvPg/sV8qjEILIctTrcNl8RfEwvpf SU11zgzyhGAeWFrmCyUDEVkm2O5fwhXEld4x1zah+pEGoXxGz6enpHw33FI1Hx65j6ISjg== X-Received: by 2002:a05:600d:650c:20b0:49c:fc6c:be08 with SMTP id 5b1f17b1804b1-49cfc6cc026mr17327215e9.31.1788516771916; Fri, 04 Sep 2026 03:12:51 -0700 (PDT) X-BeenThere: linux-amarula@amarulasolutions.com; h="ATskLdcORsqiCjKuFoyKplC+2UEthDCWDZ4Z2ml4osSWCJOZlg==" Received: by 2002:a05:600c:3b11:b0:497:feb0:f55c with SMTP id 5b1f17b1804b1-49cf7ab4985ls6946275e9.0.-pod-prod-06-eu; Fri, 04 Sep 2026 03:12:50 -0700 (PDT) X-Forwarded-Encrypted: i=2; AKwUvBzHdTh2P2QqaYAkY3WxS4iz1K6UvEb5m8C3smSYk+yaQ1Jh/twUqsRsIo8Uk6jmiofHH2B7Njh5mkoz5Pw8@amarulasolutions.com X-Received: by 2002:a05:600c:a08b:b0:49c:fc6c:be07 with SMTP id 5b1f17b1804b1-49cfc6cc03dmr20294945e9.30.1788516770146; Fri, 04 Sep 2026 03:12:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1788516770; cv=none; d=google.com; s=arc-20260327; b=BNKWulnbTk+fGdutTOOX92MvWPBA3lAGX+QabdYjFtIpsQsCTsVruWJwEsdSE8XlGL BhMUOSNZXH7/LCfkDKG5bz30VgYA3QsvUm758a16atTyBQHc/1Vr5xUkf3FaIZtR3VF0 TM2NvppFBA2cTAn6Q0TPK6sOvIvo6wo9H4JFyiq2/7Wx8e8/30T9vC+Di5MbYWnlqAb1 Gkf9bOqa04JRiIRO47VPdy9f4uJa9uQ/3s/XUFGgB5M6Wv3G3q53wGj4CynDZMwycpUP arQVCKpKWMtkiTe+3aurGFZqJTNDfeskwk2E9KwiXYHZEVvajwWig1C+3FYNc80ull+b Hn1A== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20260327; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=8GlZLcOq/1TKQQu2gibplQv4pt4AVLjA4QI65SUIoMs=; fh=1x4iBxSG0Mjed4HdsontGsccc9ZcfptyXzkTbhvFQuQ=; b=VoG5w0TdA15HNhxcbr5eY1+GYphOmtL3qtdoy+TibEh99hS+qBWADDytykSnyLm0LD DUwdxjGn8jlMdPaXRusTBdptkuPDDw2ffuM3XvbWumhkc5ksOx2fSvxTquhIhyJOTpJE wdOyyDigIOkiV78COUjciGh9+N3VAwD+VQyLC6fLWsblzPAFL4os6sxe+9H9+1cdQyJT 8P9Uqke6mfBP+D2uiMZEFPLM+VQ/ny9/tYIAXHf+nesUkQFgxIg2Ka+rTvABVySfI/tO xYgZ+vfdNFvyXlx+GPv5bV3W3pI1OpRTBLYGqzuTZMmsB3Z9tpgDiJm82W1LJZKu4vQM v9Xw==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=Xyt94ZLI; 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-4858839645asor273533f8f.10.2026.09.04.03.12.50 for (Google Transport Security); Fri, 04 Sep 2026 03:12:50 -0700 (PDT) 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; AKwUvBz83n9u+kjFSGdjUXekoD3A/rfaXRUNr7BXM5CkVflqhAIT0rARbCQnwRd7gOVCdyqqPUMqIMWOB+FUr3Nh@amarulasolutions.com X-Gm-Gg: AYBFou1vebHjj/wzoVqlCCTDic3lpjPblXHi5Xb693F2TgW03LHAs7D+NVtJxyooMJA Afgz/DmwUUzOHySLShDjfv+eLbXS1Hpm6bkEYUHV9Wstws5pSPytR9aPjmkIAh7KjYW0vhTlbJ8 s2BWmVGXcawhiopFyYqJB6YyCgbj8VYvLjmkZ8y+M9C3DgFo4F27KUFKK12+zeg2VVn6jjVNAH0 XYp90eoFSLbomEkN0D46vWMBOdLfXTMOwhPAnNQyP6kB/z7DD+JIJeJYGC7NFtGXo3DeyfO2ZqE X6i+fQMA9kmNh42OY360R2IhafVgZa2LhM8rav7UCbc5FSto3xNWfZTj8Ql9FL5K8mJ4xXKCVVF jClkOsi2Dgj24sGBzNfaaKlYE9oZ4JITo/53izmv+IAmihVCsDqJiuqO+8ZRnHtJ6dlzvpFPVdv Y0KG2A7B9EyVXSPJaOIpydLxLY+CyJV1GKWhGQvssFs2BGL1fJ4wRPbZJJf2dggntBKxB3TFgoA UpFOywL8Lff21BRRSitpqVdrvsKiSGSMWC5OhpFH4z+E70PgJt6hffd03aw3I5j5JDmnJUSY0Sq Nkqwhrm3dZWx/Aer/uppgjmowgYIPvhTUPQsBinM7T2LDwW+0d3CgKM= X-Received: by 2002:a05:6000:46c8:b0:483:ca4a:530c with SMTP id ffacd0b85a97d-485872a5523mr6326417f8f.18.1788516769126; Fri, 04 Sep 2026 03:12:49 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com (host-95-245-93-90.retail.telecomitalia.it. [95.245.93.90]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-48588390e30sm5317990f8f.7.2026.09.04.03.12.47 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 04 Sep 2026 03:12:48 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: michael@amarulasolutions.com, linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Brian Masney , Cristian Marussi , Fabio Estevam , Frank Li , Jerome Brunet , Peng Fan , Pengutronix Kernel Team , Sascha Hauer , Sebin Francis , Stephen Boyd , imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH v14 0/4] Support spread spectrum clocking for i.MX8M PLLs Date: Fri, 4 Sep 2026 12:06:29 +0200 Message-ID: <20260904101243.412006-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 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=Xyt94ZLI; 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: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , The series adds support for spread spectrum clocking for i.MX8M{M,N,P} PLLs (audio, video and DRAM). It has been tested for the video PLL on boards using i.MX8MN and i.MX8MP. While at it, it validates the spread spectrum configuration in the clk core before it reaches the providers, and fixes the i.MX SCMI OEM extension, which converted the spread to the wrong unit. Patches 1 and 2 are fixes for 7.3 with Peng's Reviewed-by and do not depend on the rest of the series, so they can be picked up separately. Patches 3 and 4 are new material for the next merge window. Changes in v14: - Move the fixes first, so that they can be picked up separately from the new patches. Changes in v13: - Add patch "clk: scmi: reject SSC configuration out of the OEM field range". - Rename patch "clk: scmi: fix SSC permyriad conversion" to "clk: scmi: fix SSC spread conversion". Changes in v12: - Add patch "clk: scmi: fix SSC permyriad conversion" to fix the permyriad to percent conversion in clk-scmi-oem.c, reported by Sashiko AI review. - Fix issues claimed by Sashiko for patch "clk: imx: pll14xx: support spread spectrum clock". See the details in the patch changelog. Changes in v11: - Add patch "clk: validate spread spectrum configuration" to reject invalid parameters in the clk core before they reach the providers. - Fix issues claimed by Sashiko for patch "clk: imx: pll14xx: support spread spectrum clock". See the details in the patch changelog. Changes in v10: - Drop patches 1-22, superseded by the generic spread spectrum clocking support from Peng Fan, merged in 7.3, so the i.MX8M specific infrastructure is no longer needed. This patch is now based on the following commits: - ae794aa6e88d ("dt-bindings: clock: Add spread spectrum definition") - c86814e70390 ("clk: Introduce clk_hw_set_spread_spectrum") - a7f16660af39 ("clk: conf: Support assigned-clock-sscs") - 7d98de6ffdab ("clk: Add KUnit tests for assigned-clock-sscs") https://lore.kernel.org/all/20260826165611.236321-1-sboyd@kernel.org/ Changes in v9: - Add 'Reviewed-by' tag of Peng Fan for imx8mn platform patches - Fix building warning raised by the kernel test robot for patch v8, 11/18 clk: imx: add support for i.MX8MN anatop clock driver - Add patches for imx8m{m,p} platforms: - 23/23 clk: imx8mm: support spread spectrum clock generation - 22/23 clk: imx: add support for i.MX8MM anatop clock driver - 21/23 clk: imx8mp: support spread spectrum clock generation - 20/23 clk: imx8mp: rename ccm_base to base - 19/23 clk: imx: add support for i.MX8MP anatop clock driver Changes in v8: - Drop the patches added in version 7: - 10/23 dt-bindings: clock: imx8m-clock: add phandle to the anatop - 11/23 arm64: dts: imx8mm: add phandle to anatop within CCM - 12/23 arm64: dts: imx8mn: add phandle to anatop within CCM - 13/23 arm64: dts: imx8mp: add phandle to anatop within CCM - 14/23 arm64: dts: imx8mq: add phandle to anatop within CCM Changes in v7: - Add and manage fsl,anatop property as phandle to the anatop node with the new patches: - 10/23 dt-bindings: clock: imx8m-clock: add phandle to the anatop - 11/23 arm64: dts: imx8mm: add phandle to anatop within CCM - 12/23 arm64: dts: imx8mn: add phandle to anatop within CCM - 13/23 arm64: dts: imx8mp: add phandle to anatop within CCM - 14/23 arm64: dts: imx8mq: add phandle to anatop within CCM Changes in v6: - Merge patches: 10/20 dt-bindings: clock: imx8mm: add binding definitions for anatop 11/20 dt-bindings: clock: imx8mn: add binding definitions for anatop 12/20 dt-bindings: clock: imx8mp: add binding definitions for anatop to 05/20 dt-bindings: clock: imx8m-anatop: define clocks/clock-names now renamed 05/18 dt-bindings: clock: imx8m-anatop: add oscillators and PLLs - Split the patch 15/20 dt-bindings-clock-imx8m-clock-support-spread-spectru.patch into 12/18 dt-bindings: clock: imx8m-clock: add PLLs 16/18 dt-bindings: clock: imx8m-clock: support spread spectrum clocking Changes in v5: - Fix compilation errors. - Separate driver code from dt-bindings Changes in v4: - Add dt-bindings for anatop - Add anatop driver - Drop fsl,ssc-clocks from spread spectrum dt-bindings Changes in v3: - Patches 1/8 has been added in version 3. The dt-bindings have been moved from fsl,imx8m-anatop.yaml to imx8m-clock.yaml. The anatop device (fsl,imx8m-anatop.yaml) is indeed more or less a syscon, so it represents a memory area accessible by ccm (imx8m-clock.yaml) to setup the PLLs. - Patches {3,5}/8 have been added in version 3. - Patches {4,6,8}/8 use ccm device node instead of the anatop one. Changes in v2: - Add "allOf:" and place it after "required:" block, like in the example schema. - Move the properties definition to the top-level. - Drop unit types as requested by the "make dt_binding_check" command. Dario Binacchi (4): clk: scmi: fix SSC spread conversion clk: validate spread spectrum configuration clk: scmi: reject SSC configuration out of the OEM field range clk: imx: pll14xx: support spread spectrum clock generation drivers/clk/clk-scmi-oem.c | 27 ++++++- drivers/clk/clk.c | 14 ++++ drivers/clk/clk_test.c | 12 +-- drivers/clk/imx/clk-pll14xx.c | 103 +++++++++++++++++++++++++ drivers/clk/kunit_clk_assigned_rates.h | 4 +- 5 files changed, 148 insertions(+), 12 deletions(-) --- base-commit: bc35965f6940a9bf834d54187b6088b8eb09206d branch: imx-pll14xx-spread-spectrum