From patchwork Thu Feb 2 15:32:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13126412 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 C6013C05027 for ; Thu, 2 Feb 2023 15:37:51 +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=aPREUfAwlfXkPfnN4466hIwKtnXnAtex5EBz1aNOiSE=; b=uWC+6aO1TIVZxI S4Xq+glfapOY+PHeHBijtu0bZzUriG2SFDHRxc//ruqN+degUq55sNzr+US//kFMZjkShUbra0VkU bWeXDAhrTWp1BefugLLHSO5UqDuXsDfgvP8abOCXwzMwIuZtDj4Y3FRpqY4bF1ppcdUBpx/I8umbg dXvw4Y6zTQIFr6tyrJpoYk4ULj0s7kScrGNlXd5hm8SIPr5gBaVmZcR58FMMzyfXTEUVSAgiPG27N pTkx1Sw6gd6HZVmGvaZOaiW14W+Ipclt9XjsGbeGkbML6J6Ym/gkka7ccYu1MMSvGjdpdSoXPqjUL LlOa6egxxOUYA3ndovDg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pNbdp-00GRrR-8k; Thu, 02 Feb 2023 15:36:49 +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 1pNbaM-00GPu6-6j for linux-arm-kernel@lists.infradead.org; Thu, 02 Feb 2023 15:33:19 +0000 Received: from toolbox.int.toradex.com ([213.55.225.17]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0MEovc-1pPHKo0GjK-00FxTh; Thu, 02 Feb 2023 16:33:00 +0100 From: Marcel Ziswiler To: devicetree@vger.kernel.org Cc: Liu Ying , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , linux-imx@nxp.com, Joakim Zhang , Marcel Ziswiler , Alexander Stein , Fabio Estevam , Frank Li , Krzysztof Kozlowski , Max Krummenacher , Peng Fan , Pengutronix Kernel Team , Philippe Schenker , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH v6 05/10] arm64: dts: imx8qxp: add flexcan in adma Date: Thu, 2 Feb 2023 16:32:15 +0100 Message-Id: <20230202153221.197308-6-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230202153221.197308-1-marcel@ziswiler.com> References: <20230202153221.197308-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:hVpPGSSdqpj7zPNz82c0jzvaidawDWXxruHfRDfxUAbPCFzD5yl dTUapQCqAOifspwfwoNrG9UhQlWgzMNN+1rUADisFDW/8Jd9wNKmGvhzJR2HtKvn+YLIGD4 9nyN5ItlE2iv+PAweoApThnnpZzJb8Er/98SazV67ruIL2RvNwxFlWJevpKV1WXwD4cR2d8 FK/zzW3srVCAj/MrdrIYA== UI-OutboundReport: notjunk:1;M01:P0:JdbnSsubRWA=;wd5OLZwdM9rnnY73dGjM92At5wr kR8fb78o1hCP9rU6Sx0Lb8vNWTcqsYE6sujXQGLDZdofiEzR7KvtMjP9JB0Zb0kpWg5K3b2Kf o5M9OqbznMLdEnTedsF5gzslmYO4DzCrBjuoerZZXFOsW5jNiKLAjZXHd9RCetBk5THijcIra hTbokRAUxl6X0sNVe3nnl4kamoFryrQ01Fr2W0hOPwG8ytbcJnJf9Gjslvgs4BTw6+OUrt2zQ fPsVb0VuO5QOpjpGdeaETBry7P0kDXSX0J7MZELTfDvoNXFyQWaVDBqKxjQL4DqwPb2I+zl1i au6kEMP9UrT62EpitspDdC+IzWt8ncXpG8bn26J14mf1xmwvEACDBh5gas9ycCUnAVfccgyre Wuj7j7ia1NOVhH4WNLAmcW1yIRFoq+pEsiFBh9MNgPaOX813W6pqDvf0Fw+yBmdBY9GhJiO+T erTI621IqkYdlGMK9QpxRqMLtRQWJHc0rNoEWSYiGG6hYWVCDPJMC1lXi9US5BiMtgloxiyPe qJapxlg+EdroQjlX3rxZdAD4O43fCU2XcFwW9q16UAel4VskM8+TdyeqyLtTNbODCDGgV9ijy Ep72Iml90yEG2rsUresz6IAOQiIrWTYp754w0h426bUuMvZrB+YMdOm09nBlahumPplIGEeMU uHq/klvGgz6P6Po0H9SxwrzLBxORDdH2ewEE1W8PDg== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230202_073314_361867_D3909BBB X-CRM114-Status: UNSURE ( 9.15 ) 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 --- 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>; + }; };