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: 13808009 Received: from DU2PR03CU002.outbound.protection.outlook.com (mail-northeuropeazon11012027.outbound.protection.outlook.com [52.101.66.27]) (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 75B391B3B06 for ; Thu, 19 Sep 2024 22:04:02 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=fail smtp.client-ip=52.101.66.27 ARC-Seal: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726783444; cv=fail; b=bBRfVIHgXNI2+UELq0YXpHbCxQpJbmC7GoL9M8WGBq3JZQrajxCE9JscgwkARGkFO18YtYdDAZugIL+jTLwUnw7Qi/rIIqm90n2UqyIiFL6/NLTZfWA9HoUbRGQxE/OqK0Lq/H3Oaw1Kidle/lJP1PTgGKS+ZxvD/qcc0QN7HrM= ARC-Message-Signature: i=2; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1726783444; c=relaxed/simple; bh=hy1TcyZt1tLkLZTBron348UchEOYxsk6tKLLRXFnOYI=; h=From:Date:Subject:Content-Type:Message-Id:References:In-Reply-To: To:Cc:MIME-Version; b=mChfKOx6y5cpZ61eCmhUHvAVijmIOWwKV1xSaL0qL7eYY6szgsVeLKguxwv7gzqs0SA+voKGPeCGHB5YoZTzTCRC5lwOgkYvsWexiB4w5ldu1FNt7RNaTWbUFPAaDxdoswnUXf7+7XJdIR9c/IKMISe5jkbX2qZDRElo4RJ9LOQ= ARC-Authentication-Results: i=2; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=nxp.com; spf=pass smtp.mailfrom=nxp.com; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b=iRhSVeFj; arc=fail smtp.client-ip=52.101.66.27 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 Authentication-Results: smtp.subspace.kernel.org; dkim=pass (2048-bit key) header.d=nxp.com header.i=@nxp.com header.b="iRhSVeFj" 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) Precedence: bulk X-Mailing-List: imx@lists.linux.dev List-Id: List-Subscribe: List-Unsubscribe: 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-MS-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Q/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 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: