From patchwork Thu Jan 26 11:08:29 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13116935 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 0025FC54E94 for ; Thu, 26 Jan 2023 11:11:09 +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=hIIxEFFaY3nVbNOp6dPsXEuhlHvGsl3/sqXjxJ74fI4=; b=swmY1jh9L99sxb ULRSKX0RHfi7gpKURODlPGBOhJH5EEJc2RSQkVFaqLP/8JsNEOtQXja7Omn7SQugSWKWZQCQkU7Rw n0zqBG8cUMOPl+jTUiNLyfSILM+GBjAtTGEumvXNrqBTzxnZLdd0wo67mnvTbSpKPltE0i/Cs/WNP NfuGHAtpIifbtAwAQ5nsPDyGLKBMAxukQnDabMBNEiHDe3I08Xci919H6lYUUxGLzareg7SV7T/D+ OQ1nwdJYiZQGtHGOQZGOv3Yr4XnVQHfqrio4QT619h5YY9i0PrZzsDORSTi8WrgiDRr1JhacXfmBD cW8HahheUc0TQtL0dOjg==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL08n-00Ae98-5l; Thu, 26 Jan 2023 11:10:01 +0000 Received: from mout.perfora.net ([74.208.4.197]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pL08A-00AdvA-B1 for linux-arm-kernel@lists.infradead.org; Thu, 26 Jan 2023 11:09:23 +0000 Received: from toolbox.toradex.int ([31.10.206.125]) by mrelay.perfora.net (mreueus002 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Mgd8b-1ozjXs27gV-00O2eX; Thu, 26 Jan 2023 12:09:12 +0100 From: Marcel Ziswiler To: devicetree@vger.kernel.org Cc: linux-imx@nxp.com, Liu Ying , linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Krzysztof Kozlowski , Joakim Zhang , Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , Pengutronix Kernel Team , Rob Herring , Sascha Hauer , Shawn Guo Subject: [PATCH v5 06/10] arm64: dts: imx8qm: add can node in devicetree Date: Thu, 26 Jan 2023 12:08:29 +0100 Message-Id: <20230126110833.264439-7-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20230126110833.264439-1-marcel@ziswiler.com> References: <20230126110833.264439-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:/R5v948UBvLjE3YqWG5zlKLdocWEsvQ74cCBMPwQKZsmV358jND xyln0QwZph9WBneQqSYKBFtNO0NUkmKY3H2vmyqZac5mRGPg3Lrfrq5y5dse6uF4z5tlhxn yrceYhcGL09Ml8prETnOnSXLqpQeieRsSL+u7UREP7iTewfCvdjw0ymJ813/V9DRa1IKft5 +eV1KLM/VfXNYixX6h0ow== UI-OutboundReport: notjunk:1;M01:P0:S+CkQfZUBFk=;NqlqlqONLmRGnkSwE/aCD+nzxNV LFGr/JwoOHya+UW9fAo6obbBO83ooPX8tuEyrknMUyy6a0Bo1AdJDrPi+bMr3fjsKOO84uWki ZG5nj1gL+SOJrXLKUxvW4V2nOOGtlLOPj/bPwb5TA0Ea53BtGQ5TJT+4uLU4Elazac6TPlpMI bpU1N9nXimdY8kdV9ONYMDB+zAbNHVoW2fujtaz3DXd7IgTJj+dyehu3H4+v5sQo3m+Cvhm0T 2SiHUNrZGvvMD+cRpD5KCUnnjYHAvn4sWFGESDivGFWvBLToaDQ+wicrhOULB6QEpE5hrHeig siwqG+UB2J32GSUklHPWQuzcv1A6+mkn58oHCS788EvbCgje09/c3e07G8w+AlJIPGzL7jOQK n8/cAbxrfZ/VwKaUaPTy2Rb9cxTyWaaeQ5i6zBkxy910fcCdSJZXTzlqw+beMg3bHRgHIslP9 vxui8AGdp8UNwW3+U7m7vknsxR4UaL22W/h0YC4pkQuLM7Dau7v0GvhzFuuymWNEYrPBvUyg+ vVTDpV2R6F8aD5BO/F2TXDDkgpFkDUbKsV+HDWi5/2E2ffD1vk4vqs1pwBsKWFPePFO+JoKsA v7gblBfrghkhXTtleNEqorkYbX87gUNVl+EDlJcu//5KUkd5mqssI1eibscsdamLAtf9m8mMI gmXyyQBTy+u412pboHBK/EDOYGm0Jsq1aZrecNe+DC7g4pn68XzyiK4QLjtu6ag= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230126_030922_511762_8BF187DC X-CRM114-Status: UNSURE ( 8.65 ) 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 v5: - Update subject prefix as pointed out by Krzysztof. Thanks! 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 {