linux-kernel.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property
@ 2020-11-26 11:59 Geert Uytterhoeven
  2020-11-30  9:16 ` Geert Uytterhoeven
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-11-26 11:59 UTC (permalink / raw)
  To: Lad Prabhakar, Yoshihiro Shimoda, Rob Herring, Bjorn Helgaas,
	Marek Vasut
  Cc: linux-pci, linux-renesas-soc, devicetree, linux-kernel,
	Geert Uytterhoeven

The R-Car PCIe controller does not use interrupts when configured
for endpoint mode, hence the bindings do not document the interrupt
property.  However, all DTS files provide interrupts properties, and
thus fail to validate.

Fix this by documenting the interrupts property.

Fixes: 5be478f9c24fbdf8 ("dt-bindings: Another round of adding missing 'additionalProperties'")
Fixes: 4c0f80920923f103 ("dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller")
Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
---
Alternatively, the interrupts properties should be removed from the
corresponding device nodes in the DTS files.  Obviously they should be
retained in the device nodes representing PCIe controllers configured in
host mode, which describe the same hardware...
---
 Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml | 9 +++++++++
 1 file changed, 9 insertions(+)

diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
index fb97f4ea0e63682b..32a3b7665ff5473c 100644
--- a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
+++ b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
@@ -33,6 +33,10 @@ properties:
       - const: memory2
       - const: memory3
 
+  interrupts:
+    minItems: 3
+    maxItems: 3
+
   power-domains:
     maxItems: 1
 
@@ -54,6 +58,7 @@ required:
   - compatible
   - reg
   - reg-names
+  - interrupts
   - resets
   - power-domains
   - clocks
@@ -65,6 +70,7 @@ additionalProperties: false
 examples:
   - |
     #include <dt-bindings/clock/r8a774c0-cpg-mssr.h>
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
     #include <dt-bindings/power/r8a774c0-sysc.h>
 
      pcie0_ep: pcie-ep@fe000000 {
@@ -76,6 +82,9 @@ examples:
                   <0x30000000 0x8000000>,
                   <0x38000000 0x8000000>;
             reg-names = "apb-base", "memory0", "memory1", "memory2", "memory3";
+            interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
             resets = <&cpg 319>;
             power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
             clocks = <&cpg CPG_MOD 319>;
-- 
2.25.1


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

* Re: [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property
  2020-11-26 11:59 [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property Geert Uytterhoeven
@ 2020-11-30  9:16 ` Geert Uytterhoeven
  2020-11-30 10:00 ` Lad, Prabhakar
  2020-12-08 18:01 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Geert Uytterhoeven @ 2020-11-30  9:16 UTC (permalink / raw)
  To: Lad Prabhakar, Yoshihiro Shimoda, Rob Herring, Bjorn Helgaas,
	Marek Vasut
  Cc: linux-pci, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS,
	Linux Kernel Mailing List

On Thu, Nov 26, 2020 at 3:20 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
> The R-Car PCIe controller does not use interrupts when configured
> for endpoint mode, hence the bindings do not document the interrupt
> property.  However, all DTS files provide interrupts properties, and
> thus fail to validate.
>
> Fix this by documenting the interrupts property.
>
> Fixes: 5be478f9c24fbdf8 ("dt-bindings: Another round of adding missing 'additionalProperties'")
> Fixes: 4c0f80920923f103 ("dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>

Oops, this should have been geert+renesas@glider.be.

> ---
> Alternatively, the interrupts properties should be removed from the
> corresponding device nodes in the DTS files.  Obviously they should be
> retained in the device nodes representing PCIe controllers configured in
> host mode, which describe the same hardware...

Anyway, waiting for your comments ;-)

Gr{oetje,eeting}s,

                        Geert

-- 
Geert Uytterhoeven -- There's lots of Linux beyond ia32 -- geert@linux-m68k.org

In personal conversations with technical people, I call myself a hacker. But
when I'm talking to journalists I just say "programmer" or something like that.
                                -- Linus Torvalds

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

* Re: [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property
  2020-11-26 11:59 [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property Geert Uytterhoeven
  2020-11-30  9:16 ` Geert Uytterhoeven
