From patchwork Wed Jan 18 07:26:43 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13105750 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 84BA1C004D4 for ; Wed, 18 Jan 2023 07:29:43 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:MIME-Version:References:In-Reply-To: Message-Id:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=8lzGxQ60hX8e9zQwzn8oOMvXw7XjuyMMyco8uL1AJfM=; b=i79ocF/HBcdrEF lJ54/Dhc2HuJHKuIl+OpcI8Avao6dPOcklxhaZoJqDsPGBOqkeY9eirHP7knh8M4MwugSIyxixnCG avpdm1z/WUbhfgJUnRb+J0ohL5CBblJ8ewvi8n3ss+b7VO4SQl5/06PWR52q1pNV7z5dV55my7eDv t+xcgp08gDMmMFWK/OTvlmjmaALXjEJqPWZ9H1v0NYHN9n+46h3AgsPr5bv1wUeQb/sjF+PKwMkhH eAwoOD3NZW7bwMIO7Vn6092L+Tk+S2ZdXR+QvBBcMulj6/5lDjOL8wo+utoIXFzhz5Y6zDw4RTE9P 9VPGAh7Y6JG8oTxDVSeQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI2sH-00HCaJ-Ty; Wed, 18 Jan 2023 07:28:46 +0000 Received: from mout.perfora.net ([74.208.4.196]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI2rN-00HCE1-0k for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 07:27:50 +0000 Received: from toolbox.int.toradex.com ([213.55.225.137]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MRnRf-1pBGP61vIn-00Sy6a; Wed, 18 Jan 2023 08:27:34 +0100 From: Marcel Ziswiler To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, Liu Ying , Marcel Ziswiler , Abel Vesa , Fabio Estevam , Krzysztof Kozlowski , Oliver Graute , Pengutronix Kernel Team , Pierre Gondois , Rob Herring , Sascha Hauer , Shawn Guo , Viorel Suman , Zhou Peng Subject: [PATCH v4 05/17] arm64: dts: imx8qm: add pwm_lvds0/1 support Date: Wed, 18 Jan 2023 08:26:43 +0100 Message-Id: <20230118072656.18845-6-marcel@ziswiler.com> X-Mailer: git-send-email 2.35.1 In-Reply-To: <20230118072656.18845-1-marcel@ziswiler.com> References: <20230118072656.18845-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:Z2wBgtJmTiYl9K51i06uYAss4G6FkWyJj2br3H/VeO09cIhtJnk +hLDIpFPNY7zjZ761w3vsr28zlvel976oktb90h18j1RAifPyiGQpVShbScIJxz/U4RUq/W Kc/n/HDRZ/U/CCxi/V3/aq4D83pIyJNY0ogDJnjkn4rhczrPxuo5E75+9PhzEZXvaWxnJlc 7uF8+GetclDP1lD+yvDXw== UI-OutboundReport: notjunk:1;M01:P0:QpDf5Lx0bIk=;mqARhiyGE5H/fFjEUTYALlq5IAa fyzAHNsxAxFC2lKf8a/i0FmsrlLTen+vlVBNJLsc/g+A9IqWK7mgO03/ZjDkbU+vskbxi3U80 kr6wLvFw0R/p27Fj4CUYp9SfaTgLIuuGWt7DuNRJ01oAJUVsxEhtzm/Iff2a8UeJgcNKq/TKI svTLmlSUP5vUR3CqW/aoDslWmrfiOe8lOzf2cV5cpDu2ZBCU0nSi4VJJfw6EpA6EIFoN+uwbd RY7p78mKz7YFSrOUnu+xFIeqkLxqQj1skB754K+tFziqvm9gz9c2qUf8UdduRQCtJoQtK0qP8 aJ2f1XU4xopE5wBduyszvPVE7Rl+IyZr0pmcn20IYpwPwpU80tiCf5wPCAwEEQ1LCCUqXqjod cCGVK99X9i71XA/QO+iHPd1F3F0TZgvB66txZyciyE7lMN/I2VqUZnhmMK5LEUqvdqmLVRdYm 3RjBVM9HUgVXVgCfH0oh/ozbkfejCHaQgog+BXq1kuTO+00nkkXsuV9Asv+enfbYy6bHklqm6 PPI4ZqBT1bOyCB8SfKYhE/0/5UX6/pNHkhSnfKRELK85U+bbaeXx+fI7OJd2SvR5vqgp2/1v7 gHuDrXGz3E+PnIvvyqPQxUIrcK80bNNlLMRSO4wI20CAxdNEN7Tvml7kAn9oJDkvYTqfjvKZV woaw8q5j5aNXRdaBSeNVsHPAv+cQVxRFLpFUKDEvsw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_232749_181350_6A7A9D00 X-CRM114-Status: GOOD ( 13.82 ) 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 From: Liu Ying This patch adds pwm_lvds0/1 support together with a i.MX 8QM LVDS subsystem device tree. Signed-off-by: Liu Ying Signed-off-by: Marcel Ziswiler --- Changes in v4: - New patch combining the following downstream patches limitted to LVDS PWM functionality for now: commit 036c6b28a186 ("arm64: imx8qm.dtsi: Add LVDS0/1 subsystems support") commit c3d29611d9d4 ("arm64: imx8qm-ss-lvds.dtsi: Add pwm_lvds0/1 support") commit baf1b0f22f8a ("LF-882-1 arm64: imx8qm-ss-lvds.dtsi: Separate ipg clock for lvds0/1 subsystems") .../boot/dts/freescale/imx8qm-ss-lvds.dtsi | 83 +++++++++++++++++++ arch/arm64/boot/dts/freescale/imx8qm.dtsi | 1 + 2 files changed, 84 insertions(+) create mode 100644 arch/arm64/boot/dts/freescale/imx8qm-ss-lvds.dtsi diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-lvds.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-lvds.dtsi new file mode 100644 index 000000000000..4b940fc3c890 --- /dev/null +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-lvds.dtsi @@ -0,0 +1,83 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright 2023 NXP + */ + +/ { + lvds1_subsys: bus@56240000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x56240000 0x0 0x56240000 0x10000>; + + lvds0_ipg_clk: clock-lvds-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "lvds0_ipg_clk"; + }; + + lvds0_pwm_lpcg: clock-controller@5624300c { + compatible = "fsl,imx8qm-lpcg"; + reg = <0x5624300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_LVDS_0_PWM_0 IMX_SC_PM_CLK_PER>, + <&lvds0_ipg_clk>; + clock-indices = , ; + clock-output-names = "lvds0_pwm_lpcg_clk", + "lvds0_pwm_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_LVDS_0_PWM_0>; + }; + + pwm_lvds0: pwm@56244000 { + compatible = "fsl,imx27-pwm"; + reg = <0x56244000 0x1000>; + clocks = <&lvds0_pwm_lpcg 0>, + <&lvds0_pwm_lpcg 1>; + clock-names = "per", "ipg"; + assigned-clocks = <&clk IMX_SC_R_LVDS_0_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <2>; + power-domains = <&pd IMX_SC_R_LVDS_0_PWM_0>; + status = "disabled"; + }; + }; + + lvds2_subsys: bus@57240000 { + compatible = "simple-bus"; + #address-cells = <1>; + #size-cells = <1>; + ranges = <0x57240000 0x0 0x57240000 0x10000>; + + lvds1_ipg_clk: clock-lvds-ipg { + compatible = "fixed-clock"; + #clock-cells = <0>; + clock-frequency = <24000000>; + clock-output-names = "lvds1_ipg_clk"; + }; + + lvds1_pwm_lpcg: clock-controller@5724300c { + compatible = "fsl,imx8qm-lpcg"; + reg = <0x5724300c 0x4>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_LVDS_1_PWM_0 IMX_SC_PM_CLK_PER>, + <&lvds1_ipg_clk>; + clock-indices = , ; + clock-output-names = "lvds1_pwm_lpcg_clk", + "lvds1_pwm_lpcg_ipg_clk"; + power-domains = <&pd IMX_SC_R_LVDS_1_PWM_0>; + }; + + pwm_lvds1: pwm@57244000 { + compatible = "fsl,imx27-pwm"; + reg = <0x57244000 0x1000>; + clock-names = "ipg", "per"; + clocks = <&lvds1_pwm_lpcg 4>, + <&lvds1_pwm_lpcg 1>; + assigned-clocks = <&clk IMX_SC_R_LVDS_1_PWM_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <24000000>; + #pwm-cells = <2>; + status = "disabled"; + }; + }; +}; diff --git a/arch/arm64/boot/dts/freescale/imx8qm.dtsi b/arch/arm64/boot/dts/freescale/imx8qm.dtsi index 41ce8336f29e..422edd2f20fa 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qm.dtsi @@ -222,3 +222,4 @@ rtc: rtc { #include "imx8qm-ss-dma.dtsi" #include "imx8qm-ss-conn.dtsi" #include "imx8qm-ss-lsio.dtsi" +#include "imx8qm-ss-lvds.dtsi"