From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id D6654C433F5 for ; Fri, 25 Feb 2022 17:13:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:In-Reply-To:MIME-Version:Message-ID: Subject:Cc:To:From:Date:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:References: List-Owner; bh=uZBz0O0zkbhRn1wEnvqViw5AQLFu2x4Q7O6H6p73XDw=; b=wPuFoex2cDzmoe 2iDo7wy+vfsH4MvDQL4iwXrbyRrQgHeHJ0G/2gIaN53YPIhooZKQ5oylcQfyrOKrZATMqMadz3ixD XDSeeDUcfJUrueb3eEgTwUUdPJBVyn523OjtyfCi4UZypavPpX08elNeJzicLyf531yNNX3t1cnIU Yd6VObOefwGr/tcmC8tWkEz8rDVk8d628ZN/Qcwq0CIyLagRsap86ywxvkX+VkvYnXNN9bdjUHjnO 6iokNAywDDn6G9mpXswzefgaNesVs958KBDxeHXZxLe8vSOQ6zASMbu22YqXFKyxWNNprvYGDH0FH IOLejNskhHDKrTCjaRhQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNe97-006ABT-RW; Fri, 25 Feb 2022 17:12:46 +0000 Received: from ams.source.kernel.org ([145.40.68.75]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1nNe8n-006A6I-JJ for linux-arm-kernel@lists.infradead.org; Fri, 25 Feb 2022 17:12:27 +0000 Received: from smtp.kernel.org (relay.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ams.source.kernel.org (Postfix) with ESMTPS id CEDB8B832BC; Fri, 25 Feb 2022 17:12:23 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 4EA6CC340E7; Fri, 25 Feb 2022 17:12:22 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645809142; bh=ejCLtxHIwdP5I6GuifJpd0rm+KBBzgMUin9/wtmWpW0=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=b3b2jd4oWSeQ+rmqWfg4ZV6td3mx12YyQMgep4RmTiOBoVONjeEX5U8YQ9g/n/QKW h2WqBplWsQQZHM9HOEN6F21Dq0zsBW2s+1VnCHqNAtzju73YYEJXI3JBKnnQQhwEMq 6tlHnSX4ceYk4KdQ3DB+sMzLfIezI0cAdpk3urPWlsqUCIO+r/cwuOlashDqv0sKu6 TF6PRa5L/efAJSYp1w0EI8FUOU7wkf938oqQB3SLlOP7lIaDvYr0IxBE4L8J901l1e Qw7xMQgHJV+WK312VqGP+o6jZssk2ABNDMSrK2yUueQNP/QdSdbNL+y5IIit23K6ZE Wm7SUbjcogrvw== Date: Fri, 25 Feb 2022 11:12:20 -0600 From: Bjorn Helgaas To: Pali =?iso-8859-1?Q?Roh=E1r?= Cc: Lorenzo Pieralisi , Bjorn Helgaas , Rob Herring , Thomas Petazzoni , Krzysztof =?utf-8?Q?Wilczy=C5=84ski?= , Marek =?iso-8859-1?Q?Beh=FAn?= , Russell King , linux-pci@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@lists.infradead.org Subject: Re: [PATCH v4 04/12] dt-bindings: PCI: mvebu: Add num-lanes property Message-ID: <20220225171220.GA364705@bhelgaas> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20220225125810.7mbo7firer5yodls@pali> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20220225_091226_034386_48AC5DF3 X-CRM114-Status: GOOD ( 34.65 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: quoted-printable Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org On Fri, Feb 25, 2022 at 01:58:10PM +0100, Pali Roh=E1r wrote: > On Thursday 24 February 2022 18:02:26 Bjorn Helgaas wrote: > > On Tue, Feb 22, 2022 at 04:50:22PM +0100, Pali Roh=E1r wrote: > > > Controller driver needs to correctly configure PCIe link if it contai= ns 1 > > > or 4 SerDes PCIe lanes. Therefore add a new 'num-lanes' DT property f= or > > > mvebu PCIe controller. Property 'num-lanes' seems to be de-facto stan= dard > > > way how number of lanes is specified in other PCIe controllers. > > > = > > > Signed-off-by: Pali Roh=E1r > > > Acked-by: Rob Herring > > > --- > > > Documentation/devicetree/bindings/pci/mvebu-pci.txt | 11 +++++++++++ > > > 1 file changed, 11 insertions(+) > > > = > > > diff --git a/Documentation/devicetree/bindings/pci/mvebu-pci.txt b/Do= cumentation/devicetree/bindings/pci/mvebu-pci.txt > > > index 6173af6885f8..24225852bce0 100644 > > > --- a/Documentation/devicetree/bindings/pci/mvebu-pci.txt > > > +++ b/Documentation/devicetree/bindings/pci/mvebu-pci.txt > > > @@ -77,6 +77,7 @@ and the following optional properties: > > > - marvell,pcie-lane: the physical PCIe lane number, for ports having > > > multiple lanes. If this property is not found, we assume that the > > > value is 0. > > > +- num-lanes: number of SerDes PCIe lanes for this link (1 or 4) > > > - reset-gpios: optional GPIO to PERST# > > > - reset-delay-us: delay in us to wait after reset de-assertion, if n= ot > > > specified will default to 100ms, as required by the PCIe specifica= tion. > > > @@ -141,6 +142,7 @@ pcie-controller { > > > interrupt-map =3D <0 0 0 0 &mpic 58>; > > > marvell,pcie-port =3D <0>; > > > marvell,pcie-lane =3D <0>; > > > + num-lanes =3D <1>; > > = > > Is this patch really necessary? > = > This is just documentation patch. And I think that documentation is > always important. > = > > AFAICS, the related driver change > > only sets "port->is_x4 =3D true" when "num-lanes =3D <4>", and in all > > other cases it defaults to a Max Link Width of 1: > > = > > lnkcap |=3D (port->is_x4 ? 4 : 1) << 4; > = > Yes! > = > And this registers configures number of lanes in HW. > = > > I don't see the point of adding a value that we don't validate or do > > anything with. E.g., I don't see an error message that would catch > > "num-lanes =3D <3>". > > = > > Bjorn > = > In past I was told that kernel should not do validation of DT properties > and it is job of some DT schema validation. That is why I did not added > code into kernel which show error message when value different than 1 > and 4 is specified in DT. > = > But issue here is that there is no DT schema for pci-mvebu as above > .txt file was not converted to YAML schema yet. This is something which > should be improved... I'm OK with this patch as-is, especially since Rob acked it. Bjorn _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel