xref: /freebsd/sys/contrib/device-tree/Bindings/pci/qcom,pcie-x1e80100.yaml (revision 0e8011faf58b743cc652e3b2ad0f7671227610df)
101950c46SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
201950c46SEmmanuel Vadot%YAML 1.2
301950c46SEmmanuel Vadot---
401950c46SEmmanuel Vadot$id: http://devicetree.org/schemas/pci/qcom,pcie-x1e80100.yaml#
501950c46SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
601950c46SEmmanuel Vadot
701950c46SEmmanuel Vadottitle: Qualcomm X1E80100 PCI Express Root Complex
801950c46SEmmanuel Vadot
901950c46SEmmanuel Vadotmaintainers:
1001950c46SEmmanuel Vadot  - Bjorn Andersson <andersson@kernel.org>
1101950c46SEmmanuel Vadot  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
1201950c46SEmmanuel Vadot
1301950c46SEmmanuel Vadotdescription:
1401950c46SEmmanuel Vadot  Qualcomm X1E80100 SoC (and compatible) PCIe root complex controller is based on
1501950c46SEmmanuel Vadot  the Synopsys DesignWare PCIe IP.
1601950c46SEmmanuel Vadot
1701950c46SEmmanuel Vadotproperties:
1801950c46SEmmanuel Vadot  compatible:
1901950c46SEmmanuel Vadot    const: qcom,pcie-x1e80100
2001950c46SEmmanuel Vadot
2101950c46SEmmanuel Vadot  reg:
22*0e8011faSEmmanuel Vadot    minItems: 6
2301950c46SEmmanuel Vadot    maxItems: 6
2401950c46SEmmanuel Vadot
2501950c46SEmmanuel Vadot  reg-names:
2601950c46SEmmanuel Vadot    items:
2701950c46SEmmanuel Vadot      - const: parf # Qualcomm specific registers
2801950c46SEmmanuel Vadot      - const: dbi # DesignWare PCIe registers
2901950c46SEmmanuel Vadot      - const: elbi # External local bus interface registers
3001950c46SEmmanuel Vadot      - const: atu # ATU address space
3101950c46SEmmanuel Vadot      - const: config # PCIe configuration space
3201950c46SEmmanuel Vadot      - const: mhi # MHI registers
3301950c46SEmmanuel Vadot
3401950c46SEmmanuel Vadot  clocks:
3501950c46SEmmanuel Vadot    minItems: 7
3601950c46SEmmanuel Vadot    maxItems: 7
3701950c46SEmmanuel Vadot
3801950c46SEmmanuel Vadot  clock-names:
3901950c46SEmmanuel Vadot    items:
4001950c46SEmmanuel Vadot      - const: aux # Auxiliary clock
4101950c46SEmmanuel Vadot      - const: cfg # Configuration clock
4201950c46SEmmanuel Vadot      - const: bus_master # Master AXI clock
4301950c46SEmmanuel Vadot      - const: bus_slave # Slave AXI clock
4401950c46SEmmanuel Vadot      - const: slave_q2a # Slave Q2A clock
4501950c46SEmmanuel Vadot      - const: noc_aggr # Aggre NoC PCIe AXI clock
4601950c46SEmmanuel Vadot      - const: cnoc_sf_axi # Config NoC PCIe1 AXI clock
4701950c46SEmmanuel Vadot
4801950c46SEmmanuel Vadot  interrupts:
4901950c46SEmmanuel Vadot    minItems: 8
5001950c46SEmmanuel Vadot    maxItems: 8
5101950c46SEmmanuel Vadot
5201950c46SEmmanuel Vadot  interrupt-names:
5301950c46SEmmanuel Vadot    items:
5401950c46SEmmanuel Vadot      - const: msi0
5501950c46SEmmanuel Vadot      - const: msi1
5601950c46SEmmanuel Vadot      - const: msi2
5701950c46SEmmanuel Vadot      - const: msi3
5801950c46SEmmanuel Vadot      - const: msi4
5901950c46SEmmanuel Vadot      - const: msi5
6001950c46SEmmanuel Vadot      - const: msi6
6101950c46SEmmanuel Vadot      - const: msi7
6201950c46SEmmanuel Vadot
6301950c46SEmmanuel Vadot  resets:
6401950c46SEmmanuel Vadot    minItems: 1
6501950c46SEmmanuel Vadot    maxItems: 2
6601950c46SEmmanuel Vadot
6701950c46SEmmanuel Vadot  reset-names:
6801950c46SEmmanuel Vadot    minItems: 1
6901950c46SEmmanuel Vadot    items:
7001950c46SEmmanuel Vadot      - const: pci # PCIe core reset
7101950c46SEmmanuel Vadot      - const: link_down # PCIe link down reset
7201950c46SEmmanuel Vadot
7301950c46SEmmanuel VadotallOf:
7401950c46SEmmanuel Vadot  - $ref: qcom,pcie-common.yaml#
7501950c46SEmmanuel Vadot
7601950c46SEmmanuel VadotunevaluatedProperties: false
7701950c46SEmmanuel Vadot
7801950c46SEmmanuel Vadotexamples:
7901950c46SEmmanuel Vadot  - |
8001950c46SEmmanuel Vadot    #include <dt-bindings/clock/qcom,x1e80100-gcc.h>
8101950c46SEmmanuel Vadot    #include <dt-bindings/gpio/gpio.h>
8201950c46SEmmanuel Vadot    #include <dt-bindings/interconnect/qcom,x1e80100-rpmh.h>
8301950c46SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
8401950c46SEmmanuel Vadot
8501950c46SEmmanuel Vadot    soc {
8601950c46SEmmanuel Vadot        #address-cells = <2>;
8701950c46SEmmanuel Vadot        #size-cells = <2>;
8801950c46SEmmanuel Vadot
8901950c46SEmmanuel Vadot        pcie@1c08000 {
9001950c46SEmmanuel Vadot            compatible = "qcom,pcie-x1e80100";
9101950c46SEmmanuel Vadot            reg = <0 0x01c08000 0 0x3000>,
9201950c46SEmmanuel Vadot                  <0 0x7c000000 0 0xf1d>,
9301950c46SEmmanuel Vadot                  <0 0x7c000f40 0 0xa8>,
9401950c46SEmmanuel Vadot                  <0 0x7c001000 0 0x1000>,
9501950c46SEmmanuel Vadot                  <0 0x7c100000 0 0x100000>,
9601950c46SEmmanuel Vadot                  <0 0x01c0b000 0 0x1000>;
9701950c46SEmmanuel Vadot            reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi";
9801950c46SEmmanuel Vadot            ranges = <0x01000000 0x0 0x00000000 0x0 0x60200000 0x0 0x100000>,
9901950c46SEmmanuel Vadot                     <0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0x3d00000>;
10001950c46SEmmanuel Vadot
10101950c46SEmmanuel Vadot            bus-range = <0x00 0xff>;
10201950c46SEmmanuel Vadot            device_type = "pci";
10301950c46SEmmanuel Vadot            linux,pci-domain = <0>;
10401950c46SEmmanuel Vadot            num-lanes = <2>;
10501950c46SEmmanuel Vadot
10601950c46SEmmanuel Vadot            #address-cells = <3>;
10701950c46SEmmanuel Vadot            #size-cells = <2>;
10801950c46SEmmanuel Vadot
10901950c46SEmmanuel Vadot            clocks = <&gcc GCC_PCIE_4_AUX_CLK>,
11001950c46SEmmanuel Vadot                     <&gcc GCC_PCIE_4_CFG_AHB_CLK>,
11101950c46SEmmanuel Vadot                     <&gcc GCC_PCIE_4_MSTR_AXI_CLK>,
11201950c46SEmmanuel Vadot                     <&gcc GCC_PCIE_4_SLV_AXI_CLK>,
11301950c46SEmmanuel Vadot                     <&gcc GCC_PCIE_4_SLV_Q2A_AXI_CLK>,
11401950c46SEmmanuel Vadot                     <&gcc GCC_CFG_NOC_PCIE_ANOC_NORTH_AHB_CLK>,
11501950c46SEmmanuel Vadot                     <&gcc GCC_CNOC_PCIE_NORTH_SF_AXI_CLK>;
11601950c46SEmmanuel Vadot            clock-names = "aux",
11701950c46SEmmanuel Vadot                          "cfg",
11801950c46SEmmanuel Vadot                          "bus_master",
11901950c46SEmmanuel Vadot                          "bus_slave",
12001950c46SEmmanuel Vadot                          "slave_q2a",
12101950c46SEmmanuel Vadot                          "noc_aggr",
12201950c46SEmmanuel Vadot                          "cnoc_sf_axi";
12301950c46SEmmanuel Vadot
12401950c46SEmmanuel Vadot            dma-coherent;
12501950c46SEmmanuel Vadot
12601950c46SEmmanuel Vadot            interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
12701950c46SEmmanuel Vadot                         <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
12801950c46SEmmanuel Vadot                         <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
12901950c46SEmmanuel Vadot                         <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
13001950c46SEmmanuel Vadot                         <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
13101950c46SEmmanuel Vadot                         <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
13201950c46SEmmanuel Vadot                         <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
13301950c46SEmmanuel Vadot                         <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
13401950c46SEmmanuel Vadot            interrupt-names = "msi0", "msi1", "msi2", "msi3",
13501950c46SEmmanuel Vadot                              "msi4", "msi5", "msi6", "msi7";
13601950c46SEmmanuel Vadot            #interrupt-cells = <1>;
13701950c46SEmmanuel Vadot            interrupt-map-mask = <0 0 0 0x7>;
13801950c46SEmmanuel Vadot            interrupt-map = <0 0 0 1 &intc 0 0 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
13901950c46SEmmanuel Vadot                            <0 0 0 2 &intc 0 0 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
14001950c46SEmmanuel Vadot                            <0 0 0 3 &intc 0 0 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
14101950c46SEmmanuel Vadot                            <0 0 0 4 &intc 0 0 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
14201950c46SEmmanuel Vadot
14301950c46SEmmanuel Vadot            interconnects = <&pcie_noc MASTER_PCIE_4 0 &mc_virt SLAVE_EBI1 0>,
14401950c46SEmmanuel Vadot                            <&gem_noc MASTER_APPSS_PROC 0 &cnoc_main SLAVE_PCIE_4 0>;
14501950c46SEmmanuel Vadot            interconnect-names = "pcie-mem", "cpu-pcie";
14601950c46SEmmanuel Vadot
14701950c46SEmmanuel Vadot            iommu-map = <0x0 &apps_smmu 0x1400 0x1>,
14801950c46SEmmanuel Vadot                        <0x100 &apps_smmu 0x1401 0x1>;
14901950c46SEmmanuel Vadot
15001950c46SEmmanuel Vadot            phys = <&pcie4_phy>;
15101950c46SEmmanuel Vadot            phy-names = "pciephy";
15201950c46SEmmanuel Vadot
15301950c46SEmmanuel Vadot            pinctrl-0 = <&pcie0_default_state>;
15401950c46SEmmanuel Vadot            pinctrl-names = "default";
15501950c46SEmmanuel Vadot
15601950c46SEmmanuel Vadot            power-domains = <&gcc GCC_PCIE_4_GDSC>;
15701950c46SEmmanuel Vadot
15801950c46SEmmanuel Vadot            resets = <&gcc GCC_PCIE_4_BCR>;
15901950c46SEmmanuel Vadot            reset-names = "pci";
16001950c46SEmmanuel Vadot
16101950c46SEmmanuel Vadot            perst-gpios = <&tlmm 94 GPIO_ACTIVE_LOW>;
16201950c46SEmmanuel Vadot            wake-gpios = <&tlmm 96 GPIO_ACTIVE_HIGH>;
16301950c46SEmmanuel Vadot        };
16401950c46SEmmanuel Vadot    };
165