Received: by 2002:a25:8b12:0:0:0:0:0 with SMTP id i18csp3113334ybl; Mon, 19 Aug 2019 12:25:51 -0700 (PDT) X-Google-Smtp-Source: APXvYqyG+Src6HoPwRkp8+52UvARmYZaxTL0SPZ2r0dNbvsHtUXjeksOEHYg1ezSiNIZfKJZpTSz X-Received: by 2002:a65:4507:: with SMTP id n7mr20631255pgq.86.1566242750975; Mon, 19 Aug 2019 12:25:50 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1566242750; cv=none; d=google.com; s=arc-20160816; b=oFRYQBOwKjv/ssnBvg7e94o/d75zhPe65G6syuKcdbF48S6pkD01vEx2wCxdTdi+wJ xAkszl6DuL5KBkqN6Z3TWAKhn5bsmDWGoKEfeb5pD2kSxSpR9RZT2z9cdkmvX0bA/p2z c4UHVyOMoY6VuMiVh3KHH1f1xtFIY2VIT6MNex5CkVBa8C/HGDU1dWuJ3hd8IIeT0vaf /S5dzQZkIuGCbHX5SM1rKk1C+r4XwBVLE+PaYF4TCI3FeLI6SQoYMb2KCdtcsknkK5BF +hJX0/5Z1goxWaAErSw7+0fk0X/Mv49BkgmlcunGMEOsyv+8rzdxfbxebn0e+S0v+Rh6 MwCg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:user-agent:in-reply-to :content-disposition:mime-version:references:message-id:subject:cc :to:from:date:dkim-signature; bh=paL+QZoAds/xskieVXVwMlHhDIlYhnwkGM+TFo2yoAE=; b=YqL9yQzimC+8/+wK03IiiXdmT1tz3TnmmCoz5Mo+VEG7m4OhiBrBnPBBBQ7NUCrmsk 0RJ6ZJ/FRgbMRV6T5qPeA/Nd75QvPFaKIpedP0UCkc9zaw9ngEXQjC515wwce6kt2Edh ea4KDr2O+gV99fPA+p158B0dXXjcRCUwQGFHa3NeeaeDkRPEvFCkvT5KxSzFP+ij98EK /Qf1cRiCwpGsYNwMziMjBMa5XGoOPXYwRw6KVwpHfWaJ95obtoTJU5edHcSyhjcNpb25 WBY9zyjKXQn6zCcpVtbNM6HugazUy0o5TUzX4uS6sDi0lrR1NL5I2CHROtCXTCDcK7ct Z+WQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f4SO6OUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id g8si9420739pjv.24.2019.08.19.12.25.35; Mon, 19 Aug 2019 12:25:50 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=default header.b=f4SO6OUP; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1728407AbfHSTYn (ORCPT + 99 others); Mon, 19 Aug 2019 15:24:43 -0400 Received: from mail.kernel.org ([198.145.29.99]:40728 "EHLO mail.kernel.org" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1728315AbfHSTYn (ORCPT ); Mon, 19 Aug 2019 15:24:43 -0400 Received: from localhost (unknown [69.71.4.100]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPSA id 09FF1206C1; Mon, 19 Aug 2019 19:24:41 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=default; t=1566242682; bh=AP7Vdzra3NcppB0agbt0hGNputzUIfBO2Q8KFiwaX2Q=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=f4SO6OUPDs3akkK6X0jKRt3/uQXiwFsXxa+QmJFy+HqxrMbrbXzZCGeiE187Fjc+Z u7QhIt5LWmeR8hfrNg28WBiPEh6LJQjvi51U2/H5U+q03iWVOIINDqtXaL/7StXi6h Z8ieypqUVtUvhZW20m3AoFVdqdgsUPEKRtFA3CdQ= Date: Mon, 19 Aug 2019 14:24:40 -0500 From: Bjorn Helgaas To: "Z.q. Hou" Cc: "linux-pci@vger.kernel.org" , "devicetree@vger.kernel.org" , "linux-kernel@vger.kernel.org" , "gustavo.pimentel@synopsys.com" , "jingoohan1@gmail.com" , "robh+dt@kernel.org" , "mark.rutland@arm.com" , "shawnguo@kernel.org" , Leo Li , "lorenzo.pieralisi@arm.com" , "M.h. Lian" Subject: Re: [PATCH 3/4] ARM: dts: ls1021a: Remove num-lanes property from PCIe nodes Message-ID: <20190819192440.GT253360@google.com> References: <20190812042435.25102-1-Zhiqiang.Hou@nxp.com> <20190812042435.25102-4-Zhiqiang.Hou@nxp.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20190812042435.25102-4-Zhiqiang.Hou@nxp.com> User-Agent: Mutt/1.10.1 (2018-07-13) Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org On Mon, Aug 12, 2019 at 04:22:27AM +0000, Z.q. Hou wrote: > From: Hou Zhiqiang > > On FSL Layerscape SoCs, the number of lanes assigned to PCIe > controller is not fixed, it is determined by the selected > SerDes protocol in the RCW (Reset Configuration Word), and > the PCIe link training is completed automatically base on > the selected SerDes protocol, and the link width set-up is > updated by hardware. So the num-lanes is not needed to > specify the link width. > > The current num-lanes indicates the max lanes PCIe controller > can support up to, instead of the lanes assigned to the PCIe > controller. This can result in PCIe link training fail after > hot-reset. So remove the num-lanes to avoid set-up to incorrect > link width. It would be useful to explain *why* "num-lanes" in DT causes a link training failure. Maybe the code programs "num-lanes" somewhere, overriding what hardware automatically sensed? Maybe the code tries to bring up exactly "num-lanes" lanes even if not all are present? > Signed-off-by: Hou Zhiqiang > --- > arch/arm/boot/dts/ls1021a.dtsi | 2 -- > 1 file changed, 2 deletions(-) > > diff --git a/arch/arm/boot/dts/ls1021a.dtsi b/arch/arm/boot/dts/ls1021a.dtsi > index 464df4290ffc..2f6977ada447 100644 > --- a/arch/arm/boot/dts/ls1021a.dtsi > +++ b/arch/arm/boot/dts/ls1021a.dtsi > @@ -874,7 +874,6 @@ > #address-cells = <3>; > #size-cells = <2>; > device_type = "pci"; > - num-lanes = <4>; > num-viewport = <6>; > bus-range = <0x0 0xff>; > ranges = <0x81000000 0x0 0x00000000 0x40 0x00010000 0x0 0x00010000 /* downstream I/O */ > @@ -899,7 +898,6 @@ > #address-cells = <3>; > #size-cells = <2>; > device_type = "pci"; > - num-lanes = <4>; > num-viewport = <6>; > bus-range = <0x0 0xff>; > ranges = <0x81000000 0x0 0x00000000 0x48 0x00010000 0x0 0x00010000 /* downstream I/O */ > -- > 2.17.1 >