From patchwork Thu Sep 19 22:03:04 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Frank Li X-Patchwork-Id: 13808020 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 02C3ECF3975 for ; Thu, 19 Sep 2024 22:09:39 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:MIME-Version:Cc:To: In-Reply-To:References:Message-Id:Content-Transfer-Encoding:Content-Type: Subject:Date:From:Reply-To:Content-ID:Content-Description:Resent-Date: Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=Cj1eQ6gvwTGJ59uGbDoxYJboZ4QoJcJ+RWrASDanqnk=; b=nLskcgyDLik/B3z2l53ggrjyCS QSKK2bvcgqbPWQwUtkdg+cKKLRoF0DylpXCA8pZyVUC/+E4oAxFGIigY7ftm83cEc+n+a4LMbz5NZ jww9/StYLpfi+WtvJrGTMUc14oDQw60nXwQNaVp7N7symmxbYAm7c+FwdkgRGkV1BZqLsiAkT5ogy 7hAdHDrpIcJ5sPhFClEwEy1TdmcH4kWA4lGSN/c4Y1h2TvqBnuntaEo4bNoXaqOzyLfXy1znx0BrV 8ofC0QoniEjfgUPIcPb87MWfCNp5ZDPlsXO7aFcqUc+8poeAke7VAoIZu/O0RvWJTT+M7JZlAWwxl 5qC320Cw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1srPL7-0000000B5Yy-1wJY; Thu, 19 Sep 2024 22:09:29 +0000 Received: from mail-northeuropeazlp170130004.outbound.protection.outlook.com ([2a01:111:f403:c200::4] helo=DUZPR83CU001.outbound.protection.outlook.com) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1srPFy-0000000B4ds-2Cap for linux-arm-kernel@lists.infradead.org; Thu, 19 Sep 2024 22:04:11 +0000 ARC-Seal: i=1; a=rsa-sha256; s=arcselector10001; d=microsoft.com; cv=none; b=dwJeMkmW6JPUuazCddIWj+mcRwAiUBaux4mPyw/2pMGFc/K/0+M/jidbl9eBy4IOhKHVA5puwdL7/3pKA+nF4Lv9hoILGXfN7CCLNDO+IDLnBaT0Bp1yvFMCB4LV+ewBOqdMTbmYMMtdOoreRpv6h+rZr1aNeviIRPLG0BphNuYikrqJM8oK47Ewl1nTJ5PelEdCCUAmCGOLCHbiTSWQ1iW0VsKEI4n6RAATc8XcklGeWTMUqUhSy/21pUO7LH/5zQma29C8sqePv/GcIr4dUaex07Qbh+O3KhXBVWERzLp1e/Mr9oYJhAmU297wcUGLGPiY2K2vDaitaZFqmi24xw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=microsoft.com; s=arcselector10001; 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=Cj1eQ6gvwTGJ59uGbDoxYJboZ4QoJcJ+RWrASDanqnk=; b=AN17CibAQGrO8kxkqgOjDRoaX5WuF9Krri4NVO1kIBS9Y0dj/CKfogeU4TQskzrx3YNajXCUuLR+jG7WCg1UcSurAHRZf/w3EWsMw/yoOuCIAt5yWywPNUpaZCnRDaDMfK3nhib9wtl6BaWF24H2qOpHX2vZ8TKwWkvT22lojOmX8LHRbLO47u3FRVd1PCvkuTyhdPHwLQmKrBBDtW1689zkGxO/mAUj5DLFtxTGAT/L1hBbCRUDOk4hf+VPX1gWNVP8C3J9+8LLEXlh/K3diIuFTUDXFm4LSpBFJH8cmycC2fMmBnEF0g8HLpIlfCrmRkyxLw+LFPTz2ZSi9W9N0w== 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=selector1; h=From:Date:Subject:Message-ID:Content-Type:MIME-Version:X-MS-Exchange-SenderADCheck; bh=Cj1eQ6gvwTGJ59uGbDoxYJboZ4QoJcJ+RWrASDanqnk=; b=iRhSVeFjB4wpbfXtMJfUH9wJj9IdXh4fgywGu+QGJ7XPbUmy8TKWruhjtdeBVDohqobbqytWPq/3ACsrmghw91iQ/Gckc2HoKN8O9Higntbpqc8WjNZHNOVId1WTO7N0TcmhWkKGU6pGL8aIDxcqPDm7uFZMzhhbUK73Lj3lADJITMq18ow3gXLAv1GcgHpTecuWgK2hrtm/FxHTuZPgBvSfGWV/Q/0OjiLcVeLXL/yl+aX/OHpy8/RMmeN9bs8HGzonmqAKRBOj8Fjn+IRLHI1zB8HFziTE/BQ29aArDvauTveH7vYSZw3BKNe77IFSFldUJcgcjT6b7DC3bUPv1g== Authentication-Results: dkim=none (message not signed) header.d=none;dmarc=none action=none header.from=nxp.com; Received: from PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) by GVXPR04MB9849.eurprd04.prod.outlook.com (2603:10a6:150:112::18) with Microsoft SMTP Server (version=TLS1_2, cipher=TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384) id 15.20.7982.22; Thu, 19 Sep 2024 22:03:59 +0000 Received: from PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06]) by PAXPR04MB9642.eurprd04.prod.outlook.com ([fe80::9126:a61e:341d:4b06%4]) with mapi id 15.20.7982.018; Thu, 19 Sep 2024 22:03:59 +0000 From: Frank Li Date: Thu, 19 Sep 2024 18:03:04 -0400 Subject: [PATCH 4/9] dt-bindings: PCI: snps,dw-pcie-ep: 'addr_space' not required if 'ranges' present Message-Id: <20240919-pcie_ep_range-v1-4-b3e9d62780b7@nxp.com> References: <20240919-pcie_ep_range-v1-0-b3e9d62780b7@nxp.com> In-Reply-To: <20240919-pcie_ep_range-v1-0-b3e9d62780b7@nxp.com> To: Lorenzo Pieralisi , =?utf-8?q?Krzysztof_Wilczy?= =?utf-8?q?=C5=84ski?= , Manivannan Sadhasivam , Rob Herring , Bjorn Helgaas , Krzysztof Kozlowski , Conor Dooley , Abraham I , Saravana Kannan , Jingoo Han , Gustavo Pimentel , Jesper Nilsson , Richard Zhu , Lucas Stach , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam Cc: linux-pci@vger.kernel.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, linux-arm-kernel@axis.com, linux-arm-kernel@lists.infradead.org, imx@lists.linux.dev, =?utf-8?q?Krzys?= =?utf-8?q?ztof_Wilczy=C5=84ski?= , Frank Li X-Mailer: b4 0.13-dev-e586c X-Developer-Signature: v=1; a=ed25519-sha256; t=1726783409; l=2802; i=Frank.Li@nxp.com; s=20240130; h=from:subject:message-id; bh=hy1TcyZt1tLkLZTBron348UchEOYxsk6tKLLRXFnOYI=; b=QpYsntoNApxAlIq9QhdmcugZiRspuxU4z1FnYxH47cmaGuTKb4rsPZp3DjqBq7Awi4OciPDx4 7Zoo1tVlItHAfE+z/pR7YCebgEoM+kZrsrNRfMgifybmbUnW/le/ZlC X-Developer-Key: i=Frank.Li@nxp.com; a=ed25519; pk=I0L1sDUfPxpAkRvPKy7MdauTuSENRq+DnA+G4qcS94Q= X-ClientProxiedBy: SJ0PR05CA0057.namprd05.prod.outlook.com (2603:10b6:a03:33f::32) To PAXPR04MB9642.eurprd04.prod.outlook.com (2603:10a6:102:240::14) MIME-Version: 1.0 X-MS-PublicTrafficType: Email X-MS-TrafficTypeDiagnostic: PAXPR04MB9642:EE_|GVXPR04MB9849:EE_ X-MS-Office365-Filtering-Correlation-Id: 4f1e1faf-4498-4235-6291-08dcd8f6f6d6 X-MS-Exchange-SenderADCheck: 1 X-MS-Exchange-AntiSpam-Relay: 0 X-Microsoft-Antispam: BCL:0;ARA:13230040|52116014|7416014|376014|366016|1800799024|38350700014|921020; X-Microsoft-Antispam-Message-Info: =?utf-8?q?aQJqbsLGUYvbzOPZALKRcUVqOdYM1wo?= =?utf-8?q?xRosIZyzAGNZwVyJn0z73frK7d3iFiMRn6uSwPdBqTu0mlMaPkCKMBJH/UmaPLiub?= =?utf-8?q?mp6cQ4savffaHgoG8UmKIm9ZGMGALEN7eTzZ80iWY8eg1tOqNJKy7fLP7YseCMZXM?= =?utf-8?q?29Th0vbwH+pXLnBuoB2G0Zy/W2N9KpcY5+Dxv+DxgcrAaWrTRJl2mZay/H1B5Y8SX?= =?utf-8?q?SdR+5u7v9WRfL4chMXS+rVNUYspelfOfv9iw7b4eh36ghCv7Gk3aWSMnfSuuqI+P1?= =?utf-8?q?Y0CIGYnvj9vrjXxqJtJBsmyrWVTY/NOXwKSHsZ6hk/y6qtsDKmjCSmZf45QLV/KiI?= =?utf-8?q?dkQjUr9oIPS7aEib9SQh6btjlAp5qIH64ynqbmFdYxsFb076aNdrU3h8kHTVJycDN?= =?utf-8?q?4Er/C3lqZvIex4mb/+EQGFdpGmosUmik/JYrzeqEG4/yq7PqCrkmIK6wRR5dQAidK?= =?utf-8?q?lsm6yyTDPiw/V3auKZfA3FMGfJ/jfGJmSyUTqVbes7yCrZrMVVzfzH8UQnUpTfVgD?= =?utf-8?q?2oFuQLc1jfbMRQy6E9HU8lAta8VnIFXXENBSX9tDZnBXmDwdobUXJlgQkwZ9W/QDy?= =?utf-8?q?I2iA6owT3VcEccsG2V2EMYv3pwm+nvVUUZ6MJkaxUvpaSyWAINjdQ8FRglFcSn8Lv?= =?utf-8?q?wjNIGZC4teYLr/WqwnV0JRpj3PFl3GSYHocVHjRuQEIqR46Gf4WigKXBi6bDWwavH?= =?utf-8?q?nptbBnACidFlzbX9la7EG5aPLrqRfOCWWl/GxdJATtVXCInFLuamPYGWZNFu/n932?= =?utf-8?q?tCzvvmUn6OlLjqJmbi369Zy2vRorrlROeBqsFcOz4tFfTCPHL08e9KHl8pCLDhTzO?= =?utf-8?q?s5r/gwiEq8bmnxSHI/HpmCyExk6obPJ0FbQJNoJ243NLaTZZmRN7tMAvht79fjkNZ?= =?utf-8?q?Xt6G1ijVIzVyrbzuFT7aPhXW0jyPTBNgcD8PCowFi0H1PCybPcNvYnNUM6GOGKumD?= =?utf-8?q?MqryVfmKJDTnCfe54qagkzdvsxp3kXkxiNySEDxHHY/GginD1HVNy8VvjK7cFJqAw?= =?utf-8?q?yqn/G9aIZEbaqRu+D97R7d4BXIRXeaTAkxLEzRq0k6CUAjd+FaeUz6MH1iVeoEP7Z?= =?utf-8?q?OQkEl4CeF8NKMRrgQVBQW5CHAokkHMiLWglrAMUO/wJU0j3jLf397jnYa3gW6O6ZU?= =?utf-8?q?2sdg9btoNSEL/tTVoLHUegmiJK1yR5EJmPhOcmXc2rHLII8JuJDH0yF8iQWF18sQF?= =?utf-8?q?inaGUh+y+MP73VW/YRxhaEJaa+TId0mSM3kJw8cyiU265nT8HdEYHm6yLxQF/1iTj?= =?utf-8?q?a3bAgX6NANwU/+2ZHtuWN5cclow03eC4MjDumqCIMxXTn5Fo7AOyIRMNxut8RQDjl?= =?utf-8?q?S3VDdkRvKKG6EvP4UG4Ugxs4QVkdjxmbwY0EheX6ReFAD3ua0Tkb+CI=3D?= X-Forefront-Antispam-Report: CIP:255.255.255.255;CTRY:;LANG:en;SCL:1;SRV:;IPV:NLI;SFV:NSPM;H:PAXPR04MB9642.eurprd04.prod.outlook.com;PTR:;CAT:NONE;SFS:(13230040)(52116014)(7416014)(376014)(366016)(1800799024)(38350700014)(921020);DIR:OUT;SFP:1101; X-MS-Exchange-AntiSpam-MessageData-ChunkCount: 1 X-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2f/bQ/cRFQrKzyf5c7cvWPFBDG8DUYaON05Mxujf1c6DlcB8qLnMEikt?= =?utf-8?q?QQJyHJR4KRils732jYeRYgf/EBR/XNPRo66KBaCPE4y/a0XK5+PLSHCLHL3qurhnk?= =?utf-8?q?gaVts4+1jgix1P5vFMmZOVBw2OtYmGg1BdXtdvF+Jw+tiPLPUJvMUoyE16AzTvdqa?= =?utf-8?q?wVXcL+rt8XE/Dj/ajNYCTxK3U2JE6Ku7nyeCsKcC9iqtM+KRSzRC9w1HXJIrEF5WE?= =?utf-8?q?8YFVohO6xIYKokJq1ptWRP8R3SKrbi0C9Md1zYllNjy5FdrnJAS8zcMGGk2FbS62J?= =?utf-8?q?HFBX9HcR5KmKX9Pdch+Df+fQWOrAmsDk+uL2Uma5P+fxh4N59ViritPqL7xmUWmKV?= =?utf-8?q?DggLXlxVq4bRu2WkaITNhslKXye9Z3mJ9l2WFmDVr/Ar/3XXBMAdveqjMnew/fvbn?= =?utf-8?q?YyfTHLj1MsSrT4USuSaBzE7Je0ozlqlcRwDP1rQMhl1iBrt7xozjqsCKGeei1jy/x?= =?utf-8?q?YhdqajOhjFhzRJM0d0CX1hP24/5rxzf30X9HgV4M2p91E+my94MIs5ZM8Jk36N5tS?= =?utf-8?q?hEhi40mWYf20M3tBB0TCKmlrePT7xnRBX0WhWnXOYOeLbK/8v2wDHUtpxrzs6s53n?= =?utf-8?q?x2nK+5wgGBDX8cfLEvhh8KAIq+Ula/ewHFH7mdWNPy1HErUmdb+zAjPSnl46uNPbv?= =?utf-8?q?qQLek3gKWQHs?= X-OriginatorOrg: nxp.com X-MS-Exchange-CrossTenant-Network-Message-Id: 4f1e1faf-4498-4235-6291-08dcd8f6f6d6 X-MS-Exchange-CrossTenant-AuthSource: PAXPR04MB9642.eurprd04.prod.outlook.com X-MS-Exchange-CrossTenant-AuthAs: Internal X-MS-Exchange-CrossTenant-OriginalArrivalTime: 19 Sep 2024 22:03:59.5410 (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: hHv4fiNAGzb6U45SjkuOcDRy/JYj4TTRVtmZP9jPolbhNXJ3jFVnJr26sAIbLr1Thc8bR4uPKmMbnCgWZTsdOg== X-MS-Exchange-Transport-CrossTenantHeadersStamped: GVXPR04MB9849 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240919_150410_614425_6019072B X-CRM114-Status: GOOD ( 13.46 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Do not require 'addr_space' in 'reg-names' when the device uses the 'ranges' property to indicate the outbound address space. This maintains the same restriction for cases where 'ranges' is absent. minItems of 'reg' and 'reg-names' change to 1 because only one 'dbi' register space is required if use 'ranges' describe outbound memory space. minItems of 'reg' and 'reg-names' in snps,dw-pcie-common.yaml also change to 1 from 2. It doesn't loss restriction because it is 2 in snps,dw-pcie.yaml. Signed-off-by: Frank Li --- .../bindings/pci/snps,dw-pcie-common.yaml | 4 ++-- .../devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 21 +++++++++++++++++---- 2 files changed, 19 insertions(+), 6 deletions(-) diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml index dc05761c5cf93..16d5fe77d117a 100644 --- a/Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml +++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie-common.yaml @@ -32,11 +32,11 @@ properties: is selected. Note the PCIe CFG-space, PL and Shadow registers are specific for each activated function, while the rest of the sub-spaces are common for all of them (if there are more than one). - minItems: 2 + minItems: 1 maxItems: 7 reg-names: - minItems: 2 + minItems: 1 maxItems: 7 interrupts: diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml index f474b9e3fc7e2..184c519d2b7c6 100644 --- a/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml +++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml @@ -25,18 +25,33 @@ select: allOf: - $ref: /schemas/pci/pci-ep.yaml# - $ref: /schemas/pci/snps,dw-pcie-common.yaml# + - if: + not: + required: + - ranges + then: + properties: + reg: + minItems: 2 + reg-names: + minItems: 2 + allOf: + - contains: + const: addr_space properties: + ranges: true + reg: description: DBI, DBI2 reg-spaces and outbound memory window are required for the normal controller functioning. iATU memory IO region is also required if the space is unrolled (IP-core version >= 4.80a). - minItems: 2 + minItems: 1 maxItems: 7 reg-names: - minItems: 2 + minItems: 1 maxItems: 7 items: oneOf: @@ -106,8 +121,6 @@ properties: allOf: - contains: const: dbi - - contains: - const: addr_space interrupts: description: