Linux-PCI Archive mirror
 help / color / mirror / Atom feed
From: Mayank Rana <quic_mrana@quicinc.com>
To: <linux-pci@vger.kernel.org>, <lpieralisi@kernel.org>,
	<kw@linux.com>, <robh@kernel.org>, <bhelgaas@google.com>,
	<andersson@kernel.org>, <manivannan.sadhasivam@linaro.org>,
	<krzysztof.kozlowski+dt@linaro.org>, <conor+dt@kernel.org>,
	<devicetree@vger.kernel.org>
Cc: <linux-arm-msm@vger.kernel.org>, <quic_ramkri@quicinc.com>,
	<quic_nkela@quicinc.com>, <quic_shazhuss@quicinc.com>,
	<quic_msarkar@quicinc.com>, <quic_nitegupt@quicinc.com>,
	Mayank Rana <quic_mrana@quicinc.com>
Subject: [RFC PATCH 1/2] dt-bindings: pcie: Document QCOM PCIE ECAM compatible root complex
Date: Thu, 4 Apr 2024 12:11:23 -0700	[thread overview]
Message-ID: <1712257884-23841-2-git-send-email-quic_mrana@quicinc.com> (raw)
In-Reply-To: <1712257884-23841-1-git-send-email-quic_mrana@quicinc.com>

On some of Qualcomm platform, firmware configures PCIe controller in RC
mode with static iATU window mappings of configuration space for entire
supported bus range in ECAM compatible mode. Firmware also manages PCIe
PHY as well required system resources. Here document properties and
required configuration to power up QCOM PCIe ECAM compatible root complex
and PHY for PCIe functionality.

Signed-off-by: Mayank Rana <quic_mrana@quicinc.com>
---
 .../devicetree/bindings/pci/qcom,pcie-ecam.yaml    | 94 ++++++++++++++++++++++
 1 file changed, 94 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/pci/qcom,pcie-ecam.yaml

diff --git a/Documentation/devicetree/bindings/pci/qcom,pcie-ecam.yaml b/Documentation/devicetree/bindings/pci/qcom,pcie-ecam.yaml
new file mode 100644
index 00000000..c209f12
--- /dev/null
+++ b/Documentation/devicetree/bindings/pci/qcom,pcie-ecam.yaml
@@ -0,0 +1,94 @@
+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
+%YAML 1.2
+---
+$id: http://devicetree.org/schemas/pci/qcom,pcie-ecam.yaml#
+$schema: http://devicetree.org/meta-schemas/core.yaml#
+
+title: Qualcomm ECAM compliant PCI express root complex
+
+description: |
+  Qualcomm SOC based ECAM compatible PCIe root complex supporting MSI controller.
+  Firmware configures PCIe controller in RC mode with static iATU window mappings
+  of configuration space for entire supported bus range in ECAM compatible mode.
+
+maintainers:
+  - Mayank Rana <quic_mrana@quicinc.com>
+
+allOf:
+  - $ref: /schemas/pci/pci-bus.yaml#
+  - $ref: /schemas/power-domain/power-domain-consumer.yaml
+
+properties:
+  compatible:
+    const: qcom,pcie-ecam-rc
+
+  reg:
+    minItems: 1
+    description: ECAM address space starting from root port till supported bus range
+
+  interrupts:
+    minItems: 1
+    maxItems: 8
+
+  ranges:
+    minItems: 2
+    maxItems: 3
+
+  iommu-map:
+    minItems: 1
+    maxItems: 16
+
+  power-domains:
+    maxItems: 1
+    description: A phandle to node which is able support way to communicate with firmware
+        for enabling PCIe controller and PHY as well managing all system resources needed to
+        make both controller and PHY operational for PCIe functionality.
+
+  dma-coherent: true
+
+required:
+  - compatible
+  - reg
+  - interrupts
+  - ranges
+  - power-domains
+  - device_type
+  - linux,pci-domain
+  - bus-range
+
+unevaluatedProperties: false
+
+examples:
+  - |
+    #include <dt-bindings/interrupt-controller/arm-gic.h>
+    soc {
+        #address-cells = <2>;
+        #size-cells = <2>;
+        pcie0: pci@1c00000 {
+            compatible = "qcom,pcie-ecam-rc";
+            reg = <0x4 0x00000000 0 0x10000000>;
+            device_type = "pci";
+            #address-cells = <3>;
+            #size-cells = <2>;
+            ranges = <0x01000000 0x0 0x40000000 0x0 0x40000000 0x0 0x100000>,
+                <0x02000000 0x0 0x40100000 0x0 0x40100000 0x0 0x1ff00000>,
+                <0x43000000 0x4 0x10100000 0x4 0x10100000 0x0 0x100000>;
+            bus-range = <0x00 0xff>;
+            dma-coherent;
+            linux,pci-domain = <0>;
+            power-domains = <&scmi5_pd 0>;
+            power-domain-names = "power";
+            iommu-map = <0x0 &pcie_smmu 0x0000 0x1>,
+                  <0x100 &pcie_smmu 0x0001 0x1>;
+            interrupt-parent = <&intc>;
+            interrupts = <GIC_SPI 307 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 308 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 309 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 312 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 313 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 314 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 374 IRQ_TYPE_LEVEL_HIGH>,
+                <GIC_SPI 375 IRQ_TYPE_LEVEL_HIGH>;
+        };
+    };
+...
-- 
2.7.4


  reply	other threads:[~2024-04-04 19:11 UTC|newest]

