Received: by 2002:a05:6a10:9afc:0:0:0:0 with SMTP id t28csp2092192pxm; Thu, 24 Feb 2022 16:16:36 -0800 (PST) X-Google-Smtp-Source: ABdhPJzN2hdbl41e49V8j9jD+bU/CMx5wqjZOmZSo4RBhqABTv62Hpss/8Px/c8i7kCCu8BhH+oP X-Received: by 2002:a17:907:9208:b0:6cf:cd92:c1e7 with SMTP id ka8-20020a170907920800b006cfcd92c1e7mr4331680ejb.282.1645748196447; Thu, 24 Feb 2022 16:16:36 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1645748196; cv=none; d=google.com; s=arc-20160816; b=NmKhzPLwN46ViRwsAmFvHbRHJcuYT9ZlfshTv8mJxVMeqBVGHD4jZMmQllUMIZYfcZ GvpZNf0Iqhxmq04e03u59iGn9pOu0ZjfwAUWGBy3ICxQjBJ5E3ls7TiNG5N2TwSNpCg2 zCKllbz+kBSu5kcwrxbp07OxxzSsx/XEPFltPZnWd0xHTeKJufox4fmEX61dhPZhSOE/ 72aDYMuY0JCAjlj9i288fl7Max52Lx6ZkV/HRBWAwXVkWnNO30kinIuzryEwZnI3jLaG sa4DpfTvRNKZZqJ8/CEn+BE7CPvrg2tlQsDujstxB0Ws+zwkVp+W9brldHmnfCc23f4c TiSw== 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=pTPkSghJBQKR2P9kMU8+FtNOs9m2R5hyPR05ABpEtc8=; b=o2q6OATMWdX2lUr7h/YpXFainnqouHn0TnMwOc+s6+UXkis4pLCXB8PW+UREJLlmMl PWrCp9IYbc/FB3YGl0+dROcvy/4KtoBEjuFoaN56kAEFbwHjMeCeEXJkfmLUe42KWIvP D8y4OWbmlDtBrIyKT2IsRV3SDI/I1MGiV8YQUUaxXcVy1OQBiRg0iYegnfp9QO5fQcfy ejSwL2SEqobpGhJSMfdCk05kxkKKSVnxfU4TsE6tdZjXr5W/PM4tH7Y1KfYKC7we55Eo g+BdW3uVLv3rLFx7cscOnrIRR3zeECI7W8gIvZDYvYb8G3ZOPFCe/pG6y3jEcKEbBzuG MavQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=FnBk0yBT; 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 w8-20020a170907270800b006b2155ababcsi464989ejk.974.2022.02.24.16.16.13; Thu, 24 Feb 2022 16:16:36 -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=FnBk0yBT; 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 S230394AbiBYADB (ORCPT + 99 others); Thu, 24 Feb 2022 19:03:01 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44438 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbiBYADA (ORCPT ); Thu, 24 Feb 2022 19:03:00 -0500 Received: from dfw.source.kernel.org (dfw.source.kernel.org [139.178.84.217]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 531B718F239; Thu, 24 Feb 2022 16:02:29 -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 C689361C5A; Fri, 25 Feb 2022 00:02:28 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id EEC0FC340E9; Fri, 25 Feb 2022 00:02:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1645747348; bh=B5C/irAy5Ksddk0oeAfWCNVXMjjzHhykOfXsUHlDfiU=; h=Date:From:To:Cc:Subject:In-Reply-To:From; b=FnBk0yBT8P4/HNhq/XNKvxXaoDFhHO5SqZmvwFrWWsqUJQw/kezs9NKd44trxe2ol dAD/Lef2N0wukNLou1M1AorFCxCh1Ck+CeuJyDXugG0qE4EMC/GNA98cpRN9PWi2Tu xNphdc525yVvjRdNZVda4zNu4ZpZg7osW6myVg1OjCalqiQI3nvgn3ScInTdNp2iJu ze0uT9v8Ux3rbKeCrE7WiwNDbuA4Hi5HksoggPw3TYjsU0SM4Pr9dpAMoqJ0VYipVM 4u/FLsn2RhgLPO8FTk3ZV4fXrwxRMLeoNmv2/V/k969Z8FiCv3TU4U9P/T09VOSZGo k6mQtILoRoVnQ== Date: Thu, 24 Feb 2022 18:02:26 -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: <20220225000226.GA304258@bhelgaas> MIME-Version: 1.0 Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20220222155030.988-5-pali@kernel.org> 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 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? 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; 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