From patchwork Wed Dec 14 06:13:54 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 13072799 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 CED0EC4332F for ; Wed, 14 Dec 2022 06:15:39 +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: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:In-Reply-To:References: List-Owner; bh=MduHZpeARF8DlFQlyFKin4gVx6SP0Vg56U6/140fix4=; b=LbmWX5K+/VNr7c e+9AZweuFzbVh6bCMqs8+QsAwsJ5i/N1szS4EcgFaTOKseV0POhphATkycDjA15DCBD90yJ9HPBOS dWPGtCMfTEvghEJ7B6wUFnzFtyAntZZ4U2nGPlxGEKG6GAM4HQp+9a0wP7WkFliZuKqCvwHkd4/1o ovasvPEs+a3sK2+UTZc2QphP1gHgW1KHh60oPs6H4PPKz3M9u+3Iu8X0CUP6B4lB9wVvxfbTpIGdf JtbaIElqaTaFgThJ3PvH7IeHRCn22HcFLfxgXZcAFHJsQi5Y9LpWE2KBj4FMqvXSbViUZu/arjj0R IYSICj2RIA/GEMNDt63w==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1p5L2F-00D7xc-LX; Wed, 14 Dec 2022 06:14:31 +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 1p5L2C-00D7nR-Jk for linux-arm-kernel@lists.infradead.org; Wed, 14 Dec 2022 06:14:30 +0000 Received: from toolbox.int.toradex.com ([106.185.144.150]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0Lij1v-1oUtgB2izd-00d05e; Wed, 14 Dec 2022 07:14:07 +0100 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Shawn Guo , NXP Linux Team , Lucas Stach , Richard Zhu , Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Max Krummenacher , Pengutronix Kernel Team , Philippe Schenker , Rob Herring , Sascha Hauer , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1] arm64: dts: verdin-imx8mp: add pcie support Date: Wed, 14 Dec 2022 07:13:54 +0100 Message-Id: <20221214061354.174072-1-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 MIME-Version: 1.0 X-Provags-ID: V03:K1:EXCyTQnANcnHc8rJV9g/dT94JKpnbGsF8DjKVs4wrRHVYuBxaTH VB6tSKl9MXJYQJSxQRNFBjVCuw9CYsXquRLH8ho4LUJ3Rc5BNat80Xs9uyaNLMIImIpLLCA oXMxXyEzIobYD36Szw//5GAo8KImH/7gBSw/LY3ta9esI1jfb9cJfvRD+iRmorF8sZT4fSv xSyFCM1qWjid1Pvp4ewHA== UI-OutboundReport: notjunk:1;M01:P0:VkxFcXSaYYY=;4ck4HnnxfMLyi497iz3koOJBivI 1CH8CjARv9sviAtaUj5YbVf9jkC8tGEDMgcJvbqAyESNStUJanPV9pt2elB8W4fCNo1yQ9YTt iddLYzIvLvnlxqmiPRN7wpC0Y7oTNtus+kDPPK1I9HPGSM4YH8/RHUZfVrmaeGyzvtmYI8+NF EW3DU5SymdYmcpplJL8jJKLgtJ4COAJW9HuvBTOIEMTelueysmJYuIVzpTMZziycTokOQAvsN 995Oq4GcbmC4XhfOJWlt7WWNZspWWG4Lndja6O8oh2A0drcDfOlJtxXpjYJk4yHVN00Y5Q/q4 DNgg++z+baCGpYptk8Xxw1Fq+AGMA0Qk1PYqfsnaebUCc+SBO/uKbFKrIta9gPct4AxwL821r Svceq0LzsBYJbA7JKFdToyPFRbRDh8BzSNXkv46EsVSo2FxXZBNezkiViDsRpS8Oz0tjmM6bI 7h1853Br1hFXQeZQCpNuG0LZHLbhQMCJ6uYp9xYjg0fii6IPiJiwYjhCsBmgFSQnaKLt68rF+ GrXlr6GgNdb5n6ZmFVCsY4+tARIWb7oLLz7dV3Lyl0rkJbE7Kag7YqTmlzHOU0n6y4qq5SkdV ZC06MJlECSxYWz+WO0gFlTyloKO1go9fFg93i+lSZbP/K3qKhp4Gri/PgmjwQB88Q3URJf2b+ lYnCwHQLG+hmMjlOTAK4R5H35Mp7il+SZpM8N+LQBw== X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20221213_221428_760450_34AA33C0 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: Marcel Ziswiler Add PCIe support on the Verdin iMX8M Plus. Signed-off-by: Marcel Ziswiler Reviewed-by: Laurent Pinchart --- This has successfully been tested with Lucas' imx8mp-hsio-blk-ctrl high performance PLL clock exposure patch set [1] a later version thereof hopefully may land together with my humble patch. Thanks! [1] https://lore.kernel.org/all/20221213160112.1900410-1-l.stach@pengutronix.de/ .../dts/freescale/imx8mp-verdin-dahlia.dtsi | 9 +++++++- .../boot/dts/freescale/imx8mp-verdin.dtsi | 22 ++++++++++++++++++- 2 files changed, 29 insertions(+), 2 deletions(-) diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi index 80db1ad7c230..56b0e4b865c9 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin-dahlia.dtsi @@ -67,7 +67,14 @@ &i2c4 { /* TODO: Audio Codec */ }; -/* TODO: Verdin PCIE_1 */ +/* Verdin PCIE_1 */ +&pcie { + status = "okay"; +}; + +&pcie_phy { + status = "okay"; +}; /* Verdin PWM_1 */ &pwm1 { diff --git a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi index 6a1890a4b5d8..f3a46f4caf49 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -749,7 +749,27 @@ eeprom_carrier_board: eeprom@57 { }; }; -/* TODO: Verdin PCIE_1 */ +/* Verdin PCIE_1 */ +&pcie { + assigned-clocks = <&clk IMX8MP_CLK_PCIE_AUX>; + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_50M>; + assigned-clock-rates = <10000000>; + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, + <&clk IMX8MP_CLK_PCIE_ROOT>, + <&clk IMX8MP_CLK_HSIO_AXI>; + clock-names = "pcie", "pcie_aux", "pcie_bus"; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_pcie>; + /* PCIE_1_RESET# (SODIMM 244) */ + reset-gpio = <&gpio4 19 GPIO_ACTIVE_LOW>; +}; + +&pcie_phy { + clocks = <&hsio_blk_ctrl>; + clock-names = "ref"; + fsl,clkreq-unsupported; + fsl,refclk-pad-mode = ; +}; /* Verdin PWM_1 */ &pwm1 {