Merge tag 'vfio-v5.10-rc1' of git://github.com/awilliam/linux-vfio
[linux-2.6-microblaze.git] / Documentation / devicetree / bindings / pci / brcm,stb-pcie.yaml
1 # SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2 %YAML 1.2
3 ---
4 $id: http://devicetree.org/schemas/pci/brcm,stb-pcie.yaml#
5 $schema: http://devicetree.org/meta-schemas/core.yaml#
6
7 title: Brcmstb PCIe Host Controller Device Tree Bindings
8
9 maintainers:
10   - Nicolas Saenz Julienne <nsaenzjulienne@suse.de>
11
12 properties:
13   compatible:
14     items:
15       - enum:
16           - brcm,bcm2711-pcie # The Raspberry Pi 4
17           - brcm,bcm7211-pcie # Broadcom STB version of RPi4
18           - brcm,bcm7278-pcie # Broadcom 7278 Arm
19           - brcm,bcm7216-pcie # Broadcom 7216 Arm
20           - brcm,bcm7445-pcie # Broadcom 7445 Arm
21
22   reg:
23     maxItems: 1
24
25   interrupts:
26     minItems: 1
27     maxItems: 2
28     items:
29       - description: PCIe host controller
30       - description: builtin MSI controller
31
32   interrupt-names:
33     minItems: 1
34     maxItems: 2
35     items:
36       - const: pcie
37       - const: msi
38
39   ranges:
40     minItems: 1
41     maxItems: 4
42
43   dma-ranges:
44     minItems: 1
45     maxItems: 6
46
47   clocks:
48     maxItems: 1
49
50   clock-names:
51     items:
52       - const: sw_pcie
53
54   msi-controller:
55     description: Identifies the node as an MSI controller.
56
57   msi-parent:
58     description: MSI controller the device is capable of using.
59
60   brcm,enable-ssc:
61     description: Indicates usage of spread-spectrum clocking.
62     type: boolean
63
64   aspm-no-l0s: true
65
66   resets:
67     description: for "brcm,bcm7216-pcie", must be a valid reset
68       phandle pointing to the RESCAL reset controller provider node.
69     $ref: "/schemas/types.yaml#/definitions/phandle"
70
71   reset-names:
72     items:
73       - const: rescal
74
75   brcm,scb-sizes:
76     description: u64 giving the 64bit PCIe memory
77       viewport size of a memory controller.  There may be up to
78       three controllers, and each size must be a power of two
79       with a size greater or equal to the amount of memory the
80       controller supports.  Note that each memory controller
81       may have two component regions -- base and extended -- so
82       this information cannot be deduced from the dma-ranges.
83     $ref: /schemas/types.yaml#/definitions/uint64-array
84     items:
85       minItems: 1
86       maxItems: 3
87
88 required:
89   - reg
90   - ranges
91   - dma-ranges
92   - "#interrupt-cells"
93   - interrupts
94   - interrupt-names
95   - interrupt-map-mask
96   - interrupt-map
97   - msi-controller
98
99 allOf:
100   - $ref: /schemas/pci/pci-bus.yaml#
101   - if:
102       properties:
103         compatible:
104           contains:
105             const: brcm,bcm7216-pcie
106     then:
107       required:
108         - resets
109         - reset-names
110
111 unevaluatedProperties: false
112
113 examples:
114   - |
115     #include <dt-bindings/interrupt-controller/irq.h>
116     #include <dt-bindings/interrupt-controller/arm-gic.h>
117
118     scb {
119             #address-cells = <2>;
120             #size-cells = <1>;
121             pcie0: pcie@7d500000 {
122                     compatible = "brcm,bcm2711-pcie";
123                     reg = <0x0 0x7d500000 0x9310>;
124                     device_type = "pci";
125                     #address-cells = <3>;
126                     #size-cells = <2>;
127                     #interrupt-cells = <1>;
128                     interrupts = <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>,
129                                  <GIC_SPI 148 IRQ_TYPE_LEVEL_HIGH>;
130                     interrupt-names = "pcie", "msi";
131                     interrupt-map-mask = <0x0 0x0 0x0 0x7>;
132                     interrupt-map = <0 0 0 1 &gicv2 GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
133                     msi-parent = <&pcie0>;
134                     msi-controller;
135                     ranges = <0x02000000 0x0 0xf8000000 0x6 0x00000000 0x0 0x04000000>;
136                     dma-ranges = <0x42000000 0x1 0x00000000 0x0 0x40000000 0x0 0x80000000>,
137                                  <0x42000000 0x1 0x80000000 0x3 0x00000000 0x0 0x80000000>;
138                     brcm,enable-ssc;
139                     brcm,scb-sizes =  <0x0000000080000000 0x0000000080000000>;
140             };
141     };