Received: by 2002:a05:7412:98c1:b0:fa:551:50a7 with SMTP id kc1csp965225rdb; Sat, 6 Jan 2024 19:15:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IHxYv4bdiQu08fFdVfuUmrCBnEo09rZNEZnA4vVpT+qrvQ3/59mbJJiCyzhuL7z8JXbYexR X-Received: by 2002:a05:620a:1a94:b0:783:19e9:2892 with SMTP id bl20-20020a05620a1a9400b0078319e92892mr1002067qkb.146.1704597325100; Sat, 06 Jan 2024 19:15:25 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1704597325; cv=none; d=google.com; s=arc-20160816; b=S+DpVJVm5IGpm31ZKyYEbl6QwD7wRFu2bvrVpxjk3k0MyMWtJIHo7tPn21Rej7avft xHZcn8fwNdi36CDZbfq/+K5LaOiPDup58TbjsN4abPMkpkpT6b6U1O2qlvCkbBhrJp7z 5AoyCHAl6036rclJRvftLLC9kwLkma3IiI9SptsyITCgvBjz3xlmR4fgb+bNdbh7O9Yp nxg8GfKIIfsvGCnR4C0jRn63Ehpk/LtNGpkK6Km4zl/436c7TceUecY3tmzgWtDyUy2b 1rsGm6Uzipa35hBBtLSRgUPn5beaDKkCRDCmkNwlqaZf0p85P+5gvdzNgU0Pqd4Eux9E XZfg== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:list-unsubscribe:list-subscribe:list-id:precedence :references:message-id:subject:cc:to:from:date:dkim-signature; bh=aTSKHlVmMubC5kEPp4TOeWLAyI0E8w+0FU0X7VBdSK8=; fh=iWBv4He8s+xpzrJY93iuua2RS8H3PW0G6YXgJrUCrjQ=; b=0ok/jzG+xAmRsGQib4qyAGXKXmUcB3wovZQa4/JZew6a6pI16CAfoppk7wCyQflv3Z K2ZnmSK5U+LsQl7o1wntun2DJPM8H6WGvizGbRUNw9DSrsieE+DZk/BBgzjx8GcQvvQK 3RfJvjOV8XfvJVK4PEbZlP2OMeK5UQvXAOBn+MYZyqjRGMfU+yuzu0ENYcp1pk9QLraK 5qT6ZLP90DTTELG8KNtwTeG8B2I32pcrZ92KsNuhIduowXjkz+DTgSQND6uaxFNfdzAU GHrS0YfX5VqzfyClt1/cmMt9HfP5uCIwBHBJu9gEFVc2haTjuMbkDOc5cLy2SV2rjtAq CTXg== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zt3wDGPk; spf=pass (google.com: domain of linux-kernel+bounces-18770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.org Return-Path: Received: from ny.mirrors.kernel.org (ny.mirrors.kernel.org. [147.75.199.223]) by mx.google.com with ESMTPS id m15-20020a05620a290f00b007830aee2f74si4541908qkp.66.2024.01.06.19.15.24 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 19:15:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-18770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) client-ip=147.75.199.223; Authentication-Results: mx.google.com; dkim=pass header.i=@linaro.org header.s=google header.b=Zt3wDGPk; spf=pass (google.com: domain of linux-kernel+bounces-18770-linux.lists.archive=gmail.com@vger.kernel.org designates 147.75.199.223 as permitted sender) smtp.mailfrom="linux-kernel+bounces-18770-linux.lists.archive=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=linaro.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 C38E51C20DF7 for ; Sun, 7 Jan 2024 03:15:24 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id E1E34111A8; Sun, 7 Jan 2024 03:15:17 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=linaro.org header.i=@linaro.org header.b="Zt3wDGPk" X-Original-To: linux-kernel@vger.kernel.org Received: from mail-oo1-f51.google.com (mail-oo1-f51.google.com [209.85.161.51]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id 334A91118E for ; Sun, 7 Jan 2024 03:15:15 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=linaro.org Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=linaro.org Received: by mail-oo1-f51.google.com with SMTP id 006d021491bc7-596175c0be0so615740eaf.3 for ; Sat, 06 Jan 2024 19:15:15 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=linaro.org; s=google; t=1704597314; x=1705202114; darn=vger.kernel.org; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date:from:to :cc:subject:date:message-id:reply-to; bh=aTSKHlVmMubC5kEPp4TOeWLAyI0E8w+0FU0X7VBdSK8=; b=Zt3wDGPkGtyQnLvEteR7tTQK0Qe3rz/z6nv2rXagrpQCxdpnWb9k6/h7hPBTtIQdPq NYWHuMhd1Hz12UzqCEyN+Teh4BlmY61M1rntq7VsNbj4xzF9aw1Nm4xoPDfm9qR0Ysk+ 4WqDaumFPaszr/hObcl/udDPzgYm4g7ePz26mdL/u+T+NsGyGs0IXk6EBTtyvwY29neS TlmUwdZmfwATzJx6niVlrYeDikjYns/bv/ZkZry/iJlAvfqoeeF248rvsnjBMvapu2xQ Acg4kQhs3uUcq2fm7nuWinMB6Y7f8cz4HT3evtkxgV8kysuufGmKRsW3HiuacnzIJ4oh Ak6g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1704597314; x=1705202114; h=in-reply-to:content-transfer-encoding:content-disposition :mime-version:references:message-id:subject:cc:to:from:date :x-gm-message-state:from:to:cc:subject:date:message-id:reply-to; bh=aTSKHlVmMubC5kEPp4TOeWLAyI0E8w+0FU0X7VBdSK8=; b=DGmpsuZ8n8TulFSZ04Pe0bExtZvSeMJ/fSiFpgrGECL4ambLxZ7XQD/s98fY1JOw8M bolv8vGSINqa86AFmXwpA4J5v8+u5GcMJzuHpODA+VTq4WmFBrfQNWaD8vG+BH0pPeqe Yj83ElgFoudRv5Czk2tCMPbwBse2VNzh/PvE9gIHv2+5c6wt5z9sg/ZYCKyHYurcY2Qt WI+iShWMR6PDBP8aCDeH5wiZYRRxHackX1LYhDstBCzrlwL0avkQS0AfXExMgDyc6WGT N1LeMx9nLrKnQrqPqcw0GL4skroIWSuaM16Sv9JMPD+vGckVlPc2+cKuDS90FqA55lC9 SKUw== X-Gm-Message-State: AOJu0Yw+coeiYvspZqyFFbGkNqoAdPtE8uWshrgl0aFTbSp92XLlWpQU nwCAjfuNrKbAHV7pa4AEPYdL921QtNSc X-Received: by 2002:a05:6358:7f1d:b0:175:b87:1a3c with SMTP id p29-20020a0563587f1d00b001750b871a3cmr1985625rwn.6.1704597314161; Sat, 06 Jan 2024 19:15:14 -0800 (PST) Received: from thinkpad ([103.197.115.97]) by smtp.gmail.com with ESMTPSA id t22-20020a1709028c9600b001d4b685f82fsm3716601plo.165.2024.01.06.19.15.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Sat, 06 Jan 2024 19:15:13 -0800 (PST) Date: Sun, 7 Jan 2024 08:45:06 +0530 From: Manivannan Sadhasivam To: Frank Li Cc: 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, robh@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: <20240107031506.GC3416@thinkpad> References: <20231227182727.1747435-1-Frank.Li@nxp.com> <20231227182727.1747435-5-Frank.Li@nxp.com> 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=utf-8 Content-Disposition: inline Content-Transfer-Encoding: 8bit In-Reply-To: <20231227182727.1747435-5-Frank.Li@nxp.com> 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. But you can make it so for all SoCs. This way, the drivers can also rely on it. Now, you should get rid of the commit message about driver internals: > 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. > - Mani > + then: > + required: > + - linux,pci-domain > + > additionalProperties: true > > ... > -- > 2.34.1 > -- மணிவண்ணன் சதாசிவம்