* [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions
@ 2022-06-23 2:09 Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
` (2 more replies)
0 siblings, 3 replies; 4+ messages in thread
From: Kunihiko Hayashi @ 2022-06-23 2:09 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Rob Herring,
Krzysztof Kozlowski
Cc: Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
linux-arm-kernel, Kunihiko Hayashi
Changes since v3:
- Add Reviewed-by: and Acked-by: tags
Changes since v2:
- Move some items to minimize if/then schemas in Patch 2
- Remove Patch 3 because the warning comment is for an unmerged source
Changes since v1:
- Fix "config" in the Patch 1 commit message to "addr_space"
Kunihiko Hayashi (2):
dt-bindings: PCI: designware-ep: Increase maxItems of reg and
reg-names
dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their
names using compatible string
.../bindings/pci/snps,dw-pcie-ep.yaml | 4 +-
.../pci/socionext,uniphier-pcie-ep.yaml | 76 ++++++++++++-------
2 files changed, 51 insertions(+), 29 deletions(-)
--
2.25.1
^ permalink raw reply [flat|nested] 4+ messages in thread
* [PATCH v4 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names
2022-06-23 2:09 [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
@ 2022-06-23 2:09 ` Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Kunihiko Hayashi
2022-06-23 16:40 ` [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Kunihiko Hayashi @ 2022-06-23 2:09 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Rob Herring,
Krzysztof Kozlowski
Cc: Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
linux-arm-kernel, Kunihiko Hayashi
UniPhier PCIe EP controller has up to 5 register mappings (dbi, dbi2, link,
addr_space and atu), so maxItems of "reg" and "reg-names" should allow 5.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Acked-by: Rob Herring <robh@kernel.org>
---
Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 4 ++--
1 file changed, 2 insertions(+), 2 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
index b78535040f04..f9390d729958 100644
--- a/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml
@@ -28,11 +28,11 @@ properties:
versions.
For designware core version >= 4.80, it may contain ATU address space.
minItems: 2
- maxItems: 4
+ maxItems: 5
reg-names:
minItems: 2
- maxItems: 4
+ maxItems: 5
items:
enum: [dbi, dbi2, config, atu, addr_space, link, atu_dma, appl]
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* [PATCH v4 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
2022-06-23 2:09 [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
@ 2022-06-23 2:09 ` Kunihiko Hayashi
2022-06-23 16:40 ` [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Kunihiko Hayashi @ 2022-06-23 2:09 UTC (permalink / raw)
To: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Rob Herring,
Krzysztof Kozlowski
Cc: Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
linux-arm-kernel, Kunihiko Hayashi
Instead of "oneOf:" choices, use "allOf:" and "if:" to define reg, clocks,
resets, and their names that can be taken by the compatible string.
The order of their names doesn't change here.
Signed-off-by: Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
Reviewed-by: Rob Herring <robh@kernel.org>
---
.../pci/socionext,uniphier-pcie-ep.yaml | 76 ++++++++++++-------
1 file changed, 49 insertions(+), 27 deletions(-)
diff --git a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
index 437e61618d06..f0d8e486a07d 100644
--- a/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/socionext,uniphier-pcie-ep.yaml
@@ -15,9 +15,6 @@ description: |
maintainers:
- Kunihiko Hayashi <hayashi.kunihiko@socionext.com>
-allOf:
- - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
-
properties:
compatible:
enum:
@@ -29,40 +26,25 @@ properties:
maxItems: 5
reg-names:
- oneOf:
- - items:
- - const: dbi
- - const: dbi2
- - const: link
- - const: addr_space
- - items:
- - const: dbi
- - const: dbi2
- - const: link
- - const: addr_space
- - const: atu
+ minItems: 4
+ items:
+ - const: dbi
+ - const: dbi2
+ - const: link
+ - const: addr_space
+ - const: atu
clocks:
minItems: 1
maxItems: 2
- clock-names:
- oneOf:
- - items: # for Pro5
- - const: gio
- - const: link
- - const: link # for NX1
+ clock-names: true
resets:
minItems: 1
maxItems: 2
- reset-names:
- oneOf:
- - items: # for Pro5
- - const: gio
- - const: link
- - const: link # for NX1
+ reset-names: true
num-ib-windows:
const: 16
@@ -78,6 +60,46 @@ properties:
phy-names:
const: pcie-phy
+allOf:
+ - $ref: /schemas/pci/snps,dw-pcie-ep.yaml#
+ - if:
+ properties:
+ compatible:
+ contains:
+ const: socionext,uniphier-pro5-pcie-ep
+ then:
+ properties:
+ reg:
+ maxItems: 4
+ reg-names:
+ maxItems: 4
+ clocks:
+ minItems: 2
+ clock-names:
+ items:
+ - const: gio
+ - const: link
+ resets:
+ minItems: 2
+ reset-names:
+ items:
+ - const: gio
+ - const: link
+ else:
+ properties:
+ reg:
+ minItems: 5
+ reg-names:
+ minItems: 5
+ clocks:
+ maxItems: 1
+ clock-names:
+ const: link
+ resets:
+ maxItems: 1
+ reset-names:
+ const: link
+
required:
- compatible
- reg
--
2.25.1
^ permalink raw reply related [flat|nested] 4+ messages in thread
* Re: [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions
2022-06-23 2:09 [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Kunihiko Hayashi
@ 2022-06-23 16:40 ` Bjorn Helgaas
2 siblings, 0 replies; 4+ messages in thread
From: Bjorn Helgaas @ 2022-06-23 16:40 UTC (permalink / raw)
To: Kunihiko Hayashi, Rob Herring
Cc: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Krzysztof Kozlowski,
Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
linux-arm-kernel
On Thu, Jun 23, 2022 at 11:09:00AM +0900, Kunihiko Hayashi wrote:
> Changes since v3:
> - Add Reviewed-by: and Acked-by: tags
Hi Rob, I notice your Reviewed-by and Acked-by tags. Does that mean
you want me to merge these? It looks like you've merged most of the
recent changes yourself. Happy to do it either way, whatever you
intend.
> Changes since v2:
> - Move some items to minimize if/then schemas in Patch 2
> - Remove Patch 3 because the warning comment is for an unmerged source
>
> Changes since v1:
> - Fix "config" in the Patch 1 commit message to "addr_space"
>
> Kunihiko Hayashi (2):
> dt-bindings: PCI: designware-ep: Increase maxItems of reg and
> reg-names
> dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their
> names using compatible string
>
> .../bindings/pci/snps,dw-pcie-ep.yaml | 4 +-
> .../pci/socionext,uniphier-pcie-ep.yaml | 76 ++++++++++++-------
> 2 files changed, 51 insertions(+), 29 deletions(-)
>
> --
> 2.25.1
>
^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2022-06-23 16:40 UTC | newest]
Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-06-23 2:09 [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
2022-06-23 2:09 ` [PATCH v4 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Kunihiko Hayashi
2022-06-23 16:40 ` [PATCH v4 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Bjorn Helgaas
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).