Received: by 2002:a05:6a10:5bc5:0:0:0:0 with SMTP id os5csp2354624pxb; Sun, 17 Oct 2021 12:24:52 -0700 (PDT) X-Google-Smtp-Source: ABdhPJxwKTwT3J9aEwAHJ8c+eGvg/KDGZWq32IUUTRJu3CIcn/mjL4FvnYOBjUfkcdw9K0aYlQka X-Received: by 2002:a17:907:7785:: with SMTP id ky5mr23790276ejc.247.1634498691852; Sun, 17 Oct 2021 12:24:51 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1634498691; cv=none; d=google.com; s=arc-20160816; b=AU/mdIJCyJNl+17NP7nWgidCGLm1vsPIYs+9OJEbxupK5rhGr0mFrNFOpPPlkqBg61 GTBHFoAWMqEAd0ki17YDFOGurJQXzCxSeVlqVnU0i4zhxf11eZpo1yCa3YXExAjkB0gV IzEVJ3dd8TdTqNByF5VffOOO/5yWS9MigQpqHyLnrChI9GvX8/+SeQwZD39SBQf1Qj9y HTk/0cj8jMpdzwiY30TlwqHS8Rzj0uhdwxRvOfNHnFrpAhc1Ii0Gp23qsnTfpeM2gapK L8oadycje5C+nH+bNEvv00Y4ce0k1ysUyJHJWE8SJQNpOPLs/6oQZFz+g4VHehDv+sT6 c97g== 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=ySVAQ/tNXFheXiVpC/ImdhyFvSHnNwLHUCTpprjzwZw=; b=JLJkIfW6P4C0mWsRWzMJRLF8HVso6vdNVtLsZflDXEbTlv5S/tsePwTB7MhgUd6ldV fYpszbdz3BHWZkZFZs8vmw+oU9xyUsz6htM2qysxkL973G6AyQWsUt70iIt+S5P/b/Em K+t7UL58yxD3NNndj5msUVCFZJh/O9oU22Z42o6jXmbFZxGOHQJDnJ7VP6/UPVafMX6i vCP27Qs2PWzfYW19r0Tu6Cn8Po/AQnd7yso0pkj18xycqwqeW29YmekAe9EFk821iPIl 1LzZ+AV/YD5h7utCgIPDZgJZXOQFx0PlN0sgVFUBFeXbjogGIemf5o66aOrWYbQzT7MX 1OoQ== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id e22si16066323edc.121.2021.10.17.12.24.09; Sun, 17 Oct 2021 12:24:51 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S242076AbhJOTGQ (ORCPT + 99 others); Fri, 15 Oct 2021 15:06:16 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:35254 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S242387AbhJOTGP (ORCPT ); Fri, 15 Oct 2021 15:06:15 -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 77D5DC061570 for ; Fri, 15 Oct 2021 12:04:07 -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 1mbSUn-0005uk-1l; Fri, 15 Oct 2021 21:03:57 +0200 Message-ID: Subject: Re: [PATCH v3 8/9] arm64: dts: imx8mm-evk: add the pcie support on imx8mm evk board From: Lucas Stach To: Richard Zhu , tharvey@gateworks.com, kishon@ti.com, vkoul@kernel.org, robh@kernel.org, galak@kernel.crashing.org, shawnguo@kernel.org Cc: linux-phy@lists.infradead.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, kernel@pengutronix.de, linux-imx@nxp.com Date: Fri, 15 Oct 2021 21:03:55 +0200 In-Reply-To: <1634028078-2387-9-git-send-email-hongxing.zhu@nxp.com> References: <1634028078-2387-1-git-send-email-hongxing.zhu@nxp.com> <1634028078-2387-9-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 Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Am Dienstag, dem 12.10.2021 um 16:41 +0800 schrieb Richard Zhu: > Add the PCIe support on i.MX8MM EVK board. > > Signed-off-by: Richard Zhu > --- > arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi | 46 +++++++++++++++++++ > 1 file changed, 46 insertions(+) > > diff --git a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi > index 2d0684ac82f6..5ce43daa0c8b 100644 > --- a/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi > +++ b/arch/arm64/boot/dts/freescale/imx8mm-evk.dtsi > @@ -31,6 +31,23 @@ status { > }; > }; > > + pcie0_refclk: pcie0-refclk { > + compatible = "fixed-clock"; > + #clock-cells = <0>; > + clock-frequency = <100000000>; > + }; This is both the PHY reference and bus clock. I guess you could just squash Patch 4/9 into this one, as they are both required to get PCIe on the EVK board. > + > + reg_pcie0_gpio: regulator-pcie-gpio { Drop the gpio suffix. > + compatible = "regulator-fixed"; > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pcie0_reg>; > + regulator-name = "MPCIE_3V3"; > + regulator-min-microvolt = <3300000>; > + regulator-max-microvolt = <3300000>; > + gpio = <&gpio1 5 GPIO_ACTIVE_HIGH>; > + enable-active-high; > + }; > + > reg_usdhc2_vmmc: regulator-usdhc2 { > compatible = "regulator-fixed"; > pinctrl-names = "default"; > @@ -296,6 +313,22 @@ &pcie_phy { > status = "okay"; > }; > > +&pcie0 { > + pinctrl-names = "default"; > + pinctrl-0 = <&pinctrl_pcie0>; > + reset-gpio = <&gpio4 21 GPIO_ACTIVE_LOW>; > + clocks = <&clk IMX8MM_CLK_PCIE1_ROOT>, <&clk IMX8MM_CLK_PCIE1_AUX>, > + <&clk IMX8MM_CLK_DUMMY>, <&pcie0_refclk>; The i.MX8MM PCIe driver should not request the pcie_phy clock. Please add a change in the driver, so we don't need to hook up a useless dummy clock to this node. Regards, Lucas > + clock-names = "pcie", "pcie_aux", "pcie_phy", "pcie_bus"; > + assigned-clocks = <&clk IMX8MM_CLK_PCIE1_AUX>, > + <&clk IMX8MM_CLK_PCIE1_CTRL>; > + assigned-clock-rates = <10000000>, <250000000>; > + assigned-clock-parents = <&clk IMX8MM_SYS_PLL2_50M>, > + <&clk IMX8MM_SYS_PLL2_250M>; > + vpcie-supply = <®_pcie0_gpio>; > + status = "okay"; > +}; > + > &sai3 { > pinctrl-names = "default"; > pinctrl-0 = <&pinctrl_sai3>; > @@ -413,6 +446,19 @@ MX8MM_IOMUXC_I2C3_SDA_I2C3_SDA 0x400001c3 > >; > }; > > + pinctrl_pcie0: pcie0grp { > + fsl,pins = < > + MX8MM_IOMUXC_I2C4_SCL_PCIE1_CLKREQ_B 0x61 > + MX8MM_IOMUXC_SAI2_RXFS_GPIO4_IO21 0x41 > + >; > + }; > + > + pinctrl_pcie0_reg: pcie0reggrp { > + fsl,pins = < > + MX8MM_IOMUXC_GPIO1_IO05_GPIO1_IO5 0x41 > + >; > + }; > + > pinctrl_pmic: pmicirqgrp { > fsl,pins = < > MX8MM_IOMUXC_GPIO1_IO03_GPIO1_IO3 0x141