Received: by 2002:a05:6358:45e:b0:b5:b6eb:e1f9 with SMTP id 30csp3338191rwe; Mon, 29 Aug 2022 09:44:04 -0700 (PDT) X-Google-Smtp-Source: AA6agR4qx2bb6cKLgZL/BIrb6w9LQh8Uq/Dv6sBxKnKaK6yBozzlzryNGBmEttLZ6Z0aihbFDhFl X-Received: by 2002:a63:4750:0:b0:42b:609d:538a with SMTP id w16-20020a634750000000b0042b609d538amr14764495pgk.217.1661791444227; Mon, 29 Aug 2022 09:44:04 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1661791444; cv=none; d=google.com; s=arc-20160816; b=STT73BxkR7dvpLkkDeX9nPDkUyOwBZABCBI0EU2RFJeyRE6zUOwaN1LZudCIvWmLPq 5RI9Pc2UVp3YBcyc4na3o287NWTIhFQawdn6QYe80ygnOJ9ETxiJ5uCevZpfRbS+3t6L +FyHztLO+IHTWDvpDbljZiP2MxoVoagjQ5JexEiGXFme97L63cPcc4llNrVPoxWZPMFj fESxcCVIR82UGCHLH1VVC9/FrUHD1mVVe7BgVr0deroNOOkZV1tywVdK1HXdEnilXtNh Fdw1u8b7A3r3jPcvztpMpA0dPHYyhT08cH9W+RiFWCQ3+AbRVGz/ER3jnjC9v8vDIL6i U7oA== 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=YAhiCmOTvrmzn5fHo6cPc7KgJuHGuUlsbwYBeSBAdPs=; b=btSV0KIpmI91KvKY8lZ6laHzqyLPHez3htjuBXDG+HcBJdNpeGq28/anzPoB0FIWHs Ohv7kBwgbomojy23ViMPqG1GWfZR2yBwLBVsgWSRK+/slu4dIkoeV1t6iCuy1Sx4DXCb koO5QSUhdjNugNdbNNaCwoOV7W819K1rwRIuvJFlk4EURP0Z1yT67dQ4IhiiBZ/Hdwm7 l3rJ5Dfy0/SGp+J/8wb0o9UIA48SRGtgAK/Fnz+GxY5rF9ii7fFToH4l236oyYCj87w3 PvSzs4llrLXuX2ctB/02LjLr+zawiYXHCl4x4cV0VkBe4phWBBChH5upFWlbLxrcUnOC 5aKQ== 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:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h129-20020a636c87000000b0042c3fd6d01esi2040956pgc.181.2022.08.29.09.43.53; Mon, 29 Aug 2022 09:44:04 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230057AbiH2PUm (ORCPT + 99 others); Mon, 29 Aug 2022 11:20:42 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45614 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229921AbiH2PUe (ORCPT ); Mon, 29 Aug 2022 11:20:34 -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 C84C654C8C for ; Mon, 29 Aug 2022 08:20:32 -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 1oSgYf-00077I-3W; Mon, 29 Aug 2022 17:20:13 +0200 Message-ID: Subject: Re: [PATCH v4 0/6] Add iMX8MP 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, marex@denx.de, richard.leitner@linux.dev 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: Mon, 29 Aug 2022 17:20:11 +0200 In-Reply-To: <1661760917-9558-1-git-send-email-hongxing.zhu@nxp.com> References: <1661760917-9558-1-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=-4.2 required=5.0 tests=BAYES_00,RCVD_IN_DNSWL_MED, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE autolearn=unavailable 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 Hi Richard, instead of review comments I sent you a two patches to rework things more to my liking. Hope you agree with the approach. One question, though: did you test this with devices with Gen2/3 speeds? The Marvell WiFi module on my EVK board only links with Gen1, while it claims Gen2 speed in the LnkCap register. However, it does seem to come up with Gen1 as the target link speed in LnkCtl2, so maybe the device is at fault here. Regards, Lucas Am Montag, dem 29.08.2022 um 16:15 +0800 schrieb Richard Zhu: > Based on the 6.0-rc1 of the pci/next branch. > This series adds the i.MX8MP PCIe support and tested on i.MX8MP > EVK board when one PCIe NVME device is used. > > - i.MX8MP PCIe has reversed initial PERST bit value refer to i.MX8MQ/i.MX8MM. > Add the PHY PERST explicitly for i.MX8MP PCIe PHY. > - Add the i.MX8MP PCIe PHY support in the i.MX8M PCIe PHY driver. > And share as much as possible codes with i.MX8MM PCIe PHY. > - Add the i.MX8MP PCIe support in binding document, DTS files, and PCIe > driver. > > Main changes v3-->v4: > - Regarding Phillip's suggestions, add fix tag into the first commit. > - Add Reviewed and Tested tags. > > Main changes v2-->v3: > - Fix the schema checking error in the PHY dt-binding patch. > - Inspired by Lucas, the PLL configurations might not required when > external OSC is used as PCIe referrence clock. It's true. Remove all > the HSIO PLL bit manipulations, and PCIe works fine on i.MX8MP EVK board > with one NVME device is used. > - Drop the #4 patch of v2, since it had been applied by Rob. > > Main changes v1-->v2: > - It's my fault forget including Vinod, re-send v2 after include Vinod > and linux-phy@lists.infradead.org. > - List the basements of this patch-set. The branch, codes changes and so on. > - Clean up some useless register and bit definitions in #3 patch. > > Documentation/devicetree/bindings/phy/fsl,imx8-pcie-phy.yaml | 16 +++++++-- > arch/arm64/boot/dts/freescale/imx8mp-evk.dts | 53 +++++++++++++++++++++++++++++ > arch/arm64/boot/dts/freescale/imx8mp.dtsi | 46 ++++++++++++++++++++++++- > drivers/pci/controller/dwc/pci-imx6.c | 17 +++++++++- > drivers/phy/freescale/phy-fsl-imx8m-pcie.c | 150 +++++++++++++++++++++++++++++++++++++++++++++++++++++++++------------------------- > drivers/reset/reset-imx7.c | 1 + > 6 files changed, 232 insertions(+), 51 deletions(-) > > [PATCH v4 1/6] reset: imx7: Fix the iMX8MP PCIe PHY PERST support > [PATCH v4 2/6] dt-binding: phy: Add iMX8MP PCIe PHY binding > [PATCH v4 3/6] phy: freescale: imx8m-pcie: Add iMX8MP PCIe PHY > [PATCH v4 4/6] arm64: dts: imx8mp: Add iMX8MP PCIe support > [PATCH v4 5/6] arm64: dts: imx8mp-evk: Add PCIe support > [PATCH v4 6/6] PCI: imx6: Add iMX8MP PCIe support