xref: /linux/Documentation/devicetree/bindings/pci/qcom,pcie-sm8250.yaml (revision 79790b6818e96c58fe2bffee1b418c16e64e7b80)
1*4891b661SKrzysztof Kozlowski# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*4891b661SKrzysztof Kozlowski%YAML 1.2
3*4891b661SKrzysztof Kozlowski---
4*4891b661SKrzysztof Kozlowski$id: http://devicetree.org/schemas/pci/qcom,pcie-sm8250.yaml#
5*4891b661SKrzysztof Kozlowski$schema: http://devicetree.org/meta-schemas/core.yaml#
6*4891b661SKrzysztof Kozlowski
7*4891b661SKrzysztof Kozlowskititle: Qualcomm SM8250 PCI Express Root Complex
8*4891b661SKrzysztof Kozlowski
9*4891b661SKrzysztof Kozlowskimaintainers:
10*4891b661SKrzysztof Kozlowski  - Bjorn Andersson <andersson@kernel.org>
11*4891b661SKrzysztof Kozlowski  - Manivannan Sadhasivam <manivannan.sadhasivam@linaro.org>
12*4891b661SKrzysztof Kozlowski
13*4891b661SKrzysztof Kozlowskidescription:
14*4891b661SKrzysztof Kozlowski  Qualcomm SM8250 SoC PCIe root complex controller is based on the Synopsys
15*4891b661SKrzysztof Kozlowski  DesignWare PCIe IP.
16*4891b661SKrzysztof Kozlowski
17*4891b661SKrzysztof Kozlowskiproperties:
18*4891b661SKrzysztof Kozlowski  compatible:
19*4891b661SKrzysztof Kozlowski    const: qcom,pcie-sm8250
20*4891b661SKrzysztof Kozlowski
21*4891b661SKrzysztof Kozlowski  reg:
22*4891b661SKrzysztof Kozlowski    minItems: 5
23*4891b661SKrzysztof Kozlowski    maxItems: 6
24*4891b661SKrzysztof Kozlowski
25*4891b661SKrzysztof Kozlowski  reg-names:
26*4891b661SKrzysztof Kozlowski    minItems: 5
27*4891b661SKrzysztof Kozlowski    items:
28*4891b661SKrzysztof Kozlowski      - const: parf # Qualcomm specific registers
29*4891b661SKrzysztof Kozlowski      - const: dbi # DesignWare PCIe registers
30*4891b661SKrzysztof Kozlowski      - const: elbi # External local bus interface registers
31*4891b661SKrzysztof Kozlowski      - const: atu # ATU address space
32*4891b661SKrzysztof Kozlowski      - const: config # PCIe configuration space
33*4891b661SKrzysztof Kozlowski      - const: mhi # MHI registers
34*4891b661SKrzysztof Kozlowski
35*4891b661SKrzysztof Kozlowski  clocks:
36*4891b661SKrzysztof Kozlowski    minItems: 8
37*4891b661SKrzysztof Kozlowski    maxItems: 9
38*4891b661SKrzysztof Kozlowski
39*4891b661SKrzysztof Kozlowski  clock-names:
40*4891b661SKrzysztof Kozlowski    # Unfortunately the "optional" ref clock is used in the middle of the list
41*4891b661SKrzysztof Kozlowski    oneOf:
42*4891b661SKrzysztof Kozlowski      - items:
43*4891b661SKrzysztof Kozlowski          - const: pipe # PIPE clock
44*4891b661SKrzysztof Kozlowski          - const: aux # Auxiliary clock
45*4891b661SKrzysztof Kozlowski          - const: cfg # Configuration clock
46*4891b661SKrzysztof Kozlowski          - const: bus_master # Master AXI clock
47*4891b661SKrzysztof Kozlowski          - const: bus_slave # Slave AXI clock
48*4891b661SKrzysztof Kozlowski          - const: slave_q2a # Slave Q2A clock
49*4891b661SKrzysztof Kozlowski          - const: ref # REFERENCE clock
50*4891b661SKrzysztof Kozlowski          - const: tbu # PCIe TBU clock
51*4891b661SKrzysztof Kozlowski          - const: ddrss_sf_tbu # PCIe SF TBU clock
52*4891b661SKrzysztof Kozlowski      - items:
53*4891b661SKrzysztof Kozlowski          - const: pipe # PIPE clock
54*4891b661SKrzysztof Kozlowski          - const: aux # Auxiliary clock
55*4891b661SKrzysztof Kozlowski          - const: cfg # Configuration clock
56*4891b661SKrzysztof Kozlowski          - const: bus_master # Master AXI clock
57*4891b661SKrzysztof Kozlowski          - const: bus_slave # Slave AXI clock
58*4891b661SKrzysztof Kozlowski          - const: slave_q2a # Slave Q2A clock
59*4891b661SKrzysztof Kozlowski          - const: tbu # PCIe TBU clock
60*4891b661SKrzysztof Kozlowski          - const: ddrss_sf_tbu # PCIe SF TBU clock
61*4891b661SKrzysztof Kozlowski
62*4891b661SKrzysztof Kozlowski  interrupts:
63*4891b661SKrzysztof Kozlowski    minItems: 8
64*4891b661SKrzysztof Kozlowski    maxItems: 8
65*4891b661SKrzysztof Kozlowski
66*4891b661SKrzysztof Kozlowski  interrupt-names:
67*4891b661SKrzysztof Kozlowski    items:
68*4891b661SKrzysztof Kozlowski      - const: msi0
69*4891b661SKrzysztof Kozlowski      - const: msi1
70*4891b661SKrzysztof Kozlowski      - const: msi2
71*4891b661SKrzysztof Kozlowski      - const: msi3
72*4891b661SKrzysztof Kozlowski      - const: msi4
73*4891b661SKrzysztof Kozlowski      - const: msi5
74*4891b661SKrzysztof Kozlowski      - const: msi6
75*4891b661SKrzysztof Kozlowski      - const: msi7
76*4891b661SKrzysztof Kozlowski
77*4891b661SKrzysztof Kozlowski  resets:
78*4891b661SKrzysztof Kozlowski    maxItems: 1
79*4891b661SKrzysztof Kozlowski
80*4891b661SKrzysztof Kozlowski  reset-names:
81*4891b661SKrzysztof Kozlowski    items:
82*4891b661SKrzysztof Kozlowski      - const: pci
83*4891b661SKrzysztof Kozlowski
84*4891b661SKrzysztof KozlowskiallOf:
85*4891b661SKrzysztof Kozlowski  - $ref: qcom,pcie-common.yaml#
86*4891b661SKrzysztof Kozlowski
87*4891b661SKrzysztof KozlowskiunevaluatedProperties: false
88*4891b661SKrzysztof Kozlowski
89*4891b661SKrzysztof Kozlowskiexamples:
90*4891b661SKrzysztof Kozlowski  - |
91*4891b661SKrzysztof Kozlowski    #include <dt-bindings/clock/qcom,gcc-sm8250.h>
92*4891b661SKrzysztof Kozlowski    #include <dt-bindings/gpio/gpio.h>
93*4891b661SKrzysztof Kozlowski    #include <dt-bindings/interconnect/qcom,sm8250.h>
94*4891b661SKrzysztof Kozlowski    #include <dt-bindings/interrupt-controller/arm-gic.h>
95*4891b661SKrzysztof Kozlowski
96*4891b661SKrzysztof Kozlowski    soc {
97*4891b661SKrzysztof Kozlowski        #address-cells = <2>;
98*4891b661SKrzysztof Kozlowski        #size-cells = <2>;
99*4891b661SKrzysztof Kozlowski
100*4891b661SKrzysztof Kozlowski        pcie@1c00000 {
101*4891b661SKrzysztof Kozlowski            compatible = "qcom,pcie-sm8250";
102*4891b661SKrzysztof Kozlowski            reg = <0 0x01c00000 0 0x3000>,
103*4891b661SKrzysztof Kozlowski                  <0 0x60000000 0 0xf1d>,
104*4891b661SKrzysztof Kozlowski                  <0 0x60000f20 0 0xa8>,
105*4891b661SKrzysztof Kozlowski                  <0 0x60001000 0 0x1000>,
106*4891b661SKrzysztof Kozlowski                  <0 0x60100000 0 0x100000>,
107*4891b661SKrzysztof Kozlowski                  <0 0x01c03000 0 0x1000>;
108*4891b661SKrzysztof Kozlowski            reg-names = "parf", "dbi", "elbi", "atu", "config", "mhi";
109*4891b661SKrzysztof Kozlowski            ranges = <0x01000000 0x0 0x00000000 0x0 0x60200000 0x0 0x100000>,
110*4891b661SKrzysztof Kozlowski                     <0x02000000 0x0 0x60300000 0x0 0x60300000 0x0 0x3d00000>;
111*4891b661SKrzysztof Kozlowski
112*4891b661SKrzysztof Kozlowski            bus-range = <0x00 0xff>;
113*4891b661SKrzysztof Kozlowski            device_type = "pci";
114*4891b661SKrzysztof Kozlowski            linux,pci-domain = <0>;
115*4891b661SKrzysztof Kozlowski            num-lanes = <1>;
116*4891b661SKrzysztof Kozlowski
117*4891b661SKrzysztof Kozlowski            #address-cells = <3>;
118*4891b661SKrzysztof Kozlowski            #size-cells = <2>;
119*4891b661SKrzysztof Kozlowski
120*4891b661SKrzysztof Kozlowski            clocks = <&gcc GCC_PCIE_0_PIPE_CLK>,
121*4891b661SKrzysztof Kozlowski                     <&gcc GCC_PCIE_0_AUX_CLK>,
122*4891b661SKrzysztof Kozlowski                     <&gcc GCC_PCIE_0_CFG_AHB_CLK>,
123*4891b661SKrzysztof Kozlowski                     <&gcc GCC_PCIE_0_MSTR_AXI_CLK>,
124*4891b661SKrzysztof Kozlowski                     <&gcc GCC_PCIE_0_SLV_AXI_CLK>,
125*4891b661SKrzysztof Kozlowski                     <&gcc GCC_PCIE_0_SLV_Q2A_AXI_CLK>,
126*4891b661SKrzysztof Kozlowski                     <&gcc GCC_AGGRE_NOC_PCIE_TBU_CLK>,
127*4891b661SKrzysztof Kozlowski                     <&gcc GCC_DDRSS_PCIE_SF_TBU_CLK>;
128*4891b661SKrzysztof Kozlowski            clock-names = "pipe",
129*4891b661SKrzysztof Kozlowski                          "aux",
130*4891b661SKrzysztof Kozlowski                          "cfg",
131*4891b661SKrzysztof Kozlowski                          "bus_master",
132*4891b661SKrzysztof Kozlowski                          "bus_slave",
133*4891b661SKrzysztof Kozlowski                          "slave_q2a",
134*4891b661SKrzysztof Kozlowski                          "tbu",
135*4891b661SKrzysztof Kozlowski                          "ddrss_sf_tbu";
136*4891b661SKrzysztof Kozlowski
137*4891b661SKrzysztof Kozlowski            dma-coherent;
138*4891b661SKrzysztof Kozlowski
139*4891b661SKrzysztof Kozlowski            interrupts = <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
140*4891b661SKrzysztof Kozlowski                         <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
141*4891b661SKrzysztof Kozlowski                         <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>,
142*4891b661SKrzysztof Kozlowski                         <GIC_SPI 144 IRQ_TYPE_LEVEL_HIGH>,
143*4891b661SKrzysztof Kozlowski                         <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
144*4891b661SKrzysztof Kozlowski                         <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
145*4891b661SKrzysztof Kozlowski                         <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>,
146*4891b661SKrzysztof Kozlowski                         <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
147*4891b661SKrzysztof Kozlowski            interrupt-names = "msi0", "msi1", "msi2", "msi3",
148*4891b661SKrzysztof Kozlowski                              "msi4", "msi5", "msi6", "msi7";
149*4891b661SKrzysztof Kozlowski            #interrupt-cells = <1>;
150*4891b661SKrzysztof Kozlowski            interrupt-map-mask = <0 0 0 0x7>;
151*4891b661SKrzysztof Kozlowski            interrupt-map = <0 0 0 1 &intc 0 149 IRQ_TYPE_LEVEL_HIGH>, /* int_a */
152*4891b661SKrzysztof Kozlowski                            <0 0 0 2 &intc 0 150 IRQ_TYPE_LEVEL_HIGH>, /* int_b */
153*4891b661SKrzysztof Kozlowski                            <0 0 0 3 &intc 0 151 IRQ_TYPE_LEVEL_HIGH>, /* int_c */
154*4891b661SKrzysztof Kozlowski                            <0 0 0 4 &intc 0 152 IRQ_TYPE_LEVEL_HIGH>; /* int_d */
155*4891b661SKrzysztof Kozlowski
156*4891b661SKrzysztof Kozlowski            iommu-map = <0x0 &apps_smmu 0x1c00 0x1>,
157*4891b661SKrzysztof Kozlowski                        <0x100 &apps_smmu 0x1c01 0x1>;
158*4891b661SKrzysztof Kozlowski
159*4891b661SKrzysztof Kozlowski            phys = <&pcie0_phy>;
160*4891b661SKrzysztof Kozlowski            phy-names = "pciephy";
161*4891b661SKrzysztof Kozlowski
162*4891b661SKrzysztof Kozlowski            pinctrl-0 = <&pcie0_default_state>;
163*4891b661SKrzysztof Kozlowski            pinctrl-names = "default";
164*4891b661SKrzysztof Kozlowski
165*4891b661SKrzysztof Kozlowski            power-domains = <&gcc PCIE_0_GDSC>;
166*4891b661SKrzysztof Kozlowski
167*4891b661SKrzysztof Kozlowski            resets = <&gcc GCC_PCIE_0_BCR>;
168*4891b661SKrzysztof Kozlowski            reset-names = "pci";
169*4891b661SKrzysztof Kozlowski
170*4891b661SKrzysztof Kozlowski            perst-gpios = <&tlmm 79 GPIO_ACTIVE_LOW>;
171*4891b661SKrzysztof Kozlowski            wake-gpios = <&tlmm 81 GPIO_ACTIVE_HIGH>;
172*4891b661SKrzysztof Kozlowski        };
173*4891b661SKrzysztof Kozlowski    };
174