Thread overview: 22+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-04 19:11 [RFC PATCH 0/2] Add Qualcomm PCIe ECAM root complex driver Mayank Rana
2024-04-04 19:11 ` Mayank Rana [this message]
2024-04-04 19:30   ` [RFC PATCH 1/2] dt-bindings: pcie: Document QCOM PCIE ECAM compatible root complex Krzysztof Kozlowski
2024-04-08 19:09     ` Mayank Rana
2024-04-09  6:21       ` Krzysztof Kozlowski
2024-04-18 18:56         ` Mayank Rana
2024-04-18 20:53           ` Krzysztof Kozlowski
2024-04-04 19:11 ` [RFC PATCH 2/2] PCI: Add Qualcomm PCIe ECAM root complex driver Mayank Rana
2024-04-04 19:33   ` Krzysztof Kozlowski
2024-04-05  5:30   ` Manivannan Sadhasivam
2024-04-05 17:41     ` Mayank Rana
2024-04-06  4:17       ` Manivannan Sadhasivam
2024-04-08 18:57         ` Mayank Rana
2024-04-10  6:26           ` Manivannan Sadhasivam
2024-04-10 16:58           ` Rob Herring
2024-04-15 23:30             ` Mayank Rana
2024-04-05 18:30   ` Bjorn Helgaas
2024-04-06  0:43     ` Mayank Rana
2024-04-04 19:33 ` [RFC PATCH 0/2] " Krzysztof Kozlowski
2024-04-04 23:02   ` Mayank Rana
2024-04-05  6:50     ` Krzysztof Kozlowski
2024-04-05 17:45       ` Mayank Rana

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=1712257884-23841-2-git-send-email-quic_mrana@quicinc.com \
    --to=quic_mrana@quicinc.com \
    --cc=andersson@kernel.org \
    --cc=bhelgaas@google.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=krzysztof.kozlowski+dt@linaro.org \
    --cc=kw@linux.com \
    --cc=linux-arm-msm@vger.kernel.org \
    --cc=linux-pci@vger.kernel.org \
    --cc=lpieralisi@kernel.org \
    --cc=manivannan.sadhasivam@linaro.org \
    --cc=quic_msarkar@quicinc.com \
    --cc=quic_nitegupt@quicinc.com \
    --cc=quic_nkela@quicinc.com \
    --cc=quic_ramkri@quicinc.com \
    --cc=quic_shazhuss@quicinc.com \
    --cc=robh@kernel.org \
    /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 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 read-only IMAP folder(s) and NNTP newsgroup(s).