Received: by 2002:a05:6a10:6d10:0:0:0:0 with SMTP id gq16csp1029403pxb; Fri, 15 Apr 2022 18:54:57 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxLW7LfMe2iwMXI5V96RTd6RKAZ943WCeI9SQMQ0qTndQ8EUVqZpqDNPh9189Ezyh8yo1rZ X-Received: by 2002:a17:90a:6781:b0:1cb:11f0:9c51 with SMTP id o1-20020a17090a678100b001cb11f09c51mr7085412pjj.243.1650074097551; Fri, 15 Apr 2022 18:54:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1650074097; cv=none; d=google.com; s=arc-20160816; b=CyJDvsHeMPzm8auuukbo1Gz11VUoIUTyiEieTS/VOTStxsTvYdzdNzB/ECXKm71Sfx cRDyKMuIoUdDF6VykR1s7mC0RdIkLI50YEUSgzNNtGyNzmONFvBNQ7H7uFcSpRJ8peuX we/sPYLi7OQHwDStK1yoz33I+9CxFntwTSwKLZLdSn33b+Af64782p2Jbm/bt/Bp0J+B T9iOioKgS45uXoJZz8j7UqT5K2T751LHolNMZ7F4x69e4KIAn6TKq2wuypOY33+QCSwR uKQ2gyCm9TlLNYxMUIuLTSiie6x6SPMypXo500cdOzww8ypsuasEdPY61XfzbdyERBD9 EZKg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :user-agent:references:in-reply-to:date:cc:to:from:subject :message-id; bh=Op2nao3vZIVqm+JvoluQLJ34noNAqVw42bXEif01bgQ=; b=FqiQ89c926T9CUk/3Myxbu3PR8EckQJFwcfAH9WjY57LPMx4lQmZj48avVTAaO8l1b XKtVKAEGymCftl2Wq+CDKH7+7dNrnc7ol5E7mpu3RmMjkLcbirjWyIQ0gAEae8PtIp5h BlDYSJnyPukATOzzJZkzmj1Eab5nzk2c//E4/YgGAx97Ln7JmY3K4QmpCL1c1u0+yUI5 nHDqtExdf8NdnYBWY3QaQtZ2wtaP8ohNzqUOwTgebDz5EI7s7rpY2UuMYOPsxXjYndzB I5K4Pn09MKEQ7J4WCV5BDS9P0bpJhc/Esas807Xud1NfUtjvaU8DqZFeWp0YxCmINjtX xMKQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from lindbergh.monkeyblade.net (lindbergh.monkeyblade.net. [2620:137:e000::1:18]) by mx.google.com with ESMTPS id ot1-20020a17090b3b4100b001ce3bf512b3si976199pjb.184.2022.04.15.18.54.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Fri, 15 Apr 2022 18:54:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) client-ip=2620:137:e000::1:18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by lindbergh.monkeyblade.net (Postfix) with ESMTP id 273D4139849; Fri, 15 Apr 2022 18:16:02 -0700 (PDT) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1346764AbiDNVHY (ORCPT + 99 others); Thu, 14 Apr 2022 17:07:24 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:60294 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S236725AbiDNVHU (ORCPT ); Thu, 14 Apr 2022 17:07:20 -0400 Received: from metis.ext.pengutronix.de (metis.ext.pengutronix.de [IPv6:2001:67c:670:201:290:27ff:fe1d:cc33]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D1C5A3CFC2 for ; Thu, 14 Apr 2022 14:04:54 -0700 (PDT) Received: from gallifrey.ext.pengutronix.de ([2001:67c:670:201:5054:ff:fe8d:eefb] helo=[IPv6:::1]) by metis.ext.pengutronix.de with esmtps (TLS1.3:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1nf6dq-0007gi-Kc; Thu, 14 Apr 2022 23:04:38 +0200 Message-ID: <542969d58ad05c496ae19256f87ea217eb9b7642.camel@pengutronix.de> Subject: Re: [PATCH v2 6/7] arm64: dts: imx8mp-evk: Add PCIe support From: Lucas Stach To: Richard Zhu , p.zabel@pengutronix.de, bhelgaas@google.com, lorenzo.pieralisi@arm.com, robh@kernel.org, shawnguo@kernel.org, vkoul@kernel.org, alexander.stein@ew.tq-group.com Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-pci@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Date: Thu, 14 Apr 2022 23:04:37 +0200 In-Reply-To: <1646644054-24421-7-git-send-email-hongxing.zhu@nxp.com> References: <1646644054-24421-1-git-send-email-hongxing.zhu@nxp.com> <1646644054-24421-7-git-send-email-hongxing.zhu@nxp.com> Content-Type: text/plain; charset="UTF-8" User-Agent: Evolution 3.40.4 (3.40.4-1.fc34) MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-SA-Exim-Connect-IP: 2001:67c:670:201:5054:ff:fe8d:eefb X-SA-Exim-Mail-From: l.stach@pengutronix.de X-SA-Exim-Scanned: No (on metis.ext.pengutronix.de); SAEximRunCond expanded to false X-PTX-Original-Recipient: linux-kernel@vger.kernel.org X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,MAILING_LIST_MULTI,RDNS_NONE, SPF_HELO_NONE,T_SCC_BODY_TEXT_LINE autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Montag, dem 07.03.2022 um 17:07 +0800 schrieb Richard Zhu: > Add PCIe support on i.MX8MP EVK board. > > Signed-off-by: Richard Zhu > --- > arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 55 ++++++++++++++++++++ > 1 file changed, 55 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > index 2eb943210678..ed77455a3f73 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > +++ b/arch/arm64/boot/dts/freescale/imx8mp-evk.dts > @@ -5,6 +5,7 @@ > > /dts-v1/; > > +#include > #include "imx8mp.dtsi" > > / { > @@ -33,6 +34,12 @@ memory@40000000 { > <0x1 0x00000000 0 0xc0000000>; > }; > > + pcie0_refclk: pcie0-refclk { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <100000000>; > + }; > + > reg_can1_stby: regulator-can1-stby { > compatible = "regulator-fixed"; > regulator-name = "can1-stby"; > @@ -55,6 +62,17 @@ reg_can2_stby: regulator-can2-stby { > enable-active-high; > }; > > + reg_pcie0: regulator-pcie { > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pcie0_reg>; > + regulator-name = "MPCIE_3V3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&gpio2 6 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > reg_usdhc2_vmmc: regulator-usdhc2 { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > @@ -297,6 +315,30 @@ pca6416: gpio@20 { > }; > }; > > +&pcie_phy { > + fsl,refclk-pad-mode = ; > + clocks = <&pcie0_refclk>; > + clock-names = "ref"; > + status = "okay"; > +}; > + > +&pcie{ > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pcie0>; > + reset-gpio = <&gpio2 7 GPIO_ACTIVE_LOW>; > + clocks = <&clk IMX8MP_CLK_HSIO_ROOT>, > + <&clk IMX8MP_CLK_PCIE_ROOT>, > + <&clk IMX8MP_CLK_HSIO_AXI>; > + clock-names = "pcie", "pcie_aux", "pcie_bus"; > + assigned-clocks = <&clk IMX8MP_CLK_HSIO_AXI>, > + <&clk IMX8MP_CLK_PCIE_AUX>; > + assigned-clock-rates = <500000000>, <10000000>; > + assigned-clock-parents = <&clk IMX8MP_SYS_PLL2_500M>, You don't need to set the IMX8MP_CLK_HSIO_AXI clock rate here, that's already don't by the power-domain, as it is keeping this bus clock active. Only need to set the PCIE_AUX rate here. Regards, Lucas > + <&clk IMX8MP_SYS_PLL2_50M>; > + vpcie-supply = <®_pcie0>; > + status = "okay"; > +}; > + > &snvs_pwrkey { > status = "okay"; > }; > @@ -442,6 +484,19 @@ MX8MP_IOMUXC_I2C3_SDA__I2C3_SDA 0x400001c3 > >; > }; > > + pinctrl_pcie0: pcie0grp { > + fsl,pins = < > + MX8MP_IOMUXC_I2C4_SCL__PCIE_CLKREQ_B 0x61 /* open drain, pull up */ > + MX8MP_IOMUXC_SD1_DATA5__GPIO2_IO07 0x41 > + >; > + }; > + > + pinctrl_pcie0_reg: pcie0reggrp { > + fsl,pins = < > + MX8MP_IOMUXC_SD1_DATA4__GPIO2_IO06 0x41 > + >; > + }; > + > pinctrl_pmic: pmicgrp { > fsl,pins = < > MX8MP_IOMUXC_GPIO1_IO03__GPIO1_IO03 0x000001c0