From patchwork Thu Sep 22 16:29:23 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 12985512 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 A6F57C54EE9 for ; Thu, 22 Sep 2022 16:31:45 +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=4MbmSRjEkmPgcRpttsPRFxrBxNEl7CiZgHmlSDFOvGc=; b=dVCv4WPDGdRmXY DvwwICYiJtdv+0zfBdGwW8XqClVAcXHqJhbwrqPydnezxK5Q/dYkIYwtetcxmUgm+cU+ELOfLOD6m R+e/ykH7brS2EXudKh1bsfJHf7KR/DjvjhU8hglLa7ySkW3BXPQZX7V3+lDeA/lXzzYJIr4W2068t CjkYzJoC3zxfb1yPPrW2VQx8KvW12tFICpefz4FLw0DkwrDLmDAwewSUghXYVzQZGvwoVsX/pn3KN gH2WnrFxlTkItDLhrLwPq0sbbOXCesmBnMMb3escVr68M1ucN931ADDYED0kksTEIUZG0A5dTMi17 4lh9vi630poXXxc3xuew==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1obP66-00GkJk-5Q; Thu, 22 Sep 2022 16:30:46 +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 1obP5S-00Gk4M-F7 for linux-arm-kernel@lists.infradead.org; Thu, 22 Sep 2022 16:30:08 +0000 Received: from toolbox.toradex.int ([31.10.206.125]) by mrelay.perfora.net (mreueus004 [74.208.5.2]) with ESMTPSA (Nemesis) id 1MOAS5-1ovYPA28kb-00OWZr; Thu, 22 Sep 2022 18:29:54 +0200 From: Marcel Ziswiler To: linux-arm-kernel@lists.infradead.org Cc: Marcel Ziswiler , Fabio Estevam , Krzysztof Kozlowski , Laurent Pinchart , Max Krummenacher , NXP Linux Team , Pengutronix Kernel Team , Philippe Schenker , Rob Herring , Sascha Hauer , Shawn Guo , devicetree@vger.kernel.org, linux-kernel@vger.kernel.org Subject: [PATCH v1 6/8] arm64: dts: verdin-imx8mp: add pcie support Date: Thu, 22 Sep 2022 18:29:23 +0200 Message-Id: <20220922162925.2368577-7-marcel@ziswiler.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220922162925.2368577-1-marcel@ziswiler.com> References: <20220922162925.2368577-1-marcel@ziswiler.com> MIME-Version: 1.0 X-Provags-ID: V03:K1:oAz+yO7r1efwhQ3Qw7tjDAGQ4zx6X1UU5BSQx2fhlNXBN7gDTVb KesvjOs3pVp3e51SLTaTVkn5zbmHTuRv20RT8exkcxfzQ+N/3txL+isWfLMBTQc50v/C4F+ bufLVQAsqj9veA2VJ4T09YxOx7xDmtTJgEx+vANt/cJ2tUjHJYi4hVa4/6M2ehBry6ieNs9 KrOihc2/90SOS8gvvzgkQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:tJcySQrtmOE=:/4YHs9F/6kK2ODFpF3nvEw AfBeTRET+AjMRVDsh5dkM0eQcG1jFIf3d3R00OjiyL4GR0pNC8lOjMl5A0sY7R4FhekQa4BmD nWxyFIxo/hoEgjfw8w4xCDItyHwO2kfFgCH1hCbXMNqMCMPRDAOZIKrGcMOLRm0BZgiNg1+Tt JTcLutxflsIe/XmOTKhFrgutZC2O5L+Ui0o0BCgd5EvdCdJKk1EVSTuO/AawMPmR/OefiSjWV qmmue3WAXVweUQzDAROQsI4Ar2URH9IgqsYnWh7foTOM5GFljW4GBldKhcgt0eLPP4Vlzl/sa ca/LZRa8m1j9Xn+HXgex6GMaTaq9KgWI9ZZQb/tLoHikszjuROvWmd4nJZ+X+en1FM5ERl3vx /3n56UnR+JFPMbcxdUD9a9K+DcU19oM44F/vuPlGScVrOWi5ujlkXpohBQqOsnQFMuwnl1UMt fB5KCE97TUyc+JWGRk8e4Y9nzK5zcYMmSZyWzoIwP0gQn2eQsq8amUsdJGi3sGxl1Gj+WKqwN beZluhJJWPwglZUYtSJVhracZerjOPIkXOWOsI/q0jM73cfI6MVcs/K20wHRw8uMhhfJ+pxk3 FiRpzb2itWGRw60og/qEWzxb4icu5GOwjxTCp6KwxZYygdx7uuLdKVtDvAHQAywWWYNuRBWKg Om8Xo2JDkC6oqn23KcKyhbISyFpCZda7dZqMBf20EWccGY1l5So/PHgNtsrfADp7r4kvgnd6V mwsuwzy+n1WDgad/W84QDH4OUtNWhyOHw46trdtZMDkAtbR3m9aeavKLzbzTzJfQt/rT8Pp1J Wlkg/Bm X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220922_093006_636877_308248D4 X-CRM114-Status: UNSURE ( 9.98 ) 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 --- This still relies on the PHY part landing [1] and the internal SYSPLL mode getting sorted [2]. [1] https://lore.kernel.org/all/1663659498-5180-1-git-send-email-hongxing.zhu@nxp.com/ [2] https://lore.kernel.org/all/AS8PR04MB867657D03C61774096A5A1628C4C9@AS8PR04MB8676.eurprd04.prod.outlook.com/ .../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 4b8f86f63081..60f9dc4847db 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 7be7e922927b..160bb32cb5f7 100644 --- a/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi +++ b/arch/arm64/boot/dts/freescale/imx8mp-verdin.dtsi @@ -734,7 +734,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 = <&clk IMX8MP_CLK_HSIO_ROOT>; + clock-names = "ref"; + fsl,clkreq-unsupported; + fsl,refclk-pad-mode = ; +}; /* Verdin PWM_1 */ &pwm1 {