Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp391153pxm; Fri, 25 Feb 2022 09:59:26 -0800 (PST) X-Google-Smtp-Source: ABdhPJws91Q+DXeyQg2NYpYYUH7EwrtLErkFimayoL5UIsvwibJmkwmiXwM6bHm7Nv+luzmrUATF X-Received: by 2002:a17:906:564d:b0:6cf:54ec:72ca with SMTP id v13-20020a170906564d00b006cf54ec72camr6924983ejr.110.1645811965956; Fri, 25 Feb 2022 09:59:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645811965; cv=none; d=google.com; s=arc-20160816; b=Yud9UoX4ojx4RgLEa1YVsSUqTTfKYDTFCiJqAlG1w5s8Uq3XVjS537Zhd6kpyylxty WzvcRUZKsZPjZMlIJGbOArGbDb9k9D2DkLN2uFlBxcLb2RwNzHxGgW+ONrdbw+cQ1Y77 zfM/W0qyN+q0eHE+9kpWtQLSdd7U4mnn0JB1DOjNk5kXzq64iK957MuDmm0e2tk5XAz0 Tzl+ZTbnXAubSlhJ7mXjgXjHuFpLtJpkXa61sKASBZqVr+GrN8AKRh+xJ2cBJTKRvmeN GnOZA0ekVrRzmRGaqxdvETL+LQBAQOF20G2IBE6PFa6UN5H3tbKYtRZ7hWkmEgc0V/4v xXOQ== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-transfer-encoding :content-disposition:mime-version:message-id:subject:cc:to:from:date :dkim-signature; bh=8AROe/XdjKu5z+aUEAJTNPGdFT1Z7OBcaehr53cgCzQ=; b=eIjdMOkenjQpNgBrg5h86TsdO8UgypFgV5Y7JLzorSR3t3AdZRdWsQFbxvBuYS3Kp7 rg9VitzU+QLJYu3ISmxo1p/+zTWcUf+sR1O3IMnK+toj0Z2KkUVW2meWUBTUtSy6cbVg q7ZTSkm48wgTxc7lMdiBiAJ4GJ1f9f6MQFDg5/IouUdQUc8oPGniN/+X49GF6fAJucgj RzIi663S8oGSgiX6tfaD0DkHdzSsTkSLC3q8Bwq99HXNeoqPl42pNZacSPuRwlKeZetN KtqZyXPAbqfZOGy5dSElmgr4TeNt0ZBCUEZHszxuR4/90oGiGixCeyD0/VLeorzK6G6+ vadA== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=b3b2jd4o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id h25-20020a17090619d900b006b7326e5692si1752343ejd.435.2022.02.25.09.59.03; Fri, 25 Feb 2022 09:59:25 -0800 (PST) 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=@kernel.org header.s=k20201202 header.b=b3b2jd4o; 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; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S243513AbiBYRND (ORCPT + 99 others); Fri, 25 Feb 2022 12:13:03 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:50098 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S243528AbiBYRM4 (ORCPT ); Fri, 25 Feb 2022 12:12:56 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [IPv6:2604:1380:4641:c500::1]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 71CC7200; Fri, 25 Feb 2022 09:12:23 -0800 (PST) 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 dfw.source.kernel.org (Postfix) with ESMTPS id 1747361D68; 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-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220225125810.7mbo7firer5yodls@pali> X-Spam-Status: No, score=-7.1 required=5.0 tests=BAYES_00,DKIMWL_WL_HIGH, DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_HI, SPF_HELO_NONE,SPF_PASS,T_SCC_BODY_TEXT_LINE 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 Fri, Feb 25, 2022 at 01:58:10PM +0100, Pali Roh?r wrote: > On Thursday 24 February 2022 18:02:26 Bjorn Helgaas wrote: > > On Tue, Feb 22, 2022 at 04:50:22PM +0100, Pali Roh?r wrote: > > > Controller driver needs to correctly configure PCIe link if it contains 1 > > > or 4 SerDes PCIe lanes. Therefore add a new 'num-lanes' DT property for > > > mvebu PCIe controller. Property 'num-lanes' seems to be de-facto standard > > > way how number of lanes is specified in other PCIe controllers. > > > > > > Signed-off-by: Pali Roh?r > > > 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/Documentation/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 not > > > specified will default to 100ms, as required by the PCIe specification. > > > @@ -141,6 +142,7 @@ pcie-controller { > > > interrupt-map = <0 0 0 0 &mpic 58>; > > > marvell,pcie-port = <0>; > > > marvell,pcie-lane = <0>; > > > + num-lanes = <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 = true" when "num-lanes = <4>", and in all > > other cases it defaults to a Max Link Width of 1: > > > > lnkcap |= (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 = <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