From patchwork Wed Jan 18 07:26:45 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13105752 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 570D5C32793 for ; Wed, 18 Jan 2023 07:30:34 +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=mNQb9a6Cax47+p4am3qMVOYGJBvymNPU9ycyrcNLNx0=; b=0QVTRs5rVEE6TE cNdkzMOXAYaoQ44IWX8lqNkV3BwAR3iGerdLQ06knQjiZuSTOuGf9BTBcte8gzwLsn16a4jo2cMit dMWEQxHKpPTNcXBfhBgeuDRsOy1rGf5NrqSlzRLyE9XlpbNec1qyVnMIs+u7sG2HzkIiPTwUMf2V6 yUqtJmlStUxDPM5CR069ycsBp/5Hknbqp70U4lZCWyB18OOfDsJy5+3mv2adQZhBiPF219r8IOnSh /i66pcp9bNJOJYqwnsS/nMjToPXuG7ZC3IK/yOKyCbypjA9/4Oh7lkE7Z88kaUv9sq3OoAJpSeYAf /F4NWBF1G6EfKhzss1Kg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pI2sx-00HCuq-76; Wed, 18 Jan 2023 07:29:27 +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 1pI2rP-00HCEs-7K for linux-arm-kernel@lists.infradead.org; Wed, 18 Jan 2023 07:27:52 +0000 Received: from toolbox.int.toradex.com ([213.55.225.137]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Mb6pp-1p1sU22GL5-00KktW; Wed, 18 Jan 2023 08:27:42 +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, Joakim Zhang , Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH v4 07/17] arch: arm64: imx8qm: add can node in devicetree Date: Wed, 18 Jan 2023 08:26:45 +0100 Message-Id: <20230118072656.18845-8-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:BmX5IQtw9Cvs/zQcEaxYF//0vcAMqIX7xQcD6kZ7heXWI19Sw+A fmL64UlX+AU5unm1iffpM/YUazDqQJ/RubfXmSgUfODW43uX6pgcavw11/nTfVcRTs9bKrC NnwTVswt+PRdnYKHzJZ8FGcWEqK4D3tVAUzfS5uQRS01oNXBmtom6nXNlQaUJHjwLG0QDBk RCqkXx40xUle5SPBBtBrg== UI-OutboundReport: notjunk:1;M01:P0:HIp150CjYdM=;tbMeHCysnKjaN/MWACEaN0OVmMT A6plwstfLpRIbgpOoougiS6zofltvCOB1h0Hqsac1jDfJhKAbu3zjdLrB2JNVNWXe5fjgtIIn +0C9/0bOWOAreTg1rMYmOo6JCQTZ98G3wUAC+kTEDRnr+Ru7yDyA1FajV5GJmoQHfQL+zAzVW IcXnOwd3/9QyrUj28gDF7Ac5P2dI+nG2E93GKajk+kHvQ2BiwtliOb3axW5Lz9rOXpTQD26mY xUkP14dRwc0ist+KyNnY+jiNHUPkRMWBvdvuOPNx238KkpGp5LcBY//gnFFCf2GYd/bkAf+hA QF23eTot20WL5JRWwlU+RVXSpjWc9lU/X+AlMcbuxvgTVelp/i+YVeu/cHhyZYuT8hrzAwZJa MOSyW/23UrLKE1GaWtYPJmW02EL8/Ynl/GenHCY6lIjwkum56fyuqdxGuC4Zgc4uS7ytQ6EK7 V0P7d9RxzMwtzLggrbXhp9Dor71e5GPauTiF95/ZyFN8vvKbNlO+tVIRQxRGTW7B5tQtx16TD EZ5KoIbPO1mnifRIwJwtjuDYYYXoKVbfSRxRWuCLCarV4oUaBOgIafbWbmxPUu0QYq2vaYVsS gPSVTWrm3DTagh48LFg+MLIgeUjgvE4RgPgxIOzwFcDl5VKfPdQKcRLyAcC6MBDOp+uOAhUwj +30yeSrJAszbU+8EsPbGt67PuPxdh0hi9amgs7F+GQ== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230117_232751_374142_12206BE7 X-CRM114-Status: UNSURE ( 9.26 ) 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 CAN node for imx8qm in devicetree. Unlike on the i.MX 8QXP where the flexcan clocks are shared between multiple CAN instances, the i.MX 8QM has separate flexcan clock slices. Signed-off-by: Joakim Zhang Signed-off-by: Marcel Ziswiler --- Changes in v4: - New patch inspired by the following downstream patch: commit 117607e6a7b5 ("arm64: dts: imx8qm: add CAN node in devicetree") .../boot/dts/freescale/imx8qm-ss-dma.dtsi | 44 +++++++++++++++++++ 1 file changed, 44 insertions(+) diff --git a/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi b/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi index bbe5f5ecfb92..e9b198c13b2f 100644 --- a/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8qm-ss-dma.dtsi @@ -16,6 +16,50 @@ uart4_lpcg: clock-controller@5a4a0000 { "uart4_lpcg_ipg_clk"; power-domains = <&pd IMX_SC_R_UART_4>; }; + + can1_lpcg: clock-controller@5ace0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5ace0000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_CAN_1 IMX_SC_PM_CLK_PER>, + <&dma_ipg_clk>, <&dma_ipg_clk>; + clock-indices = , , ; + clock-output-names = "can1_lpcg_pe_clk", + "can1_lpcg_ipg_clk", + "can1_lpcg_chi_clk"; + power-domains = <&pd IMX_SC_R_CAN_1>; + }; + + can2_lpcg: clock-controller@5acf0000 { + compatible = "fsl,imx8qxp-lpcg"; + reg = <0x5acf0000 0x10000>; + #clock-cells = <1>; + clocks = <&clk IMX_SC_R_CAN_2 IMX_SC_PM_CLK_PER>, + <&dma_ipg_clk>, <&dma_ipg_clk>; + clock-indices = , , ; + clock-output-names = "can2_lpcg_pe_clk", + "can2_lpcg_ipg_clk", + "can2_lpcg_chi_clk"; + power-domains = <&pd IMX_SC_R_CAN_2>; + }; +}; + +&flexcan1 { + fsl,clk-source = /bits/ 8 <1>; +}; + +&flexcan2 { + clocks = <&can1_lpcg 1>, + <&can1_lpcg 0>; + assigned-clocks = <&clk IMX_SC_R_CAN_1 IMX_SC_PM_CLK_PER>; + fsl,clk-source = /bits/ 8 <1>; +}; + +&flexcan3 { + clocks = <&can2_lpcg 1>, + <&can2_lpcg 0>; + assigned-clocks = <&clk IMX_SC_R_CAN_2 IMX_SC_PM_CLK_PER>; + fsl,clk-source = /bits/ 8 <1>; }; &lpuart0 {