[<prev] [next>] [<thread-prev] [thread-next>] [day] [month] [year] [list]
Message-Id: <20240919-pcie_ep_range-v1-4-b3e9d62780b7@nxp.com>
Date: Thu, 19 Sep 2024 18:03:04 -0400
From: Frank Li <Frank.Li@....com>
To: Lorenzo Pieralisi <lpieralisi@...nel.org>,
Krzysztof Wilczyński <kw@...ux.com>,
Manivannan Sadhasivam <manivannan.sadhasivam@...aro.org>,
Rob Herring <robh@...nel.org>, Bjorn Helgaas <bhelgaas@...gle.com>,
Krzysztof Kozlowski <krzk+dt@...nel.org>,
Conor Dooley <conor+dt@...nel.org>, Abraham I <kishon@...nel.org>,
Saravana Kannan <saravanak@...gle.com>, Jingoo Han <jingoohan1@...il.com>,
Gustavo Pimentel <gustavo.pimentel@...opsys.com>,
Jesper Nilsson <jesper.nilsson@...s.com>,
Richard Zhu <hongxing.zhu@....com>, Lucas Stach <l.stach@...gutronix.de>,
Shawn Guo <shawnguo@...nel.org>, Sascha Hauer <s.hauer@...gutronix.de>,
Pengutronix Kernel Team <kernel@...gutronix.de>,
Fabio Estevam <festevam@...il.com>
Cc: linux-pci@...r.kernel.org, devicetree@...r.kernel.org,
linux-kernel@...r.kernel.org, linux-arm-kernel@...s.com,
linux-arm-kernel@...ts.infradead.org, imx@...ts.linux.dev,
Krzysztof Wilczyński <kwilczynski@...nel.org>,
Frank Li <Frank.Li@....com>
Subject: [PATCH 4/9] dt-bindings: PCI: snps,dw-pcie-ep: 'addr_space' not
required if 'ranges' present
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 <Frank.Li@....com>
---
.../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:
--
2.34.1
Powered by blists - more mailing lists