All of lore.kernel.org
 help / color / mirror / Atom feed
* [PATCH v3 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions
@ 2022-04-18  0:18 ` Kunihiko Hayashi
  0 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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

This series fixes dt-schema descriptions for PCI endpoint controller
implemented in UniPhier SoCs.

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] 10+ messages in thread

* [PATCH v3 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions
@ 2022-04-18  0:18 ` Kunihiko Hayashi
  0 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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

This series fixes dt-schema descriptions for PCI endpoint controller
implemented in UniPhier SoCs.

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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* [PATCH v3 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names
  2022-04-18  0:18 ` Kunihiko Hayashi
@ 2022-04-18  0:18   ` Kunihiko Hayashi
  -1 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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>
---
 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 e59059ab5be0..03f97e7c4089 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] 10+ messages in thread

* [PATCH v3 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names
@ 2022-04-18  0:18   ` Kunihiko Hayashi
  0 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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>
---
 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 e59059ab5be0..03f97e7c4089 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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* [PATCH v3 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
  2022-04-18  0:18 ` Kunihiko Hayashi
@ 2022-04-18  0:18   ` Kunihiko Hayashi
  -1 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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>
---
 .../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] 10+ messages in thread

* [PATCH v3 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
@ 2022-04-18  0:18   ` Kunihiko Hayashi
  0 siblings, 0 replies; 10+ messages in thread
From: Kunihiko Hayashi @ 2022-04-18  0:18 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>
---
 .../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


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
  2022-04-18  0:18   ` Kunihiko Hayashi
@ 2022-04-19 16:35     ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-19 16:35 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Masami Hiramatsu, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-kernel, Bjorn Helgaas, linux-arm-kernel, Gustavo Pimentel,
	linux-pci, Jingoo Han

On Mon, 18 Apr 2022 09:18:20 +0900, Kunihiko Hayashi wrote:
> 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>
> ---
>  .../pci/socionext,uniphier-pcie-ep.yaml       | 76 ++++++++++++-------
>  1 file changed, 49 insertions(+), 27 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string
@ 2022-04-19 16:35     ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-19 16:35 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Masami Hiramatsu, Krzysztof Kozlowski, Rob Herring, devicetree,
	linux-kernel, Bjorn Helgaas, linux-arm-kernel, Gustavo Pimentel,
	linux-pci, Jingoo Han

On Mon, 18 Apr 2022 09:18:20 +0900, Kunihiko Hayashi wrote:
> 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>
> ---
>  .../pci/socionext,uniphier-pcie-ep.yaml       | 76 ++++++++++++-------
>  1 file changed, 49 insertions(+), 27 deletions(-)
> 

Reviewed-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names
  2022-04-18  0:18   ` Kunihiko Hayashi
@ 2022-04-20 21:22     ` Rob Herring
  -1 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-20 21:22 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Krzysztof Kozlowski,
	Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
	linux-arm-kernel

On Mon, Apr 18, 2022 at 09:18:19AM +0900, Kunihiko Hayashi wrote:
> 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>
> ---
>  Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: [PATCH v3 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names
@ 2022-04-20 21:22     ` Rob Herring
  0 siblings, 0 replies; 10+ messages in thread
From: Rob Herring @ 2022-04-20 21:22 UTC (permalink / raw)
  To: Kunihiko Hayashi
  Cc: Jingoo Han, Gustavo Pimentel, Bjorn Helgaas, Krzysztof Kozlowski,
	Masami Hiramatsu, linux-pci, devicetree, linux-kernel,
	linux-arm-kernel

On Mon, Apr 18, 2022 at 09:18:19AM +0900, Kunihiko Hayashi wrote:
> 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>
> ---
>  Documentation/devicetree/bindings/pci/snps,dw-pcie-ep.yaml | 4 ++--
>  1 file changed, 2 insertions(+), 2 deletions(-)

Acked-by: Rob Herring <robh@kernel.org>

_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2022-04-20 21:23 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-04-18  0:18 [PATCH v3 0/2] dt-bindings: PCI: uniphier: Fix endpoint descriptions Kunihiko Hayashi
2022-04-18  0:18 ` Kunihiko Hayashi
2022-04-18  0:18 ` [PATCH v3 1/2] dt-bindings: PCI: designware-ep: Increase maxItems of reg and reg-names Kunihiko Hayashi
2022-04-18  0:18   ` Kunihiko Hayashi
2022-04-20 21:22   ` Rob Herring
2022-04-20 21:22     ` Rob Herring
2022-04-18  0:18 ` [PATCH v3 2/2] dt-bindings: PCI: uniphier-ep: Clean up reg, clocks, resets, and their names using compatible string Kunihiko Hayashi
2022-04-18  0:18   ` Kunihiko Hayashi
2022-04-19 16:35   ` Rob Herring
2022-04-19 16:35     ` Rob Herring

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.