Received: by 2002:a05:7412:e794:b0:fa:551:50a7 with SMTP id o20csp97700rdd; Mon, 8 Jan 2024 19:50:02 -0800 (PST) X-Google-Smtp-Source: AGHT+IF3XGuf1btGyyo1x9fpb+SnIjXF7PtxxtV9BJZ8mI1QWXfuGgYWbIkM5ftCyLuQr2bTwExu X-Received: by 2002:a05:6214:1c8c:b0:681:a05:cb6d with SMTP id ib12-20020a0562141c8c00b006810a05cb6dmr2437767qvb.92.1704772202253; Mon, 08 Jan 2024 19:50:02 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704772202; cv=none; d=google.com; s=arc-20160816; b=OwmHNuGA9uC2c8abDORcpGW5/wWLg5xIyyZpElU5YMYNKUpM9T1zP/sWDypBU0InCE kf32/nY2GHZwM038LhRvxnU8PZzXIQmNYPP8dR3xuWn/gq60nFJKpvpkN2GANDy8c7O1 t4JiRsYoyARvsAfHPjk6aph7iN/RSd6Nhd2eg8hnP7irISSQVE0SAq4t67YPW62tj0VU R/pe5m9Jq1KAQ3+2HjoLQwZH3qK/T32Je+834TNfJLP7mpfV2uAlEYzmSKyTxh5QUSVR vp/oZw+WJQCfwElL/ZYZbCqHmuSUxxNAIWFafCyyQ5dbY1iPFsNGFMNd0mw3iyFHgEKd /8rw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-disposition:mime-version:list-unsubscribe :list-subscribe:list-id:precedence:references:message-id:subject:cc :to:from:date:dkim-signature; bh=XTmubs7I8F6oLLLqrw7NFJOps5Rn+fZ6A7usXriulwk=; fh=MvO82v8k2bbmgCHXL6+exbljPIqmFLuL/SOLGdpMT68=; b=zbDTA1SJRjBuYUxlWD5VVkez7m2cBcoSjcm7tvMLQUYKSpDWd41FZ1ZsnbQoQJPxUs HidaLHtFZKQUqqz5haW7niY69SDfRwXdSakUeCvhwfAsZQrfZRU6sk3gYcrA5EBPVUgA IwEo8Sp4N8GTj8b/75q8cTcF8yi4VtkgA77/H+PJrzVrHayV31H4WpKQiXFqZ1Nvoo4Y Q32fB+uufpIZ3vSNfcs5Y1aGQhUvD05h0YTdT9hiiISM+2Cl6i74kFvZPsUFYK5w/tFm PGRxHL9TwUMbIGe8y3upBZxTrbZRODZxnYdCPCLfzIp8Uc8Cm90Tey8x0A2UPihs0b1w rXQw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p5oQ67HL; spf=pass (google.com: domain of linux-kernel+bounces-20344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [2604:1380:45d1:ec00::1]) by mx.google.com with ESMTPS id k6-20020a0cf586000000b0067abd18c974si1381042qvm.325.2024.01.08.19.50.02 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 08 Jan 2024 19:50:02 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-20344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) client-ip=2604:1380:45d1:ec00::1; Authentication-Results: mx.google.com; dkim=pass header.i=@kernel.org header.s=k20201202 header.b=p5oQ67HL; spf=pass (google.com: domain of linux-kernel+bounces-20344-linux.lists.archive=gmail.com@vger.kernel.org designates 2604:1380:45d1:ec00::1 as permitted sender) smtp.mailfrom="linux-kernel+bounces-20344-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: from smtp.subspace.kernel.org (wormhole.subspace.kernel.org [52.25.139.140]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by ny.mirrors.kernel.org (Postfix) with ESMTPS id 7D9B71C23494 for ; Tue, 9 Jan 2024 03:49:58 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id 14CAD5686; Tue, 9 Jan 2024 03:49:38 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=kernel.org header.i=@kernel.org header.b="p5oQ67HL" Received: from smtp.kernel.org (aws-us-west-2-korg-mail-1.web.codeaurora.org [10.30.226.201]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 36C054418; Tue, 9 Jan 2024 03:49:36 +0000 (UTC) Received: by smtp.kernel.org (Postfix) with ESMTPSA id 9E683C433C7; Tue, 9 Jan 2024 03:49:35 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=kernel.org; s=k20201202; t=1704772176; bh=E7n3TsSbDbPjksIo7Blfyj5PMO2YbKS3wrQ5fGz2R58=; h=Date:From:To:Cc:Subject:References:In-Reply-To:From; b=p5oQ67HLaZNAn2pkjhJthcuHCjkORdRQi6bEPqRrA1Qcq2RAIj57r33jmI6jQZSDW exuoE4K/MQxFN+ICDKaMa8DkSQWHfbaDIXio7RvHToQy53SFbDOhBQ16bBA/Hg43Hj lkr6+xAh8ws7o4/N7h2yUodZsQRcjdknnNJDVB1SdDgelKp9sGi2MesaiFn/dOFO6g lnQ1uzFrLiwIlPOT8MEeVZWTWG9QZX/XJknxrvgXdd3nZm6b0eblDTYmRu2HSXl0ZJ ZBgxvVgg65tnpc2j0F3k6JZ8/kFvZhKulGuGNZk1gz2uCURttiTJc2aCEttkKpSl6N AxQbY3dGHGtjg== Received: (nullmailer pid 2606875 invoked by uid 1000); Tue, 09 Jan 2024 03:49:34 -0000 Date: Mon, 8 Jan 2024 20:49:34 -0700 From: Rob Herring To: Manivannan Sadhasivam Cc: Frank Li , krzysztof.kozlowski@linaro.org, bhelgaas@google.com, conor+dt@kernel.org, devicetree@vger.kernel.org, festevam@gmail.com, helgaas@kernel.org, hongxing.zhu@nxp.com, imx@lists.linux.dev, kernel@pengutronix.de, krzysztof.kozlowski+dt@linaro.org, kw@linux.com, l.stach@pengutronix.de, linux-arm-kernel@lists.infradead.org, linux-imx@nxp.com, linux-kernel@vger.kernel.org, linux-pci@vger.kernel.org, lpieralisi@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: Re: [PATCH v7 04/16] dt-bindings: imx6q-pcie: Add linux,pci-domain as required for iMX8MQ Message-ID: <20240109034934.GA2602612-robh@kernel.org> References: <20231227182727.1747435-1-Frank.Li@nxp.com> <20231227182727.1747435-5-Frank.Li@nxp.com> <20240107031506.GC3416@thinkpad> <20240107051917.GG3416@thinkpad> <20240107062911.GP3416@thinkpad> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20240107062911.GP3416@thinkpad> On Sun, Jan 07, 2024 at 11:59:11AM +0530, Manivannan Sadhasivam wrote: > On Sun, Jan 07, 2024 at 12:38:10AM -0500, Frank Li wrote: > > On Sun, Jan 07, 2024 at 10:49:17AM +0530, Manivannan Sadhasivam wrote: > > > On Sat, Jan 06, 2024 at 11:47:36PM -0500, Frank Li wrote: > > > > On Sun, Jan 07, 2024 at 08:45:06AM +0530, Manivannan Sadhasivam wrote: > > > > > On Wed, Dec 27, 2023 at 01:27:15PM -0500, Frank Li wrote: > > > > > > iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required > > > > > > proptery for iMX8MQ to indicate pci controller index. > > > > > > > > > > > > > > > > property > > > > > > > > > > > This adjustment paves the way for eliminating the hardcoded check on the > > > > > > base register for acquiring the controller_id. > > > > > > > > > > > > ... > > > > > > if (dbi_base->start == IMX8MQ_PCIE2_BASE_ADDR) > > > > > > imx6_pcie->controller_id = 1; > > > > > > ... > > > > > > > > > > > > The controller_id is crucial and utilized for certain register bit > > > > > > positions. It must align precisely with the controller index in the SoC. > > > > > > An auto-incremented ID don't fit this case. The DTS or fuse configurations > > > > > > may deactivate specific PCI controllers. > > > > > > > > > > > > > > > > You cannot change the binding for the sake of driver. But you can make this > > > > > change in other way. See below... > > > > > > > > > > > Signed-off-by: Frank Li > > > > > > --- > > > > > > > > > > > > Notes: > > > > > > Change from v5 to v6 > > > > > > - rework commit message to explain why need required and why auto increase > > > > > > id not work > > > > > > > > > > > > Change from v4 to v5 > > > > > > - new patch at v5 > > > > > > > > > > > > .../bindings/pci/fsl,imx6q-pcie-common.yaml | 11 +++++++++++ > > > > > > 1 file changed, 11 insertions(+) > > > > > > > > > > > > diff --git a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml > > > > > > index d91b639ae7ae7..8f39b4e6e8491 100644 > > > > > > --- a/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml > > > > > > +++ b/Documentation/devicetree/bindings/pci/fsl,imx6q-pcie-common.yaml > > > > > > @@ -265,6 +265,17 @@ allOf: > > > > > > - const: apps > > > > > > - const: turnoff > > > > > > > > > > > > + - if: > > > > > > + properties: > > > > > > + compatible: > > > > > > + contains: > > > > > > + enum: > > > > > > + - fsl,imx8mq-pcie > > > > > > + - fsl,imx8mq-pcie-ep > > > > > > > > > > "linux,pci-domain" is a generic property. So you cannot make it required only > > > > > for certain SoCs. > > > > > > > > Sorry, why not? there are many generic property. > > > > > > > > > > It doesn't make sense to make it required only for specific SoCs since it is not > > > specific to any SoC. You can make it required for all. > > > > More than 2 controller need require "linux,pci-domain". > > > > But this property is applicable to single controller also. Not really. I don't understand the issue. Some SoCs have a dependency on the numbering and need the property. Others don't. They just want (but don't need) consistent numbering. Rob