xref: /freebsd/sys/contrib/device-tree/Bindings/pci/mbvl,gpex40-pcie.yaml (revision 2846c90520eb4cc74e24d586a0ea0f4a0006bc73)
1*2846c905SEmmanuel Vadot# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2*2846c905SEmmanuel Vadot%YAML 1.2
3*2846c905SEmmanuel Vadot---
4*2846c905SEmmanuel Vadot$id: http://devicetree.org/schemas/pci/mbvl,gpex40-pcie.yaml#
5*2846c905SEmmanuel Vadot$schema: http://devicetree.org/meta-schemas/core.yaml#
6*2846c905SEmmanuel Vadot
7*2846c905SEmmanuel Vadottitle: Mobiveil AXI PCIe Host Bridge
8*2846c905SEmmanuel Vadot
9*2846c905SEmmanuel Vadotmaintainers:
10*2846c905SEmmanuel Vadot  - Frank Li <Frank Li@nxp.com>
11*2846c905SEmmanuel Vadot
12*2846c905SEmmanuel Vadotdescription:
13*2846c905SEmmanuel Vadot  Mobiveil's GPEX 4.0 is a PCIe Gen4 host bridge IP. This configurable IP
14*2846c905SEmmanuel Vadot  has up to 8 outbound and inbound windows for address translation.
15*2846c905SEmmanuel Vadot
16*2846c905SEmmanuel Vadot  NXP Layerscape PCIe Gen4 controller (Deprecated) base on Mobiveil's GPEX 4.0.
17*2846c905SEmmanuel Vadot
18*2846c905SEmmanuel Vadotproperties:
19*2846c905SEmmanuel Vadot  compatible:
20*2846c905SEmmanuel Vadot    enum:
21*2846c905SEmmanuel Vadot      - fsl,lx2160a-pcie
22*2846c905SEmmanuel Vadot      - mbvl,gpex40-pcie
23*2846c905SEmmanuel Vadot
24*2846c905SEmmanuel Vadot  reg:
25*2846c905SEmmanuel Vadot    items:
26*2846c905SEmmanuel Vadot      - description: PCIe controller registers
27*2846c905SEmmanuel Vadot      - description: Bridge config registers
28*2846c905SEmmanuel Vadot      - description: GPIO registers to control slot power
29*2846c905SEmmanuel Vadot      - description: MSI registers
30*2846c905SEmmanuel Vadot    minItems: 2
31*2846c905SEmmanuel Vadot
32*2846c905SEmmanuel Vadot  reg-names:
33*2846c905SEmmanuel Vadot    items:
34*2846c905SEmmanuel Vadot      - const: csr_axi_slave
35*2846c905SEmmanuel Vadot      - const: config_axi_slave
36*2846c905SEmmanuel Vadot      - const: gpio_slave
37*2846c905SEmmanuel Vadot      - const: apb_csr
38*2846c905SEmmanuel Vadot    minItems: 2
39*2846c905SEmmanuel Vadot
40*2846c905SEmmanuel Vadot  apio-wins:
41*2846c905SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
42*2846c905SEmmanuel Vadot    description: |
43*2846c905SEmmanuel Vadot      number of requested APIO outbound windows
44*2846c905SEmmanuel Vadot        1. Config window
45*2846c905SEmmanuel Vadot        2. Memory window
46*2846c905SEmmanuel Vadot    default: 2
47*2846c905SEmmanuel Vadot    maximum: 256
48*2846c905SEmmanuel Vadot
49*2846c905SEmmanuel Vadot  ppio-wins:
50*2846c905SEmmanuel Vadot    $ref: /schemas/types.yaml#/definitions/uint32
51*2846c905SEmmanuel Vadot    description: number of requested PPIO inbound windows
52*2846c905SEmmanuel Vadot    default: 1
53*2846c905SEmmanuel Vadot    maximum: 256
54*2846c905SEmmanuel Vadot
55*2846c905SEmmanuel Vadot  interrupt-controller: true
56*2846c905SEmmanuel Vadot
57*2846c905SEmmanuel Vadot  "#interrupt-cells":
58*2846c905SEmmanuel Vadot    const: 1
59*2846c905SEmmanuel Vadot
60*2846c905SEmmanuel Vadot  interrupts:
61*2846c905SEmmanuel Vadot    minItems: 1
62*2846c905SEmmanuel Vadot    maxItems: 3
63*2846c905SEmmanuel Vadot
64*2846c905SEmmanuel Vadot  interrupt-names:
65*2846c905SEmmanuel Vadot    minItems: 1
66*2846c905SEmmanuel Vadot    maxItems: 3
67*2846c905SEmmanuel Vadot
68*2846c905SEmmanuel Vadot  dma-coherent: true
69*2846c905SEmmanuel Vadot
70*2846c905SEmmanuel Vadot  msi-parent: true
71*2846c905SEmmanuel Vadot
72*2846c905SEmmanuel Vadotrequired:
73*2846c905SEmmanuel Vadot  - compatible
74*2846c905SEmmanuel Vadot  - reg
75*2846c905SEmmanuel Vadot  - reg-names
76*2846c905SEmmanuel Vadot
77*2846c905SEmmanuel VadotallOf:
78*2846c905SEmmanuel Vadot  - $ref: /schemas/pci/pci-host-bridge.yaml#
79*2846c905SEmmanuel Vadot  - if:
80*2846c905SEmmanuel Vadot      properties:
81*2846c905SEmmanuel Vadot        compatible:
82*2846c905SEmmanuel Vadot          enum:
83*2846c905SEmmanuel Vadot            - fsl,lx2160a-pcie
84*2846c905SEmmanuel Vadot    then:
85*2846c905SEmmanuel Vadot      properties:
86*2846c905SEmmanuel Vadot        reg:
87*2846c905SEmmanuel Vadot          maxItems: 2
88*2846c905SEmmanuel Vadot
89*2846c905SEmmanuel Vadot        reg-names:
90*2846c905SEmmanuel Vadot          maxItems: 2
91*2846c905SEmmanuel Vadot
92*2846c905SEmmanuel Vadot        interrupts:
93*2846c905SEmmanuel Vadot          minItems: 3
94*2846c905SEmmanuel Vadot
95*2846c905SEmmanuel Vadot        interrupt-names:
96*2846c905SEmmanuel Vadot          items:
97*2846c905SEmmanuel Vadot            - const: aer
98*2846c905SEmmanuel Vadot            - const: pme
99*2846c905SEmmanuel Vadot            - const: intr
100*2846c905SEmmanuel Vadot    else:
101*2846c905SEmmanuel Vadot      properties:
102*2846c905SEmmanuel Vadot        dma-coherent: false
103*2846c905SEmmanuel Vadot        msi-parent: false
104*2846c905SEmmanuel Vadot        interrupts:
105*2846c905SEmmanuel Vadot          maxItems: 1
106*2846c905SEmmanuel Vadot        interrupt-names: false
107*2846c905SEmmanuel Vadot
108*2846c905SEmmanuel VadotunevaluatedProperties: false
109*2846c905SEmmanuel Vadot
110*2846c905SEmmanuel Vadotexamples:
111*2846c905SEmmanuel Vadot  - |
112*2846c905SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
113*2846c905SEmmanuel Vadot
114*2846c905SEmmanuel Vadot    pcie@b0000000 {
115*2846c905SEmmanuel Vadot        compatible = "mbvl,gpex40-pcie";
116*2846c905SEmmanuel Vadot        reg = <0xb0000000 0x00010000>,
117*2846c905SEmmanuel Vadot              <0xa0000000 0x00001000>,
118*2846c905SEmmanuel Vadot              <0xff000000 0x00200000>,
119*2846c905SEmmanuel Vadot              <0xb0010000 0x00001000>;
120*2846c905SEmmanuel Vadot        reg-names = "csr_axi_slave",
121*2846c905SEmmanuel Vadot                    "config_axi_slave",
122*2846c905SEmmanuel Vadot                    "gpio_slave",
123*2846c905SEmmanuel Vadot                    "apb_csr";
124*2846c905SEmmanuel Vadot        ranges = <0x83000000 0 0x00000000 0xa8000000 0 0x8000000>;
125*2846c905SEmmanuel Vadot        #address-cells = <3>;
126*2846c905SEmmanuel Vadot        #size-cells = <2>;
127*2846c905SEmmanuel Vadot        device_type = "pci";
128*2846c905SEmmanuel Vadot        apio-wins = <2>;
129*2846c905SEmmanuel Vadot        ppio-wins = <1>;
130*2846c905SEmmanuel Vadot        bus-range = <0x00 0xff>;
131*2846c905SEmmanuel Vadot        interrupt-controller;
132*2846c905SEmmanuel Vadot        #interrupt-cells = <1>;
133*2846c905SEmmanuel Vadot        interrupt-parent = <&gic>;
134*2846c905SEmmanuel Vadot        interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
135*2846c905SEmmanuel Vadot        interrupt-map-mask = <0 0 0 7>;
136*2846c905SEmmanuel Vadot        interrupt-map = <0 0 0 0 &pci_express 0>,
137*2846c905SEmmanuel Vadot                        <0 0 0 1 &pci_express 1>,
138*2846c905SEmmanuel Vadot                        <0 0 0 2 &pci_express 2>,
139*2846c905SEmmanuel Vadot                        <0 0 0 3 &pci_express 3>;
140*2846c905SEmmanuel Vadot    };
141*2846c905SEmmanuel Vadot
142*2846c905SEmmanuel Vadot  - |
143*2846c905SEmmanuel Vadot    #include <dt-bindings/interrupt-controller/arm-gic.h>
144*2846c905SEmmanuel Vadot
145*2846c905SEmmanuel Vadot    soc {
146*2846c905SEmmanuel Vadot        #address-cells = <2>;
147*2846c905SEmmanuel Vadot        #size-cells = <2>;
148*2846c905SEmmanuel Vadot        pcie@3400000 {
149*2846c905SEmmanuel Vadot            compatible = "fsl,lx2160a-pcie";
150*2846c905SEmmanuel Vadot            reg = <0x00 0x03400000 0x0 0x00100000   /* controller registers */
151*2846c905SEmmanuel Vadot                   0x80 0x00000000 0x0 0x00001000>; /* configuration space */
152*2846c905SEmmanuel Vadot            reg-names = "csr_axi_slave", "config_axi_slave";
153*2846c905SEmmanuel Vadot            ranges = <0x82000000 0x0 0x40000000 0x80 0x40000000 0x0 0x40000000>;
154*2846c905SEmmanuel Vadot            interrupts = <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, /* AER interrupt */
155*2846c905SEmmanuel Vadot                         <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>, /* PME interrupt */
156*2846c905SEmmanuel Vadot                         <GIC_SPI 108 IRQ_TYPE_LEVEL_HIGH>; /* controller interrupt */
157*2846c905SEmmanuel Vadot            interrupt-names = "aer", "pme", "intr";
158*2846c905SEmmanuel Vadot            #address-cells = <3>;
159*2846c905SEmmanuel Vadot            #size-cells = <2>;
160*2846c905SEmmanuel Vadot            device_type = "pci";
161*2846c905SEmmanuel Vadot            apio-wins = <8>;
162*2846c905SEmmanuel Vadot            ppio-wins = <8>;
163*2846c905SEmmanuel Vadot            dma-coherent;
164*2846c905SEmmanuel Vadot            bus-range = <0x00 0xff>;
165*2846c905SEmmanuel Vadot            msi-parent = <&its>;
166*2846c905SEmmanuel Vadot            #interrupt-cells = <1>;
167*2846c905SEmmanuel Vadot            interrupt-map-mask = <0 0 0 7>;
168*2846c905SEmmanuel Vadot            interrupt-map = <0000 0 0 1 &gic 0 0 GIC_SPI 109 IRQ_TYPE_LEVEL_HIGH>,
169*2846c905SEmmanuel Vadot                            <0000 0 0 2 &gic 0 0 GIC_SPI 110 IRQ_TYPE_LEVEL_HIGH>,
170*2846c905SEmmanuel Vadot                            <0000 0 0 3 &gic 0 0 GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>,
171*2846c905SEmmanuel Vadot                            <0000 0 0 4 &gic 0 0 GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
172*2846c905SEmmanuel Vadot        };
173*2846c905SEmmanuel Vadot    };
174