@ 2020-11-30 10:00 ` Lad, Prabhakar
  2020-12-08 18:01 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Lad, Prabhakar @ 2020-11-30 10:00 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Lad Prabhakar, Yoshihiro Shimoda, Rob Herring, Bjorn Helgaas,
	Marek Vasut, linux-pci, Linux-Renesas,
	open list:OPEN FIRMWARE AND FLATTENED DEVICE TREE BINDINGS, LKML

Hi Geert,

Thank you for the patch.

On Thu, Nov 26, 2020 at 2:21 PM Geert Uytterhoeven <geert@linux-m68k.org> wrote:
>
> The R-Car PCIe controller does not use interrupts when configured
> for endpoint mode, hence the bindings do not document the interrupt
> property.  However, all DTS files provide interrupts properties, and
> thus fail to validate.
>
> Fix this by documenting the interrupts property.
>
> Fixes: 5be478f9c24fbdf8 ("dt-bindings: Another round of adding missing 'additionalProperties'")
> Fixes: 4c0f80920923f103 ("dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Alternatively, the interrupts properties should be removed from the
> corresponding device nodes in the DTS files.  Obviously they should be
> retained in the device nodes representing PCIe controllers configured in
> host mode, which describe the same hardware...
> ---
>  Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml | 9 +++++++++
>  1 file changed, 9 insertions(+)
>
Reviewed-by: Lad Prabhakar <prabhakar.mahadev-lad.rj@bp.renesas.com>

Cheers,
Prabhakar

> diff --git a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
> index fb97f4ea0e63682b..32a3b7665ff5473c 100644
> --- a/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
> +++ b/Documentation/devicetree/bindings/pci/rcar-pci-ep.yaml
> @@ -33,6 +33,10 @@ properties:
>        - const: memory2
>        - const: memory3
>
> +  interrupts:
> +    minItems: 3
> +    maxItems: 3
> +
>    power-domains:
>      maxItems: 1
>
> @@ -54,6 +58,7 @@ required:
>    - compatible
>    - reg
>    - reg-names
> +  - interrupts
>    - resets
>    - power-domains
>    - clocks
> @@ -65,6 +70,7 @@ additionalProperties: false
>  examples:
>    - |
>      #include <dt-bindings/clock/r8a774c0-cpg-mssr.h>
> +    #include <dt-bindings/interrupt-controller/arm-gic.h>
>      #include <dt-bindings/power/r8a774c0-sysc.h>
>
>       pcie0_ep: pcie-ep@fe000000 {
> @@ -76,6 +82,9 @@ examples:
>                    <0x30000000 0x8000000>,
>                    <0x38000000 0x8000000>;
>              reg-names = "apb-base", "memory0", "memory1", "memory2", "memory3";
> +            interrupts = <GIC_SPI 116 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 117 IRQ_TYPE_LEVEL_HIGH>,
> +                         <GIC_SPI 118 IRQ_TYPE_LEVEL_HIGH>;
>              resets = <&cpg 319>;
>              power-domains = <&sysc R8A774C0_PD_ALWAYS_ON>;
>              clocks = <&cpg CPG_MOD 319>;
> --
> 2.25.1
>

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

* Re: [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property
  2020-11-26 11:59 [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property Geert Uytterhoeven
  2020-11-30  9:16 ` Geert Uytterhoeven
  2020-11-30 10:00 ` Lad, Prabhakar
@ 2020-12-08 18:01 ` Rob Herring
  2 siblings, 0 replies; 4+ messages in thread
From: Rob Herring @ 2020-12-08 18:01 UTC (permalink / raw)
  To: Geert Uytterhoeven
  Cc: Lad Prabhakar, Yoshihiro Shimoda, Bjorn Helgaas, Marek Vasut,
	linux-pci, linux-renesas-soc, devicetree, linux-kernel

On Thu, Nov 26, 2020 at 12:59:27PM +0100, Geert Uytterhoeven wrote:
> The R-Car PCIe controller does not use interrupts when configured
> for endpoint mode, hence the bindings do not document the interrupt
> property.  However, all DTS files provide interrupts properties, and
> thus fail to validate.
> 
> Fix this by documenting the interrupts property.
> 
> Fixes: 5be478f9c24fbdf8 ("dt-bindings: Another round of adding missing 'additionalProperties'")

I don't think this fixes is appropriate. The commit itself wasn't 
broken, this binding is.

> Fixes: 4c0f80920923f103 ("dt-bindings: PCI: rcar: Add bindings for R-Car PCIe endpoint controller")
> Signed-off-by: Geert Uytterhoeven <geert@linux-m68k.org>
> ---
> Alternatively, the interrupts properties should be removed from the
> corresponding device nodes in the DTS files.  Obviously they should be
> retained in the device nodes representing PCIe controllers configured in
> host mode, which describe the same hardware...

No, I think this patch is the right change. EP and host bindings should 
be similiar.

Fix your Sob and resend please.

Rob

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

end of thread, other threads:[~2020-12-08 18:01 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2020-11-26 11:59 [PATCH/RFC] dt-bindings: pci: rcar-pci-ep: Document missing interrupts property Geert Uytterhoeven
2020-11-30  9:16 ` Geert Uytterhoeven
2020-11-30 10:00 ` Lad, Prabhakar
2020-12-08 18:01 ` Rob Herring

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).