From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 63BE9C369AB for ; Thu, 24 Apr 2025 06:24:18 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Content-Transfer-Encoding: MIME-Version:Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References:List-Owner; bh=XxxaGvQDvfu7Q9PX5MDYrjcRysLPu8BDWxxMsfcOWXo=; b=DjLqkQN2cGOSsRwjsXz66BH8Ix 6XGoIocLWdh0kyDG5tqJMwWUyKU8JJ15ajIH/l6GXMNk+COL3xcR/yMO1woM2QTMlUv4CGCHThVa1 AMYYrUmjMjarSG8m926QTga4JGgeU+711YpkDh9NKNr8ZTfMcOK1JyZMMtPmNJkotzPJvGnV2gY6T VlvbswqoDp29Jsc1NX0KfODDJv4tbt+mHTwZHr9NMTZYVwT5jEvjOIgR5vWeFQ33zoDiQ8KOsEJaS qz5cPpTPhecMb7TOZrs8pt2oonMnZ7C9VwsKowznEsEvM4E9BSNax2vbTt2EI0V7+OXZE9VevShRd fwONwBoA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98.2 #2 (Red Hat Linux)) id 1u7q0E-0000000Cyy9-3z80; Thu, 24 Apr 2025 06:24:06 +0000 Received: from mail-wm1-x332.google.com ([2a00:1450:4864:20::332]) by bombadil.infradead.org with esmtps (Exim 4.98.2 #2 (Red Hat Linux)) id 1u7pyC-0000000CyRd-4BNk for linux-arm-kernel@lists.infradead.org; Thu, 24 Apr 2025 06:22:02 +0000 Received: by mail-wm1-x332.google.com with SMTP id 5b1f17b1804b1-43d2d952eb1so3647105e9.1 for ; Wed, 23 Apr 2025 23:22:00 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1745475719; x=1746080519; darn=lists.infradead.org; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:from:to:cc:subject:date:message-id:reply-to; bh=XxxaGvQDvfu7Q9PX5MDYrjcRysLPu8BDWxxMsfcOWXo=; b=VEMroHMjEriiJfyJzazXuzLrEQXALcvAs0o9poTRSknXTZ4PLAu3y1AIYAC9com/lY rvUoTpHV0zwlu/LOi6EqQs1LZ/FgANkUlsv2fT2H7s8QOmGJ2FtdQksu7ads0XocgGWr 9ZFXFjg1GqGL++qxhyHObwIZ2heiyU8gvhGXM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1745475719; x=1746080519; h=content-transfer-encoding:mime-version:message-id:date:subject:cc :to:from:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=XxxaGvQDvfu7Q9PX5MDYrjcRysLPu8BDWxxMsfcOWXo=; b=iTUE9WS/sp8m24MnRx0EJDGmJOv+wcw6j3hj0j332FFglOfjyOxZJvCOWrLQOQ+vBY Azhmtg6yEDnQRqw4OnX7mnVc/46AFdP30eEvDEp+PDWdNCL5PPZQhX1o6JB1VCweHk9h jqDWKHUpqs81JNTdHZFqT15vjGwHxhkSt4oD+bb0WMUGlB+QjyhBTzxrcRQTG7ITwLjo ZxMANVGJ4WAYGH3jfqyiWbCD4uQ2irMfyrVHPU7pFfNgiHbDO0ayyqbKaMqfbDkSLvr/ TBwRBwU3puTaxAcCWFensOSuC0P0CL6GY1574Sim7MfjAnFuUU5BzWEOxQy0VaorPw9w J62Q== X-Forwarded-Encrypted: i=1; AJvYcCW/zN6jCeciiyU4gl/7FD8Tdmw20GmvsmYuUAX7uiaNvRUAWmSM+MKIdVZZYGA/RWOC/91VWNQlTobcz/sCueDT@lists.infradead.org X-Gm-Message-State: AOJu0YwkzX6nvDoarBCPXtaWjZyvAW45yFSbBn/HCmiu5rrhxsosffz8 MToiEJc5TO85tPnLF+ocB9Q94n8q3preDeJ3SshNbYTlEXZqiSy1SYeMPFzMERI= X-Gm-Gg: ASbGncsZc1mGnOaAv97zy8QIz+jCrqqiH1AkaIOVOpoY8F5Bk/d4jrvSCFkcnV8UC9P Me3or2vCklU27Flx65YawneuDb/DxMkTxWyiwoG04Oe5rL5mXGItl6UCUFylngUw/Ysa7L1cm3b c5KOIEu2aBI09yf5pGZOdL5wGs46CLo7sVfwO/bjjyfc6aYoGPUHz68ErOHyy8tQqxNMNTjcrud +qRayPAXR7Fhc3xUlEptdQXyfPxUoRK3j2u0VoLFL57nlb1YzjAT2i5xpNs+LuhY2UeJBzf5A77 /1CRDsu9VYhkEK6iFGdlBFBUAeu/T4S2w4MGZwVZ6ligeCbtY613mbcI4zAcaF9ffbnf3H66hz2 cqg/H X-Google-Smtp-Source: AGHT+IGvTU8Y1hgfT3yKjsK08TdE3oRPW2oO5ovqbEbqxVzSJcoPTwAc+vZW0Km/jHkJQMRVgAbuoA== X-Received: by 2002:a05:600c:cc8:b0:43b:c5a3:2e1a with SMTP id 5b1f17b1804b1-4409bd05289mr11180925e9.2.1745475718040; Wed, 23 Apr 2025 23:21:58 -0700 (PDT) Received: from dario-ThinkPad-T14s-Gen-2i.. ([2.196.40.65]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4409d2bf8dbsm7243435e9.35.2025.04.23.23.21.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 23 Apr 2025 23:21:57 -0700 (PDT) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: Peng Fan , Stephen Boyd , Shawn Guo , linux-amarula@amarulasolutions.com, Abel Vesa , Dario Binacchi , Conor Dooley , Fabio Estevam , Krzysztof Kozlowski , Michael Turquette , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-clk@vger.kernel.org Subject: [PATCH v12 00/19] Support spread spectrum clocking for i.MX8M PLLs Date: Thu, 24 Apr 2025 08:21:30 +0200 Message-ID: <20250424062154.2999219-1-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20250423_232201_051494_68DE0198 X-CRM114-Status: GOOD ( 22.41 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org This version keeps the version v9 patches that can be merged and removes the patches that will need to be modified in case Peng's PR https://github.com/devicetree-org/dt-schema/pull/154 is accepted. The idea is to speed up the merging of the patches in the series that have already been reviewed and are not dependent on the introduction of the assigned-clocks-sscs property, and postpone the patches for spread spectrum to a future series once it becomes clear what needs to be done. Specifically, the patches: 01/18 dt-bindings: clock: imx8mm: add VIDEO_PLL clocks 02/18 clk: imx8mm: rename video_pll1 to video_pll 03/18 dt-bindings: clock: imx8mp: add VIDEO_PLL clocks 04/18 clk: imx8mp: rename video_pll1 to video_pll are a replica for i.MX8MM and i.MX8MP of the patch for i.MX8MM bedcf9d1dcf88 ("clk: imx: rename video_pll1 to video_pll"), which was merged some time ago. The patches are split into four because, during the review, Krzysztof asked me to separate the driver modifications from the dt-bindings changes. All the other patches in the series, from 5 to 18, are necessary for the implementation of the anatop driver for i.MX8M{M,N,P}. The review of this series has taken a long time, partly due to misunderstandings arising from incorrect design choices. As Peng stated in [1]: "In current design, CCM is taken as producer of CLK_IMX8M_VIDEO_PLL, not consumer." These patches fix this issue by ensuring that the PLLs are now produced by Anatop and consumed by CCM, aligning with the hardware logic. Finally, a clarification: I decided to keep the same title for the series despite having removed all the patches for spread spectrum support in order to maintain a clear connection with the previous versions. [1] https://patchwork.kernel.org/project/linux-clk/patch/20241106090549.3684963-2-dario.binacchi@amarulasolutions.com/ Changes in v12: - Add the patch 15/19: arm64: dts: imx8mp-aristainetos3a-som-v1: don't replicate clk properties to fix new warnings running 'make CHECK_DTBS=y for arch/arm64/boot/dts/freescale/' Changes in v11: - Fix conflict while rebasing on master for patches: 13/18 clk: imx: add support for i.MX8MP anatop clock driver 14/18 clk: imx8mp: rename ccm_base to base 15/18 dt-bindings: clock: imx8m-clock: add PLLs - Add 'Reviewed-by' tag of Peng Fan for patches: 11/18 clk: imx: add support for i.MX8MM anatop clock driver 13/18 clk: imx: add support for i.MX8MP anatop clock driver 14/18 clk: imx8mp: rename ccm_base to base Changes in v10: - Drop the v9 patches: 16/23 dt-bindings: clock: imx8m-clock: support spread spectrum clocking 17/23 clk: imx: pll14xx: support spread spectrum clock generation 17/23 clk: imx8mn: support spread spectrum clock generation 21/23 clk: imx8mp: support spread spectrum clock generation 23/23 clk: imx8mm: support spread spectrum clock generation 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 (19): dt-bindings: clock: imx8mm: add VIDEO_PLL clocks clk: imx8mm: rename video_pll1 to video_pll dt-bindings: clock: imx8mp: add VIDEO_PLL clocks clk: imx8mp: rename video_pll1 to video_pll dt-bindings: clock: imx8m-anatop: add oscillators and PLLs arm64: dts: imx8mm: add anatop clocks arm64: dts: imx8mn: add anatop clocks arm64: dts: imx8mp: add anatop clocks arm64: dts: imx8mq: add anatop clocks clk: imx: add hw API imx_anatop_get_clk_hw clk: imx: add support for i.MX8MM anatop clock driver clk: imx: add support for i.MX8MN anatop clock driver clk: imx: add support for i.MX8MP anatop clock driver clk: imx8mp: rename ccm_base to base arm64: dts: imx8mp-aristainetos3a-som-v1: don't replicate clk properties dt-bindings: clock: imx8m-clock: add PLLs 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) .../bindings/clock/fsl,imx8m-anatop.yaml | 53 +- .../bindings/clock/imx8m-clock.yaml | 27 +- arch/arm64/boot/dts/freescale/imx8mm.dtsi | 11 +- arch/arm64/boot/dts/freescale/imx8mn.dtsi | 11 +- .../imx8mp-aristainetos3a-som-v1.dtsi | 4 - arch/arm64/boot/dts/freescale/imx8mp.dtsi | 11 +- arch/arm64/boot/dts/freescale/imx8mq.dtsi | 2 + drivers/clk/imx/Makefile | 6 +- drivers/clk/imx/clk-imx8mm-anatop.c | 287 ++++++++ drivers/clk/imx/clk-imx8mm.c | 262 ++++--- drivers/clk/imx/clk-imx8mn-anatop.c | 283 ++++++++ drivers/clk/imx/clk-imx8mn.c | 183 +++-- drivers/clk/imx/clk-imx8mp-anatop.c | 306 ++++++++ drivers/clk/imx/clk-imx8mp.c | 672 +++++++++--------- drivers/clk/imx/clk.c | 15 + drivers/clk/imx/clk.h | 2 + include/dt-bindings/clock/imx8mm-clock.h | 76 +- include/dt-bindings/clock/imx8mn-clock.h | 64 ++ include/dt-bindings/clock/imx8mp-clock.h | 80 ++- 19 files changed, 1740 insertions(+), 615 deletions(-) create mode 100644 drivers/clk/imx/clk-imx8mm-anatop.c create mode 100644 drivers/clk/imx/clk-imx8mn-anatop.c create mode 100644 drivers/clk/imx/clk-imx8mp-anatop.c -- 2.43.0