All of lore.kernel.org
 help / color / mirror / Atom feed
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Serge Semin <fancer.lancer@gmail.com>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Lin" <shawn.lin@rock-chips.com>,
	"Simon Xue" <xxm@rock-chips.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	kernel@collabora.com
Subject: [PATCH v2 1/3] dt-bindings: PCI: dwc: rockchip: Fix interrupt-names issue
Date: Thu, 13 Jul 2023 19:18:49 +0200	[thread overview]
Message-ID: <20230713171851.73052-2-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20230713171851.73052-1-sebastian.reichel@collabora.com>

The RK356x (and RK3588) have 5 ganged interrupts. For example the
"legacy" interrupt combines "inta/intb/intc/intd" with a register
providing the details.

Currently the binding is not specifying these interrupts resulting
in a bunch of errors for all rk356x boards using PCIe.

Fix this by specifying the interrupts and add them to the example
to prevent regressions.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../bindings/pci/rockchip-dw-pcie.yaml        | 18 +++++
 .../devicetree/bindings/pci/snps,dw-pcie.yaml | 76 ++++++++++++++++++-
 2 files changed, 93 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
index a4f61ced5e88..aad53c7d8485 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
@@ -60,6 +60,17 @@ properties:
       - const: aux
       - const: pipe
 
+  interrupts:
+    maxItems: 5
+
+  interrupt-names:
+    items:
+      - const: sys
+      - const: pmc
+      - const: msg
+      - const: legacy
+      - const: err
+
   msi-map: true
 
   num-lanes: true
