Received: by 2002:ad5:4acb:0:0:0:0:0 with SMTP id n11csp4987898imw; Tue, 19 Jul 2022 18:03:04 -0700 (PDT) X-Google-Smtp-Source: AGRyM1tAJyj23FG+KMIWAgn8WzNtuOZdADiAcXAPn6wDn2pEQgEfd1pOi9XQWahVOJGymxpf4KX+ X-Received: by 2002:a05:6402:2395:b0:43a:6d91:106c with SMTP id j21-20020a056402239500b0043a6d91106cmr48468843eda.299.1658278983849; Tue, 19 Jul 2022 18:03:03 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1658278983; cv=none; d=google.com; s=arc-20160816; b=sXdmLU9tphSaqW2kipNjV3zszbbfz5Fq5JOMMmau0DGQa6TfkmLqseYWcgO0F27Fui WIYqamjHE9ORMw16NxFOAJ8GIW3LiTk0UAR6crOY+kCLMsfnCsCuEKoGqHoTkZWNHgPM cGA1TNjUUfueBv/eAFky1qxRVlu3pSFEdWqVp+NSvg/Sej6grb9Pv3EykhAtn9R/n+A6 W3v6mQbiHdXbRd8+HDZzipE5z/RpwtfqO9rn6gMHNyX7vhEgnhJuHYKZBY4Zlgpt6n5Q Qs/ir9kuXnaYZU1aH56/0ZQ0CDUJbQf2VFQylQylXA48Ij0DBssKuC+mZasWZPlbkpUX P32Q== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:cc:to:subject:message-id:date:from:in-reply-to :references:mime-version:dkim-signature; bh=MMqpq+6+yoPLVRxuqGlUD9PzJdpOdFM4+KM/Do+P/P4=; b=PgkYHL1GD7thyqjzsDV5Rlr9BeubFhMcgimEpgw/sIqRIjAbh4F6yEID/ztExohL81 3B8Xz+JMdmIhlrSS5EVZxqbVydh8dsAdRlnm8YUaE0IpqNKxhkpoQV4A4b0Sy8LFAVXC RF9JGdx72n9FkbwSHcALwiOUZ7rINZXkEPsA1Pb8Ecb6yDA78lSqZeUB0mggaJ92epID 5z6W2Y4PvY+amwFwYNmmcHAb0rUi5vwOdbz2iVpSjFi8jeNj1JyDwOrSbMkSsDX/nXps m/Pu4CXWy/d8f7GjIO1stfmjvpjaFlN04fbmWFmg11oKG7xJ2wyJcsgynpRrBIUCD/pj TmRA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=zXISU7im; 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 l17-20020a170906795100b0072b4afe43desi21315412ejo.105.2022.07.19.18.02.38; Tue, 19 Jul 2022 18:03:03 -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; dkim=pass header.i=@gateworks-com.20210112.gappssmtp.com header.s=20210112 header.b=zXISU7im; 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 S232909AbiGTA71 (ORCPT + 99 others); Tue, 19 Jul 2022 20:59:27 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:52152 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S239136AbiGTA7U (ORCPT ); Tue, 19 Jul 2022 20:59:20 -0400 Received: from mail-pj1-x102f.google.com (mail-pj1-x102f.google.com [IPv6:2607:f8b0:4864:20::102f]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 5C0DD422D1 for ; Tue, 19 Jul 2022 17:59:19 -0700 (PDT) Received: by mail-pj1-x102f.google.com with SMTP id l14-20020a17090a72ce00b001f20ed3c55dso622982pjk.5 for ; Tue, 19 Jul 2022 17:59:19 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gateworks-com.20210112.gappssmtp.com; s=20210112; h=mime-version:references:in-reply-to:from:date:message-id:subject:to :cc; bh=MMqpq+6+yoPLVRxuqGlUD9PzJdpOdFM4+KM/Do+P/P4=; b=zXISU7imtSyM8keXKHfu+RbyJ1d2MZ5O6ob4x2/Fa+/4IfT8j3orPgO+bJrF8Ovg6N RaJljrcCqrngnnj/2niRvPDEIdujQeCpyIKx1Deh2cj6q0IVASBpagRmaOQyWwWQ0Zso KZ/CCx0NVAcTRGPWpnN+C/0LIgfWLyUe3JV07xD4WTkktb8EnVO92bDmvwqT9IiDDqxD HMPkRm7uOoKdQ0v2yaBKjtXoTCrX9wIINAMpz851fVUg5hNLM1QLP7ck1tc/FpBOmi2L YvJB/STir26x4yvyZB5POdAzWYkmE8iQ+fDdYyua0WQ5rS4CNRuVwGb9U2RfDqLRFcgz jP0w== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to:cc; bh=MMqpq+6+yoPLVRxuqGlUD9PzJdpOdFM4+KM/Do+P/P4=; b=ujXHqdWXTn047I12EFPNvKWxiI4g/Vcj31tBlmwzxVtQuKBPTBaGV3hSYyclFu28EO +cycbSK0a4RACy8saFf+PS+cLP2XwKDvkDVJa6Ysg3mEA4YImcOiOXUvPQgkZQIyv7K2 0bYvf88E9H+5OQVZrypR5areNdIh+lZ/AfBzky/9+kwvtQK9VKTMh/Kt1EKSjcxgsS/f QSzjFRjrgctZAeqY5PBc9sCovRcxwolpdbrr34UsSYDZukfWDlkFTVeIf3AeTE6qacTt jMWzwLJEHb0ZjVC+CYjeDZOFTm71gfEAdkbMw+q325bPVIrBy0IShNZegCuZ0LEFodVb DJBw== X-Gm-Message-State: AJIora9kUWe25PM+ZDVq1rOQjNfXNrgDz4IEUD7bvQO5IbkcCedLHdx7 /lxZrqK1OpKslcTkIa4gkKxVWG2PHaZAYvhnMZOidw== X-Received: by 2002:a17:90b:4f82:b0:1f0:95d:c029 with SMTP id qe2-20020a17090b4f8200b001f0095dc029mr2480358pjb.66.1658278758841; Tue, 19 Jul 2022 17:59:18 -0700 (PDT) MIME-Version: 1.0 References: <1652866528-13220-1-git-send-email-hongxing.zhu@nxp.com> <1652866528-13220-2-git-send-email-hongxing.zhu@nxp.com> In-Reply-To: <1652866528-13220-2-git-send-email-hongxing.zhu@nxp.com> From: Tim Harvey Date: Tue, 19 Jul 2022 17:59:07 -0700 Message-ID: Subject: Re: [RFC 2/2] PCI: imx6: Support more than Gen2 speed link mode To: Richard Zhu Cc: Lucas Stach , "bhelgaas@google.com" , Lorenzo Pieralisi , Fabio Estevam , linux-pci@vger.kernel.org, Linux ARM Mailing List , open list , Sascha Hauer , NXP Linux Team Content-Type: text/plain; charset="UTF-8" X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,RCVD_IN_DNSWL_NONE,SPF_HELO_NONE,SPF_PASS autolearn=ham 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 On Wed, May 18, 2022 at 2:49 AM Richard Zhu wrote: > > Support more than Gen2 speed link mode, since i.MX8MP PCIe supports up > to Gen3 link speed. > > Signed-off-by: Richard Zhu > --- > drivers/pci/controller/dwc/pci-imx6.c | 4 ++-- > 1 file changed, 2 insertions(+), 2 deletions(-) > > diff --git a/drivers/pci/controller/dwc/pci-imx6.c b/drivers/pci/controller/dwc/pci-imx6.c > index 30641d2dda14..37012f9a33a0 100644 > --- a/drivers/pci/controller/dwc/pci-imx6.c > +++ b/drivers/pci/controller/dwc/pci-imx6.c > @@ -809,8 +809,8 @@ static int imx6_pcie_start_link(struct dw_pcie *pci) > > dw_pcie_wait_for_link(pci); > > - if (pci->link_gen == 2) { > - /* Allow Gen2 mode after the link is up. */ > + if (pci->link_gen > 1) { > + /* Allow faster modes after the link is up. */ > dw_pcie_dbi_ro_wr_en(pci); > tmp = dw_pcie_readl_dbi(pci, offset + PCI_EXP_LNKCAP); > tmp &= ~PCI_EXP_LNKCAP_SLS; > -- Richard, I noticed that your imx8mp pcie series [1] will force the imx8mp to link only at gen1 speeds unless support like the above is added. I believe you would also need the following: - tmp |= PCI_EXP_LNKCAP_SLS_5_0GB; + tmp |= pci->link_gen; When I used this along with your imx8mp series however I only get a gen1 link. Have you made any progress on a v3 of your imx8mp series? Do you know if the downstream NXP vendor kernel [2] supports imx8mp Gen3 links? Best Regards, Tim [1] https://patchwork.kernel.org/project/linux-pci/list/?series=620887&state=* [2] https://source.codeaurora.org/external/imx/linux-imx/