Message ID | 20231227182727.1747435-5-Frank.Li@nxp.com |
---|---|
State | New |
Headers |
Return-Path: <linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org> Delivered-To: ouuuleilei@gmail.com Received: by 2002:a05:7301:6f82:b0:100:9c79:88ff with SMTP id tb2csp1599365dyb; Wed, 27 Dec 2023 10:29:25 -0800 (PST) X-Google-Smtp-Source: AGHT+IGqFmjgHYQwWcXyIHqQsVOSLnbzXzqwhAe/NbsPgdhJhcjL2np3MJJvtXsQyRGKPEmyxbG3 X-Received: by 2002:a17:906:535e:b0:a1f:8b53:df18 with SMTP id j30-20020a170906535e00b00a1f8b53df18mr3648657ejo.61.1703701765585; Wed, 27 Dec 2023 10:29:25 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1703701765; cv=pass; d=google.com; s=arc-20160816; b=aJTDqVdD6x6EICbq7rRRQRgXH6H444MqYTzxOmB2kkDKWVYzL5dk2oN4Jx/JAm+1nw JXlc/LPAwFa6gKLrVDq1EKDcoJVeoFGM4C/w9C6hFxmdjZxIh0Dg5sXcJmg4DdKR68Bx uEc+RBbaIycUGpyjwPTU1Ue42nDj+kjIterNmxYNbFnY+Ezxsh18TQJuhz1dRs7xVie2 RgcZ3A58OaUWZNaJVyusOzKy+0Dd0JgCeybGndn7Um/2bBKixy0g+hP3umf0NEPhP+SD 8zXGWqOfOdaCh6Hvskh/xxRHCum9oeF5fWVZcgC1cxeSzj53yNAzDXmh3iLXo3KSH1I6 X6PA== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=mime-version:list-unsubscribe:list-subscribe:list-id:precedence :content-transfer-encoding:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=8V3HsfUdOclisMP+T8AUHfCndho4vH6otdg0N0F0yqc=; fh=492Ek0Vpabbqz4y1lk9p/Id6JH5wlBXcD/z8VK8wbWM=; b=B5wDJVwBUmNtLjdt6w69sdHM1GyKd/nyDusoFCSDq1wg5/gtiT+Fm4asKMaB2wnZdK cwd7Fm87EbLdpWJWhnf7vzGwAGvceece7H903HtI7fB8CxTWtzJafNnACnfR9oN9UgOY DkER/Xwzz9I5hoIO3qZWGEonrANcrxqrijJr9A9Q0USx7IYlcl0qvrLH/gu85hQLmhv9 pN1KrcCfiaC7urFTZK53WnnxDIAFPRWGtOMyGaapByUWhTtvwP6Pm5Vbp7ph21hRVPdh c/7Wdlyuw2Cu2M1XMO7eEFwLqqtSmWOPoHy4AWJ8ulpNxtv/JhGrImwi5dLO2BszyHco Tjbw== ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CChl6rWY; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com Received: from am.mirrors.kernel.org (am.mirrors.kernel.org. [2604:1380:4601:e00::3]) by mx.google.com with ESMTPS id n15-20020a170906688f00b00a236475a606si6306966ejr.441.2023.12.27.10.29.25 for <ouuuleilei@gmail.com> (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 27 Dec 2023 10:29:25 -0800 (PST) Received-SPF: pass (google.com: domain of linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) client-ip=2604:1380:4601:e00::3; Authentication-Results: mx.google.com; dkim=pass header.i=@nxp.com header.s=selector2 header.b=CChl6rWY; arc=pass (i=1 spf=pass spfdomain=nxp.com dkim=pass dkdomain=nxp.com dmarc=pass fromdomain=nxp.com); spf=pass (google.com: domain of linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org designates 2604:1380:4601:e00::3 as permitted sender) smtp.mailfrom="linux-kernel+bounces-12200-ouuuleilei=gmail.com@vger.kernel.org"; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=nxp.com 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 am.mirrors.kernel.org (Postfix) with ESMTPS id 0FC6D1F22FF0 for <ouuuleilei@gmail.com>; Wed, 27 Dec 2023 18:29:25 +0000 (UTC) Received: from localhost.localdomain (localhost.localdomain [127.0.0.1]) by smtp.subspace.kernel.org (Postfix) with ESMTP id EAFDD47A55; Wed, 27 Dec 2023 18:28:18 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=nxp.com header.i=@nxp.com header.b="CChl6rWY" X-Original-To: linux-kernel@vger.kernel.org Received: from EUR04-HE1-obe.outbound.protection.outlook.com (mail-he1eur04on2085.outbound.protection.outlook.com [40.107.7.85]) (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 AFC12481C1; Wed, 27 Dec 2023 18:28:13 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=nxp.com ARC-Seal: i=1; a=rsa-sha256; s=arcselector9901; d=microsoft.com; cv=none; b=alNXx3VVpvUUx6ji/Kr/PCl4okzwfcnTyYkVshlt2lJjox6nOpEZ+H+mZusjVx5N9liAJt8P8eYUzFjI/sNlJcHq9A2cZXr8wnxeJ4G4SZNXLtN/klyBs4FUV9d3nAnBUKJZSDNx9VTgXFbyv96/af8NQc1qQ7tOwPZKs2U4fXxrFzvlRLMB3GMZBXCFzrHwbWnJULDy8A7KzJRcZG0DdpuUuka8pajN8o9h0a0Idtt0wWRHNj7Or/IhQ4R+UQACcJVy/HNcKOrJHWlzciyLIF0VxgMwjFgAyuAYS5WeA9zPEmHO1VSQquUgA4R5x7XDRvwrYJDp5PqFlRtxotnPCA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector9901; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-AntiSpam-MessageData-ChunkCount:X-MS-Exchange-AntiSpam-MessageData-0:X-MS-Exchange-AntiSpam-MessageData-1; bh=8V3HsfUdOclisMP+T8AUHfCndho4vH6otdg0N0F0yqc=; b=m5XfGjSuLYLq+2xcL3kvQACtAfdEWT/epmFiAo5sJlbNWehcXbybyaaEpxea8iu0w0zmygKwMMP/S3MAp5SFAh7bX1LoADcq1N3ohAVeiIjnA52Q33l42aXok+sLRwAx8r09X+32lCwjs5SU6kBQ2UCoJ071Qf15tRAV+ZYMFSFMw+vdYYGtFxdNMmkEn5oZ+4k9fMRzcJOcRyVDePwOCvz6N874eyUdwJ2uOw/os6LOFymIEplRS0WcBGh6hK9xsftuBk1OnrEx2t5IAsLRT390nD/ph9bTDTD6joV9ZlKCiJ17xXV8g844iEh6FQgGL8vvo4nTfXkKM4BWJZ04MQ== ARC-Authentication-Results: i=1; mx.microsoft.com 1; spf=pass smtp.mailfrom=nxp.com; dmarc=pass action=none header.from=nxp.com; dkim=pass header.d=nxp.com; arc=none DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=nxp.com; s=selector2; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=8V3HsfUdOclisMP+T8AUHfCndho4vH6otdg0N0F0yqc=; b=CChl6rWYme68bDkgcuNBSDMT/MFXYj8fXVbbQ3KSr+YZ1GhsbGKodEEex7fVz3Wbad/WCNuA44NuIxI9kBU0ulMfJyY/I1AFiXwTe2h9QvXGvG1XI3+ta1qEdKFRdfqJtgoYHamMJT3W+p2MHuk+ODYaZDYpQLkzgz34ihlkQ5k= Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) by DU2PR04MB9050.eurprd04.prod.outlook.com (2603:10a6:10:2e5::6) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7113.27; Wed, 27 Dec 2023 18:28:10 +0000 Received: from AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40]) by AM6PR04MB4838.eurprd04.prod.outlook.com ([fe80::95f5:5118:258f:ee40%7]) with mapi id 15.20.7113.027; Wed, 27 Dec 2023 18:28:10 +0000 From: Frank Li <Frank.Li@nxp.com> To: krzysztof.kozlowski@linaro.org Cc: Frank.Li@nxp.com, 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, manivannan.sadhasivam@linaro.org, robh@kernel.org, s.hauer@pengutronix.de, shawnguo@kernel.org Subject: [PATCH v7 04/16] dt-bindings: imx6q-pcie: Add linux,pci-domain as required for iMX8MQ Date: Wed, 27 Dec 2023 13:27:15 -0500 Message-Id: <20231227182727.1747435-5-Frank.Li@nxp.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20231227182727.1747435-1-Frank.Li@nxp.com> References: <20231227182727.1747435-1-Frank.Li@nxp.com> Content-Transfer-Encoding: 8bit Content-Type: text/plain X-ClientProxiedBy: SJ2PR07CA0018.namprd07.prod.outlook.com (2603:10b6:a03:505::22) To AM6PR04MB4838.eurprd04.prod.outlook.com (2603:10a6:20b:4::16) Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: <linux-kernel.vger.kernel.org> List-Subscribe: <mailto:linux-kernel+subscribe@vger.kernel.org> List-Unsubscribe: <mailto:linux-kernel+unsubscribe@vger.kernel.org> MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: AM6PR04MB4838:EE_|DU2PR04MB9050:EE_ X-MS-Office365-Filtering-Correlation-Id: 897c047d-ba04-4f56-d7e4-08dc07099477 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0; X-Microsoft-Antispam-Message-Info: HbRILfcstCUCGRdaiXE9MoFvzdaZskfs21b0Q8y5bWSjabtRnxBEOlekwMNhKxBuR1dQeGo5XXNdUIg1EzmeIpnVqCKdGPHk3tFFSf9BmMTVJLSaAYo8wRH+IXN/UmKxkz0QgJXOkSIs4/eCrV3U6FFdvH6SdL6ddrD1rv+O4e4r38ZV7zCyhx+1iMZSzh7GUj0i8JP3dEPKd2vvq+RgSXF6NpC/+36VZyUPEnSElBQHo7JRLrmyrC8/z7c6KPFJut9BPj/cO+xFD2C0ygp+gU48xJvu8YfWE60X5jsNYSmnkq5IB1EjQv8sr0BbHvStohdp45tTyeT6beb32Wnba4jHMeQIxiLOhD5gcFR/WPXtLG2ovMHQW3Z21jROCyO+Ec7b3mYuo8Re4wKD8lxDbO247QYfFjQIOn3zG2q1BdrQiAUFFV56fy7hJhjizfYTIFLWhN5jsTDLp0t5oSzFFt6angfkasxpVWocNgNNJ/pZor3R+6O86CTnAZR9zeNbxsNslZGV9ihwfD40A7EgdyvfUL+3jC71lVZ3aZbvfZnThDyX8N44RxRD41MwDG5uCGhXOXTFfVhZSlgIeVtPGQL78wfzneGHnNwInaRoF82sba9KwPA45EHh0kQgVsiPaj7RYaOxpDaY5Etx6RBDvg== X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:AM6PR04MB4838.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230031)(396003)(366004)(136003)(376002)(39860400002)(346002)(230922051799003)(64100799003)(451199024)(1800799012)(186009)(5660300002)(2906002)(7416002)(478600001)(38100700002)(2616005)(26005)(52116002)(1076003)(6486002)(41300700001)(36756003)(86362001)(38350700005)(66556008)(316002)(66476007)(66946007)(6916009)(6512007)(8676002)(4326008)(8936002)(6506007)(83380400001)(32563001);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-MS-Exchange-AntiSpam-MessageData-0: xD0tJjjLNketT5puMGBZrvxrpeeOOYJybZzEewBeFnUZdNyRsSe5BKP0F6cxCvQrANtyudOoOQJzsUptoEeCl6uMto9vXC3YFfYRkVbrjG/0UnRKioJXYXZVClHJYWKSujtnZlhXLpC+S6UVaQ9RHnWROVX4R4Bev7j1HA6k3r+kABwYenV5SQPoSMrWVtEjIq1+s2KbdgKa55xUNl3PGlM7zFWum48nnxMRYtB2aXOPvog6vla11qMaCnIqFyM4OPP25OtoTKq1kVmocaYHttukUj/GNyypKC74yztWEB4Z+1/B8XX+sw1To5HBw7L+iYGLvvlwSzx/ccBj7x5RJ/7v1dAEkjCO8vEHrbFurAKQVwHq4tHxFLRnXlkjjW9HT+H4QeD4uj2loYGAXBPtWmOCXL9jIeJBYItjiXZKEraQiHr9AeH/y33j2LaWcOFnA3BswBGzYW2JEEvzKj8Ti+NBbkhKQvx0KlTCNME6eaoI4L6lFtEypJls1zIxv7ZH7cZM8iyNHLNzbWz8Q0lvsLh1sWdahWg2lkmyC/maydGedP8uAY+UnpncAU8tRlRU+6+MlULtaKSbPA7uRUhzU1z9EyFhMtRvZ+dQK0BCZMwoo9PmKYKI37cy7aJtFqiYAA+zoWtod1ymM2t5xqDtnqXnuLRIUr1PQp2hjy8SXZlBQ4VsNSNs+ZvCixKodi+zuc1eJ10JGsJw0J5rELhqghdLsE3IroagPwnat8EGmu69M/EfEtrMsyAOJG7r4mAph10mms9nNIrMjJAr/EvYdG79HrnguEvGr3DeB/4oIGgIZ/h8JRvlXSO63P7PHujKvQxITLshh4Ne/RGG8WSuxAic4YmqfkQrVz9u3jYc2FXqlT3p6QyitGErlogGZvLFLSl6W9qCuvio7ja8wmWLsAMKiwjSVe8FIgC11GqNCj9dUucWUdqgimUudMrND9TN81c6kDPb/E1KcPxI8OzzsYPnZUvFI0zyDnhgwziEeW8w9iwE0YvLUw6K4VP57W7m3B4d7h2PcJ7EUPP+pCBtqV1JW3DmwTViy/W7QmwSgGiSIgQIju/+AL1NvLzh64G9XvDHWD65tamx5GCapr8y2RZ8dVgdr4conZE+Q1kXKeSU9whNJQqzrLYFTgEh6X6S4iJl4Hg0P7Cb/Tr6piyhlLQAC/u0Xlu7xWnl+Obx5hf2YdZ+zqpgsqOl3ONHe6Q8OLgg3s5pQox6vVXHhn9yJOVohznVzozLIY6IJwBp+7GWk/iDAT7i22O+QYANuXtHN1zLIzj/IsHmwb6ChQ7VH2BCC+XUq0OD5+HW1qBQ2kPX9+YTQNvCN7njII6izQ+EKqsiejiFpuPWhRsbXRaGsmaJtGqp6Sec+68b2DhsFx+DiSJUEnijQFn33M7YaMdgT+UBHmBWkzwZ7hHXzAD3ryRKUOwKu7x6uEBRAUVrx5G1LJ3veeICTSnoB06JWR9WrqXGZMJI//+3Rq7foGjKo5lrl4Ss4z80jJMM5U3lbkBW5A7uOyXsb6bFBvdHqewGAAueDZc5iqIakAaP37cwjmj0AD5vKS/sKGOdIBA909Y= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 897c047d-ba04-4f56-d7e4-08dc07099477 X-MS-Exchange-CrossTenant-AuthSource: AM6PR04MB4838.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 27 Dec 2023 18:28:10.8447 (UTC) X-MS-Exchange-CrossTenant-FromEntityHeader: Hosted X-MS-Exchange-CrossTenant-Id: 686ea1d3-bc2b-4c6f-a92c-d99c5c301635 X-MS-Exchange-CrossTenant-MailboxType: HOSTED X-MS-Exchange-CrossTenant-UserPrincipalName: MnFey9Gyjnb1sF6iCLzGWx1wrP7W8Qs8Vqi+lRzDUdct5Ag9uXSaLief/mwoZqn7u+vhZ8wYYDe5T6s3aClGJA== X-MS-Exchange-Transport-CrossTenantHeadersStamped: DU2PR04MB9050 X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1786460782143199827 X-GMAIL-MSGID: 1786460782143199827 |
Series |
PCI: imx6: Clean up and add imx95 pci support
|
|
Commit Message
Frank Li
Dec. 27, 2023, 6:27 p.m. UTC
iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required
proptery for iMX8MQ to indicate pci controller index.
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.
Signed-off-by: Frank Li <Frank.Li@nxp.com>
---
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(+)
Comments
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 <Frank.Li@nxp.com> > --- > > 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 >
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 <Frank.Li@nxp.com> > > --- > > > > 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. > 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: Not all dts already added "linux,pci-domain" yet. If required for all SOCs, it will cause dtb check warnings. Frank > > > 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 > > > > -- > மணிவண்ணன் சதாசிவம்
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 <Frank.Li@nxp.com> > > > --- > > > > > > 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. > > 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: > > Not all dts already added "linux,pci-domain" yet. If required for all SOCs, > it will cause dtb check warnings. > You can safely add this property to all DTS. Nothing will break. - Mani > Frank > > > > > 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 > > > > > > > -- > > மணிவண்ணன் சதாசிவம்
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 <Frank.Li@nxp.com> > > > > --- > > > > > > > > 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 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: > > > > Not all dts already added "linux,pci-domain" yet. If required for all SOCs, > > it will cause dtb check warnings. > > > > You can safely add this property to all DTS. Nothing will break. Yes, but it will be off topic of this patch serial. I can submit new patches for this later. After all dts changed, then I remove this conditional check. This patch serial is already quite big, (17 patches). And I don't want to involve new DTB check warning. Frank > > - Mani > > > Frank > > > > > > > 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 > > > > > > > > > > -- > > > மணிவண்ணன் சதாசிவம் > > -- > மணிவண்ணன் சதாசிவம்
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 <Frank.Li@nxp.com> > > > > > --- > > > > > > > > > > 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. > > > > > > 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: > > > > > > Not all dts already added "linux,pci-domain" yet. If required for all SOCs, > > > it will cause dtb check warnings. > > > > > > > You can safely add this property to all DTS. Nothing will break. > > Yes, but it will be off topic of this patch serial. > > I can submit new patches for this later. After all dts changed, then I > remove this conditional check. > > This patch serial is already quite big, (17 patches). > > And I don't want to involve new DTB check warning. > Okay. But please follow up on this once this series gets merged. - Mani > Frank > > > > > - Mani > > > > > Frank > > > > > > > > > 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 > > > > > > > > > > > > > -- > > > > மணிவண்ணன் சதாசிவம் > > > > -- > > மணிவண்ணன் சதாசிவம்
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 <Frank.Li@nxp.com> > > > > > > --- > > > > > > > > > > > > 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
On Wed, 27 Dec 2023 13:27:15 -0500, Frank Li wrote: > iMX8MQ have two pci controllers. Adds "linux,pci-domain" as required > proptery for iMX8MQ to indicate pci controller index. > > 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. > > Signed-off-by: Frank Li <Frank.Li@nxp.com> > --- > > 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(+) > Reviewed-by: Rob Herring <robh@kernel.org>
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 + then: + required: + - linux,pci-domain + additionalProperties: true ...