From patchwork Sun Dec 1 17:46:00 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 3672 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-ed1-f71.google.com (mail-ed1-f71.google.com [209.85.208.71]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id 202323F033 for ; Sun, 1 Dec 2024 18:47:21 +0100 (CET) Received: by mail-ed1-f71.google.com with SMTP id 4fb4d7f45d1cf-5d0d341cc43sf594754a12.2 for ; Sun, 01 Dec 2024 09:47:21 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1733075240; cv=pass; d=google.com; s=arc-20240605; b=J4o2e/2WBb75BAkoiixQFraEGBOIUEO9l2pp0BR08LDHXYh6HFLx1VTGQFpxFos36B mtH4BSkZB2zcXsJ4vCwmbGlo0nkE/kQI3u1lPBuaDo1L5/tphTK8dMTxljMWdE5tTo4U ludWpMYb2n5UY6lr/1UqsDp121Rtoqte04MTRi+AEw057DPUo8nmkHfZoWZ7AffEgcxK eeTMZXBM/V3zEkmx1KyUG9FCu90gshvXG5mKK9jDSoEJasOXOCCwd5/qYJiOb9HiFNyi PLBS4FDZbCQwD37ZE+BpeiIVelnHxlbeIaScDTheOugpjBvXVzsT4DAnCelD1kCsYArn G4OQ== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; 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=evWoTvUYSNjhkrIuaxal8a7tE/BgydTf3CkkWj3LD0s=; fh=QSDb2bVy5r4FKRLaaBn1ivZCelshSXZQGLjcyA6IPww=; b=MkIDsGJ4HqyW5hZtsD2Bpet6aC544cZqo4zr4wbibrL6IYDAnCkup45mJOi2rnxKHY 6tZfP/Ha8ZWWVWBtD4kNSs4zRPhMQQGFwNnkNdfLM3KlppXzsQ/XdLfvbCHMbpUJA9d3 /n5jS55UtBZgwgBWN27zOd30fvuaD/M5Gf+w7w+J3EOyxp6KV2rTrcI9dgkGMuyLz1JV LfqDgUOU9K55KxleC0+9PmlzvHKEoTycdWYBIkBUoLjd14PAcyZvNjdA8BVX9GJ6U6ak aIzFFG7gH8J2IFvB9jvLVm9Iwt5PxYdbnUB97xVsUiYFEySoChLsmYD1FprVM4DGAYA6 AGmg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cY6+iHUG; 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=pass header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1733075240; x=1733680040; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence: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; bh=evWoTvUYSNjhkrIuaxal8a7tE/BgydTf3CkkWj3LD0s=; b=BiBRHd0Qm/u21rv7DIyxK/NeQo9JuCzYTT3keksPn1mpL9rSYSrx2pZx/CO/YO2q4L 2Cg+v7O0p/LJ+FaqMFnn89BG7QdT5/+vJImek6Jm0SDjz9In7VG4ZxKDnIT7jFf8lkSz H5A5vG52C4Ld8NlhF0M6sHukCynlkNqxXVtQg= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1733075240; x=1733680040; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :message-id:date:subject:cc:to:from:x-beenthere:x-gm-message-state :from:to:cc:subject:date:message-id:reply-to; bh=evWoTvUYSNjhkrIuaxal8a7tE/BgydTf3CkkWj3LD0s=; b=V9ugPIVrQ8ahLWwTXzVAiI5h4oh8Ur4eqqNEZgphsUmNZdOAV6jm26qymvjywa0TKb GHIe3skg/8EWSfSmmMd9Uq2gQnDx3aXlrf6WpitcpenfyDYMuMWJgNT7E5I7/YUy3pjR YAem1JjKQuQkUmUahnxo8lcbzD9V/UIuFCg8OQLZgsxJxnf5rKqL0x/y6RSaR3i9/5EQ Yg2DtC4OmDK2AmLQ/s+/F8TZKydSXCXx6NxvdfacrTHHSVRKFCG5CwTeTdetf2AbvdAD /nENe2qostYD6PLqhVwhL/DCxBuwgquoCZIjPgQ1E8Hqfh3lNtpuhfiOPHT6QMwjcZYP oCYQ== X-Forwarded-Encrypted: i=2; AJvYcCUbT0uIqX9VAjwTT4ebMl3plVjvyaFysmzXrUTTBae0X28NaCiZG3R9yGYB9rmTTpIm31uOXI1sy3x4djNC@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0Yzw0VTrHxgJZ95cfi/FRNjyq98wfdDqu2obzJuzevEIqNytCilX jB8dg+PBydzLrYr66d231jY8h8M4Ujvt4SuW96eWI9/q2ivZ7oZhsHutvDNz3qzwxQ== X-Google-Smtp-Source: AGHT+IHEPjTDo0mtXPE0JD+tr990oA9Eb9KRJPhH7LjeUgMluFEIIa3rtprc9QI40mgWFCbrU+alMQ== X-Received: by 2002:a05:6402:3506:b0:5d0:d1e0:8fb2 with SMTP id 4fb4d7f45d1cf-5d0d1e0902cmr5238240a12.11.1733075240343; Sun, 01 Dec 2024 09:47:20 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com Received: by 2002:a50:d75c:0:b0:5d0:d3e0:f657 with SMTP id 4fb4d7f45d1cf-5d0d3e0faf3ls303375a12.2.-pod-prod-08-eu; Sun, 01 Dec 2024 09:47:17 -0800 (PST) X-Received: by 2002:a17:906:c395:b0:aa5:27d4:980a with SMTP id a640c23a62f3a-aa581081aeamr1643216566b.49.1733075236974; Sun, 01 Dec 2024 09:47:16 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1733075236; cv=none; d=google.com; s=arc-20240605; b=QSIlP5PZv11a0vZ3grUv2zxgsR29Qut3tZiCCTTD5M3/mXwmBacXl21GWPCYl3kQhc Vs3yEVH64ykqGCHcVNDy+EqzeNqoJFCYEH3E3uMMk308oUqjV5meh1HuHouT9fFfRaBS ZuiXuoR5fsduRL/0A+hiFclPck+Qzntx/8OncVOR9zoo146sY7LYxAxhncHfosTNHniO BfbIG1Q/HWHTrw+Db0ka5JweZw9P0sqSYWXFDDlB6s4rL4NMufWDoQhvQTBNlI5J2P0a 0rfXAQLVDJRxEsY0Qz4GhwS3lGq3ZwrXEGmSUC05LJeMeqZXG00kUSkwrPcCIFtIT9o6 +XUg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:dkim-signature; bh=rchwEG8OXdVUFDvOBxqjyl0K00WGKeVLIMzEYmldbsw=; fh=2TL5gdVAJyX/yhk5/AxHrADrCeVz/BiuKBD/sWsuHYo=; b=HUvvhNsBmEZ/+l42OcfaBYCLln9dMiGZG3vaagcii98MGlIzUI0TxpVV6nm5iqTJVU ZEvMXBqABLl9IKbmehM7U7UclX9Zb9zx47jsUqM5f83iL+ffK/3pqN1z2L6d2uN0R5Bg 7sgovZNtGiOTXDaybJKOBsnyf5eZq507Ov8yIsqDNHOrs79476cR2DB1FlZX56IQEtDj otQJOvgT8ayldkkud3WYBKcXNSwFLcT2LthBnvwVEzfjposEmhglJrKgCScrNwgGDwqD ljuVEOKPzV2VSVJfUcCd2rF9SXdamxzz7mtBpodPjJhTI85gbIKVEqeVJo1kpU7FUyqI faYg==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=cY6+iHUG; 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=pass 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 a640c23a62f3a-aa59990037esor265265866b.19.2024.12.01.09.47.16 for (Google Transport Security); Sun, 01 Dec 2024 09:47:16 -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-Gm-Gg: ASbGnctdorxxhZe6x+YGvwgokv5wVIj2PIMZHKvs3vVmqWP2b1RhoGcgbFmGmui94V7 WZHBO64TshQdeF9/7oU/HmoXCWnkmwNvGEySicQ++8i/hnm4ogTianUiw938wns6VuLVova/sqv 7YXi6kQEciT8vyBMoOzEoDFZxNSmPvGJWIaBEY/jPtqmy+FdEcWvI9EZXEENEJsppzyP6+ApC1m sWS+4rGolOxrFRE+GlCNgjVn8WTD5lb2oA/A+4CDgW7kBtk9bXU8bQ/PyqjF20RXIaa6DV7as3J EQAAKmWOzSrM9XBHBgFE3LF6jOKKfxyHbSMa6CA9I5XHwrFP6tbh+oGfkYfVsI8yGypZjgV3PSg muL2v5qdkdthw4Y1C X-Received: by 2002:a17:907:7742:b0:aa5:152a:d0a5 with SMTP id a640c23a62f3a-aa580f2c2ecmr1673821766b.18.1733075236544; Sun, 01 Dec 2024 09:47:16 -0800 (PST) Received: from dario-ThinkPad-T14s-Gen-2i.homenet.telecomitalia.it (host-82-54-94-193.retail.telecomitalia.it. [82.54.94.193]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-aa59990a78esm415220066b.163.2024.12.01.09.47.15 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sun, 01 Dec 2024 09:47:16 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , Abel Vesa , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Michael Turquette , Peng Fan , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo , Stephen Boyd , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH v4 00/18] Support spread spectrum clocking for i.MX8N PLLs Date: Sun, 1 Dec 2024 18:46:00 +0100 Message-ID: <20241201174639.742000-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=cY6+iHUG; 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=pass 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.MX8MN PLLs (audio, video and DRAM). It has been tested for the video PLL on a board using i.MX8MN. The patches added in version 4, such as the dt-bindings and the driver for anatop, were inspired by the extensive email exchange from version 3: https://lore.kernel.org/imx/20241106090549.3684963-1-dario.binacchi@amarulasolutions.com/ The series added spectrum spread support for the imx8mn platform only, but in case it was merged, confirming that the directives and suggestions made by the maintainers were correctly understood and implemented, I will extend this support to the imx8mm and imx8mp platforms as well. (no changes since v1) Dario Binacchi (18): clk: imx8mm: rename video_pll1 to video_pll clk: imx8mp: rename video_pll1 to video_pll dt-bindings: clock: imx8m-anatop: define clocks/clock-names arm64: dts: imx8mm: add anatop clocks arm64: dts: imx8mn: add anatop clocks arm64: dts: imx8mp: add anatop clocks arm64: dts: imx8mq: add anatop clocks dt-bindings: clock: imx8mm: add binding definitions for anatop dt-bindings: clock: imx8mn: add binding definitions for anatop dt-bindings: clock: imx8mp: add binding definitions for anatop clk: imx: add hw API imx8m_anatop_get_clk_hw clk: imx: add support for i.MX8MN anatop clock driver dt-bindings: clock: imx8m-clock: support spread spectrum clocking arm64: dts: imx8mm: add PLLs to clock controller module (ccm) arm64: dts: imx8mn: add PLLs to clock controller module (ccm) arm64: dts: imx8mp: add PLLs to clock controller module (ccm) clk: imx: pll14xx: support spread spectrum clock generation clk: imx8mn: support spread spectrum clock generation .../bindings/clock/fsl,imx8m-anatop.yaml | 53 +++- .../bindings/clock/imx8m-clock.yaml | 77 ++++- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 11 +- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 11 +- arch/arm64/boot/dts/freescale/imx8mp.dtsi | 11 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 + drivers/clk/imx/Makefile | 2 +- drivers/clk/imx/clk-imx8mm.c | 102 +++---- drivers/clk/imx/clk-imx8mn-anatop.c | 281 ++++++++++++++++++ drivers/clk/imx/clk-imx8mn.c | 188 ++++++------ drivers/clk/imx/clk-imx8mp.c | 118 ++++---- drivers/clk/imx/clk-pll14xx.c | 127 ++++++++ drivers/clk/imx/clk.c | 26 ++ drivers/clk/imx/clk.h | 22 ++ include/dt-bindings/clock/imx8mm-clock.h | 78 ++++- include/dt-bindings/clock/imx8mn-clock.h | 67 +++++ include/dt-bindings/clock/imx8mp-clock.h | 79 ++++- 17 files changed, 1022 insertions(+), 233 deletions(-) create mode 100644 drivers/clk/imx/clk-imx8mn-anatop.c