@@ -108,6 +119,7 @@ unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
     bus {
         #address-cells = <2>;
@@ -127,6 +139,12 @@ examples:
                           "aclk_dbi", "pclk",
                           "aux";
             device_type = "pci";
+            interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "sys", "pmc", "msg", "legacy", "err";
             linux,pci-domain = <2>;
             max-link-speed = <2>;
             msi-map = <0x2000 &its 0x2000 0x1000>;
diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
index 1a83f0f65f19..973bf8f2730d 100644
--- a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
@@ -193,9 +193,83 @@ properties:
           oneOf:
             - description: See native "app" IRQ for details
               enum: [ intr ]
+        - description:
+            Combined legacy interrupt, which is used to signal the following
+            interrupts
+              * inta
+              * intb
+              * intc
+              * intd
+          const: legacy
+        - description:
+            Combined system interrupt, which is used to signal the following
+            interrupts
+              * phy_link_up
+              * dll_link_up
+              * link_req_rst_not
+              * hp_pme
+              * hp
+              * hp_msi
+              * link_auto_bw
+              * link_auto_bw_msi
+              * bw_mgt
+              * bw_mgt_msi
+              * edma_wr
+              * edma_rd
+              * dpa_sub_upd
+              * rbar_update
+              * link_eq_req
+              * ep_elbi_app
+          const: sys
+        - description:
+            Combined PM interrupt, which is used to signal the following
+            interrupts
+              * linkst_in_l1sub
+              * linkst_in_l1
+              * linkst_in_l2
+              * linkst_in_l0s
+              * linkst_out_l1sub
+              * linkst_out_l1
+              * linkst_out_l2
+              * linkst_out_l0s
+              * pm_dstate_update
+          const: pmc
+        - description:
+            Combined message interrupt, which is used to signal the following
+            interrupts
+              * ven_msg
+              * unlock_msg
+              * ltr_msg
+              * cfg_pme
+              * cfg_pme_msi
+              * pm_pme
+              * pm_to_ack
+              * pm_turnoff
+              * obff_idle
+              * obff_obff
+              * obff_cpu_active
+          const: msg
+        - description:
+            Combined error interrupt, which is used to signal the following
+            interrupts
+              * aer_rc_err
+              * aer_rc_err_msi
+              * rx_cpl_timeout
+              * tx_cpl_timeout
+              * cor_err_sent
+              * nf_err_sent
+              * f_err_sent
+              * cor_err_rx
+              * nf_err_rx
+              * f_err_rx
+              * radm_qoverflow
+          const: err
+
     allOf:
       - contains:
-          const: msi
+          enum:
+            - msi
+            - msg
 
 additionalProperties: true
 
-- 
2.40.1


WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Serge Semin <fancer.lancer@gmail.com>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Lin" <shawn.lin@rock-chips.com>,
	"Simon Xue" <xxm@rock-chips.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	kernel@collabora.com
Subject: [PATCH v2 1/3] dt-bindings: PCI: dwc: rockchip: Fix interrupt-names issue
Date: Thu, 13 Jul 2023 19:18:49 +0200	[thread overview]
Message-ID: <20230713171851.73052-2-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20230713171851.73052-1-sebastian.reichel@collabora.com>

The RK356x (and RK3588) have 5 ganged interrupts. For example the
"legacy" interrupt combines "inta/intb/intc/intd" with a register
providing the details.

Currently the binding is not specifying these interrupts resulting
in a bunch of errors for all rk356x boards using PCIe.

Fix this by specifying the interrupts and add them to the example
to prevent regressions.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../bindings/pci/rockchip-dw-pcie.yaml        | 18 +++++
 .../devicetree/bindings/pci/snps,dw-pcie.yaml | 76 ++++++++++++++++++-
 2 files changed, 93 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
index a4f61ced5e88..aad53c7d8485 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
@@ -60,6 +60,17 @@ properties:
       - const: aux
       - const: pipe
 
+  interrupts:
+    maxItems: 5
+
+  interrupt-names:
+    items:
+      - const: sys
+      - const: pmc
+      - const: msg
+      - const: legacy
+      - const: err
+
   msi-map: true
 
   num-lanes: true
@@ -108,6 +119,7 @@ unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
     bus {
         #address-cells = <2>;
@@ -127,6 +139,12 @@ examples:
                           "aclk_dbi", "pclk",
                           "aux";
             device_type = "pci";
+            interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "sys", "pmc", "msg", "legacy", "err";
             linux,pci-domain = <2>;
             max-link-speed = <2>;
             msi-map = <0x2000 &its 0x2000 0x1000>;
diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
index 1a83f0f65f19..973bf8f2730d 100644
--- a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
@@ -193,9 +193,83 @@ properties:
           oneOf:
             - description: See native "app" IRQ for details
               enum: [ intr ]
+        - description:
+            Combined legacy interrupt, which is used to signal the following
+            interrupts
+              * inta
+              * intb
+              * intc
+              * intd
+          const: legacy
+        - description:
+            Combined system interrupt, which is used to signal the following
+            interrupts
+              * phy_link_up
+              * dll_link_up
+              * link_req_rst_not
+              * hp_pme
+              * hp
+              * hp_msi
+              * link_auto_bw
+              * link_auto_bw_msi
+              * bw_mgt
+              * bw_mgt_msi
+              * edma_wr
+              * edma_rd
+              * dpa_sub_upd
+              * rbar_update
+              * link_eq_req
+              * ep_elbi_app
+          const: sys
+        - description:
+            Combined PM interrupt, which is used to signal the following
+            interrupts
+              * linkst_in_l1sub
+              * linkst_in_l1
+              * linkst_in_l2
+              * linkst_in_l0s
+              * linkst_out_l1sub
+              * linkst_out_l1
+              * linkst_out_l2
+              * linkst_out_l0s
+              * pm_dstate_update
+          const: pmc
+        - description:
+            Combined message interrupt, which is used to signal the following
+            interrupts
+              * ven_msg
+              * unlock_msg
+              * ltr_msg
+              * cfg_pme
+              * cfg_pme_msi
+              * pm_pme
+              * pm_to_ack
+              * pm_turnoff
+              * obff_idle
+              * obff_obff
+              * obff_cpu_active
+          const: msg
+        - description:
+            Combined error interrupt, which is used to signal the following
+            interrupts
+              * aer_rc_err
+              * aer_rc_err_msi
+              * rx_cpl_timeout
+              * tx_cpl_timeout
+              * cor_err_sent
+              * nf_err_sent
+              * f_err_sent
+              * cor_err_rx
+              * nf_err_rx
+              * f_err_rx
+              * radm_qoverflow
+          const: err
+
     allOf:
       - contains:
-          const: msi
+          enum:
+            - msi
+            - msg
 
 additionalProperties: true
 
-- 
2.40.1


_______________________________________________
Linux-rockchip mailing list
Linux-rockchip@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-rockchip

WARNING: multiple messages have this Message-ID (diff)
From: Sebastian Reichel <sebastian.reichel@collabora.com>
To: linux-pci@vger.kernel.org, linux-rockchip@lists.infradead.org,
	Serge Semin <fancer.lancer@gmail.com>
Cc: "Jingoo Han" <jingoohan1@gmail.com>,
	"Gustavo Pimentel" <gustavo.pimentel@synopsys.com>,
	"Bjorn Helgaas" <bhelgaas@google.com>,
	"Lorenzo Pieralisi" <lpieralisi@kernel.org>,
	"Krzysztof Wilczyński" <kw@linux.com>,
	"Rob Herring" <robh@kernel.org>,
	"Krzysztof Kozlowski" <krzysztof.kozlowski+dt@linaro.org>,
	"Conor Dooley" <conor+dt@kernel.org>,
	"Heiko Stuebner" <heiko@sntech.de>,
	"Shawn Lin" <shawn.lin@rock-chips.com>,
	"Simon Xue" <xxm@rock-chips.com>,
	devicetree@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-arm-kernel@lists.infradead.org,
	"Sebastian Reichel" <sebastian.reichel@collabora.com>,
	kernel@collabora.com
Subject: [PATCH v2 1/3] dt-bindings: PCI: dwc: rockchip: Fix interrupt-names issue
Date: Thu, 13 Jul 2023 19:18:49 +0200	[thread overview]
Message-ID: <20230713171851.73052-2-sebastian.reichel@collabora.com> (raw)
In-Reply-To: <20230713171851.73052-1-sebastian.reichel@collabora.com>

The RK356x (and RK3588) have 5 ganged interrupts. For example the
"legacy" interrupt combines "inta/intb/intc/intd" with a register
providing the details.

Currently the binding is not specifying these interrupts resulting
in a bunch of errors for all rk356x boards using PCIe.

Fix this by specifying the interrupts and add them to the example
to prevent regressions.

Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com>
---
 .../bindings/pci/rockchip-dw-pcie.yaml        | 18 +++++
 .../devicetree/bindings/pci/snps,dw-pcie.yaml | 76 ++++++++++++++++++-
 2 files changed, 93 insertions(+), 1 deletion(-)

diff --git a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
index a4f61ced5e88..aad53c7d8485 100644
--- a/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/rockchip-dw-pcie.yaml
@@ -60,6 +60,17 @@ properties:
       - const: aux
       - const: pipe
 
+  interrupts:
+    maxItems: 5
+
+  interrupt-names:
+    items:
+      - const: sys
+      - const: pmc
+      - const: msg
+      - const: legacy
+      - const: err
+
   msi-map: true
 
   num-lanes: true
@@ -108,6 +119,7 @@ unevaluatedProperties: false
 
 examples:
   - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
 
     bus {
         #address-cells = <2>;
@@ -127,6 +139,12 @@ examples:
                           "aclk_dbi", "pclk",
                           "aux";
             device_type = "pci";
+            interrupts = <GIC_SPI 160 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 159 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 158 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 157 IRQ_TYPE_LEVEL_HIGH>,
+                         <GIC_SPI 156 IRQ_TYPE_LEVEL_HIGH>;
+            interrupt-names = "sys", "pmc", "msg", "legacy", "err";
             linux,pci-domain = <2>;
             max-link-speed = <2>;
             msi-map = <0x2000 &its 0x2000 0x1000>;
diff --git a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
index 1a83f0f65f19..973bf8f2730d 100644
--- a/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
+++ b/Documentation/devicetree/bindings/pci/snps,dw-pcie.yaml
@@ -193,9 +193,83 @@ properties:
           oneOf:
             - description: See native "app" IRQ for details
               enum: [ intr ]
+        - description:
+            Combined legacy interrupt, which is used to signal the following
+            interrupts
+              * inta
+              * intb
+              * intc
+              * intd
+          const: legacy
+        - description:
+            Combined system interrupt, which is used to signal the following
+            interrupts
+              * phy_link_up
+              * dll_link_up
+              * link_req_rst_not
+              * hp_pme
+              * hp
+              * hp_msi
+              * link_auto_bw
+              * link_auto_bw_msi
+              * bw_mgt
+              * bw_mgt_msi
+              * edma_wr
+              * edma_rd
+              * dpa_sub_upd
+              * rbar_update
+              * link_eq_req
+              * ep_elbi_app
+          const: sys
+        - description:
+            Combined PM interrupt, which is used to signal the following
+            interrupts
+              * linkst_in_l1sub
+              * linkst_in_l1
+              * linkst_in_l2
+              * linkst_in_l0s
+              * linkst_out_l1sub
+              * linkst_out_l1
+              * linkst_out_l2
+              * linkst_out_l0s
+              * pm_dstate_update
+          const: pmc
+        - description:
+            Combined message interrupt, which is used to signal the following
+            interrupts
+              * ven_msg
+              * unlock_msg
+              * ltr_msg
+              * cfg_pme
+              * cfg_pme_msi
+              * pm_pme
+              * pm_to_ack
+              * pm_turnoff
+              * obff_idle
+              * obff_obff
+              * obff_cpu_active
+          const: msg
+        - description:
+            Combined error interrupt, which is used to signal the following
+            interrupts
+              * aer_rc_err
+              * aer_rc_err_msi
+              * rx_cpl_timeout
+              * tx_cpl_timeout
+              * cor_err_sent
+              * nf_err_sent
+              * f_err_sent
+              * cor_err_rx
+              * nf_err_rx
+              * f_err_rx
+              * radm_qoverflow
+          const: err
+
     allOf:
       - contains:
-          const: msi
+          enum:
+            - msi
+            - msg
 
 additionalProperties: true
 
-- 
2.40.1


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

  reply	other threads:[~2023-07-13 17:19 UTC|newest]

Thread overview: 36+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-07-13 17:18 [PATCH v2 0/3] RK3588 PCIe2 support Sebastian Reichel
2023-07-13 17:18 ` Sebastian Reichel
2023-07-13 17:18 ` Sebastian Reichel
2023-07-13 17:18 ` Sebastian Reichel [this message]
2023-07-13 17:18   ` [PATCH v2 1/3] dt-bindings: PCI: dwc: rockchip: Fix interrupt-names issue Sebastian Reichel
2023-07-13 17:18   ` Sebastian Reichel
2023-07-14 17:25   ` Serge Semin
2023-07-14 17:25     ` Serge Semin
2023-07-14 17:25     ` Serge Semin
2023-07-14 22:44     ` Sebastian Reichel
2023-07-14 22:44       ` Sebastian Reichel
2023-07-14 22:44       ` Sebastian Reichel
2023-07-15 16:41       ` Serge Semin
2023-07-15 16:41         ` Serge Semin
2023-07-15 16:41         ` Serge Semin
2023-07-13 17:18 ` [PATCH v2 2/3] dt-bindings: PCI: dwc: rockchip: Add missing legacy-interrupt-controller Sebastian Reichel
2023-07-13 17:18   ` Sebastian Reichel
2023-07-13 17:18   ` Sebastian Reichel
2023-07-13 17:18 ` [PATCH v2 3/3] arm64: dts: rockchip: rk3588: add PCIe2 support Sebastian Reichel
2023-07-13 17:18   ` Sebastian Reichel
2023-07-13 17:18   ` Sebastian Reichel
2023-07-14 14:02   ` Jagan Teki
2023-07-14 14:02     ` Jagan Teki
2023-07-14 14:02     ` Jagan Teki
2023-07-14 17:30   ` Serge Semin
2023-07-14 17:30     ` Serge Semin
2023-07-14 17:30     ` Serge Semin
2023-07-13 20:09 ` [PATCH v2 0/3] RK3588 " Heiko Stuebner
2023-07-13 20:09   ` Heiko Stuebner
2023-07-13 20:09   ` Heiko Stuebner
2023-07-13 20:48   ` Sebastian Reichel
2023-07-13 20:48     ` Sebastian Reichel
2023-07-13 20:48     ` Sebastian Reichel
2023-07-14 11:54     ` Heiko Stuebner
2023-07-14 11:54       ` Heiko Stuebner
2023-07-14 11:54       ` Heiko Stuebner

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20230713171851.73052-2-sebastian.reichel@collabora.com \
    --to=sebastian.reichel@collabora.com \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=fancer.lancer@gmail.com \
    --cc=gustavo.pimentel@synopsys.com \
    --cc=heiko@sntech.de \
    --cc=jingoohan1@gmail.com \
    --cc=kernel@collabora.com \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=lpieralisi@kernel.org \
    --cc=robh@kernel.org \
    --cc=shawn.lin@rock-chips.com \
    --cc=xxm@rock-chips.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.