From patchwork Wed Feb 8 06:56:36 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13132503 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 D1632C05027 for ; Wed, 8 Feb 2023 06:59:03 +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=uqUXddm2OcopeyStCX2ksHjHLUX5NzyVHY8cMDHInTg=; b=LlxlsuOjbR2n/6 KOoHgWWJexNrNhgGuztjRaahdTtuHQwEDYfS/gBIk1sexIfDF2zND/XNrnP3bt8x0740eLifdBjv6 BabEeQzKcW+ey2vq515RdOBXYh6oxz2KHAnMcKQLUhZeMD2ztkG5rxK4fLMIWtI45GL/n14x8bPT7 /oKNByVRA+xZeRK2pkjlT7X96SvC5mxHPBuw07CDKKk535Jc3rZN1HrLPiNSDzyXtfzlIJeVgPRpi KozqYjjpUGIGVMjZBWXZdJlL09RxwBPWr0YxrlWlmhzVpr8YlpH4nIXbQVdtCOUBv1uIOWBlA/vtf 2GoiavfZd1f4h66mRqDQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPeP1-00ELec-FP; Wed, 08 Feb 2023 06:57:59 +0000 Received: from mout.perfora.net ([74.208.4.194]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pPeOQ-00ELSN-K5 for linux-arm-kernel@lists.infradead.org; Wed, 08 Feb 2023 06:57:24 +0000 Received: from toolbox.int.toradex.com ([213.55.227.109]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LgrQ0-1ommkQ0KE2-00oCMB; Wed, 08 Feb 2023 07:57:12 +0100 From: Marcel Ziswiler To: devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org, Liu Ying , linux-imx@nxp.com, linux-arm-kernel@lists.infradead.org, Krzysztof Kozlowski , Joakim Zhang , Marcel Ziswiler , Alexander Stein , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH v7 05/10] arm64: dts: imx8qxp: add flexcan in adma Date: Wed, 8 Feb 2023 07:56:36 +0100 Message-Id: <20230208065641.23544-6-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230208065641.23544-1-marcel@ziswiler.com> References: <20230208065641.23544-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:e+4oXaJaC7ZRDTsJPAuc1ZGuyY+99oW8TkZwpi8in+0+BaPH0FD 8PvCcrEo7BWzt/CRJNPHS1VRFlkcplDQMHITtBLvF4oCprvaJmqXyRCi94/n2lALYtQDN26 ycJPpStQCsWsyzVbwXTR9odaCvAydzeCcFBhf97BxAp9pgxcz0cO1GzM1bC95vK5LKZGYv5 INWnxi+hBj3emHXBXoF5g== UI-OutboundReport: notjunk:1;M01:P0:dd8F53CH0j8=;Pv1NcLBR0Al7W7ZEss6nP9A+ZqD 82yA0ofySuFQFzxyBT0NhRI7ABxdPYcDZ1wlmVxuGA19q3TTVD8bqNLda1Gc7gg+EdvrO3M8o 8oPmHeGo4UPq1XDnB6qxxVYa7S0bz8otxFLNFSL0G5jMH7wYaP9ZYmUcat9ga68S3On5EVvNz YDStywBcb2js0DU/a9V3CEnjQgpL+KDvZO4yFqRTwBQvZSm4yv1lkwU9g+qos1rKFnpjPaBSH PTBXt93rqkq+y1k+DMvNrEvh6E7NXoVHkPIE62BMeP1Q18JjTOZWicXSgZRKeg/mhkBkQ/dB8 UqlIpVDgw6Dks6qbKX2OVxkaFdHbS0BfiRWLoao4HN6I5ChlYyDwRaVYItSdwrHWmPaAxmDD0 U9mM4UWbPR+kZfXRU44bgzJ6ljN0oLmIKfi59RaGbR7bTFP8jJkSG1B0ExQPFEllPNMWb03p0 HNwqllArfoHHzrQy3xFZtYqRSGL7FJYWpDO4WN17UBzK69q2VGLqrKtEUcvh58Qb+5y3Iktct RezGVaxILwJbZRf5Jeoihja5AK6J6qglVH0oCr+FiSZ7vNUrk9rGCNN00Oa4wKycDfVxLvG3I zPFwUGabOBbNGF4hCMM9DAw5OTnRDicEUPHXSy5ZSKbSNWjvR/Xvl4nlg1E89p7YVHwvM8yFI vcv+J+TWkpinq/5H1rK8jlXAgBJ4xHiBs6lOZ+/svw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230207_225722_756322_325FF1E0 X-CRM114-Status: UNSURE ( 9.28 ) X-CRM114-Notice: Please train this message. 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: Joakim Zhang Add FlexCAN decive in adma subsystem. Signed-off-by: Joakim Zhang Signed-off-by: Marcel Ziswiler Tested-by: Alexander Stein # TQMa8XQP --- (no changes since v6) Changes in v6: - Add Alexander's tested-by. Thanks! Changes in v4: - New patch combining the following downstream patches: commit e8fe3f57223a ("arm64: dts: imx8qxp: add FlexCAN in adma") commit 4e90361f1ed3 ("arm64: dts: imx8qxp: add multi-pd support for CAN1/2") commit 899f516e61f8 ("arm64: dts: imx8: dma: fully switched to new clk binding") commit 8a28ca15a058 ("arm64: dts: imx8qxp: drop multi-pd for CAN device") commit c493402197dd ("arm64: dts: imx8: update CAN fsl,clk-source and fsl,scu-index property") .../arm64/boot/dts/freescale/imx8-ss-dma.dtsi | 72 +++++++++++++++++++ 1 file changed, 72 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi index 6ccf926b77a5..2dce8f2ee3ea 100644 --- a/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8-ss-dma.dtsi @@ -298,6 +298,65 @@ adc1: adc@5a890000 { status = "disabled"; }; + flexcan1: can@5a8d0000 { + compatible = "fsl,imx8qm-flexcan"; + reg = <0x5a8d0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + clocks = <&can0_lpcg 1>, + <&can0_lpcg 0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_0>; + /* SLSlice[4] */ + fsl,clk-source = /bits/ 8 <0>; + fsl,scu-index = /bits/ 8 <0>; + status = "disabled"; + }; + + flexcan2: can@5a8e0000 { + compatible = "fsl,imx8qm-flexcan"; + reg = <0x5a8e0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + /* CAN0 clock and PD is shared among all CAN instances as + * CAN1 shares CAN0's clock and to enable CAN0's clock it + * has to be powered on. + */ + clocks = <&can0_lpcg 1>, + <&can0_lpcg 0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_1>; + /* SLSlice[4] */ + fsl,clk-source = /bits/ 8 <0>; + fsl,scu-index = /bits/ 8 <1>; + status = "disabled"; + }; + + flexcan3: can@5a8f0000 { + compatible = "fsl,imx8qm-flexcan"; + reg = <0x5a8f0000 0x10000>; + interrupts = ; + interrupt-parent = <&gic>; + /* CAN0 clock and PD is shared among all CAN instances as + * CAN2 shares CAN0's clock and to enable CAN0's clock it + * has to be powered on. + */ + clocks = <&can0_lpcg 1>, + <&can0_lpcg 0>; + clock-names = "ipg", "per"; + assigned-clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>; + assigned-clock-rates = <40000000>; + power-domains = <&pd IMX_SC_R_CAN_2>; + /* SLSlice[4] */ + fsl,clk-source = /bits/ 8 <0>; + fsl,scu-index = /bits/ 8 <2>; + status = "disabled"; + }; + i2c0_lpcg: clock-controller@5ac00000 { compatible = "fsl,imx8qxp-lpcg"; reg = <0x5ac00000 0x10000>; @@ -369,4 +428,17 @@ adc1_lpcg: clock-controller@5ac90000 { "adc1_lpcg_ipg_clk"; power-domains = <&pd IMX_SC_R_ADC_1>; }; + + can0_lpcg: clock-controller@5acd0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5acd0000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_CAN_0 IMX_SC_PM_CLK_PER>, + <&dma_ipg_clk>, <&dma_ipg_clk>; + clock-indices = , , ; + clock-output-names = "can0_lpcg_pe_clk", + "can0_lpcg_ipg_clk", + "can0_lpcg_chi_clk"; + power-domains = <&pd IMX_SC_R_CAN_0>; + }; };