1 This document describes the generic device tree binding for describing the
2 relationship between PCI devices and MSI controllers.
4 Each PCI device under a root complex is uniquely identified by its Requester ID
5 (AKA RID). A Requester ID is a triplet of a Bus number, Device number, and
8 For the purpose of this document, when treated as a numeric value, a RID is
11 * Bits [15:8] are the Bus number.
12 * Bits [7:3] are the Device number.
13 * Bits [2:0] are the Function number.
14 * Any other bits required for padding must be zero.
16 MSIs may be distinguished in part through the use of sideband data accompanying
17 writes. In the case of PCI devices, this sideband data may be derived from the
18 Requester ID. A mechanism is required to associate a device with both the MSI
19 controllers it can address, and the sideband data that will be associated with
20 its writes to those controllers.
22 For generic MSI bindings, see
23 Documentation/devicetree/bindings/interrupt-controller/msi.txt.
32 - msi-map: Maps a Requester ID to an MSI controller and associated
33 msi-specifier data. The property is an arbitrary number of tuples of
34 (rid-base,msi-controller,msi-base,length), where:
36 * rid-base is a single cell describing the first RID matched by the entry.
38 * msi-controller is a single phandle to an MSI controller
40 * msi-base is an msi-specifier describing the msi-specifier produced for the
41 first RID matched by the entry.
43 * length is a single cell describing how many consecutive RIDs are matched
44 following the rid-base.
46 Any RID r in the interval [rid-base, rid-base + length) is associated with
47 the listed msi-controller, with the msi-specifier (r - rid-base + msi-base).
49 - msi-map-mask: A mask to be applied to each Requester ID prior to being mapped
50 to an msi-specifier per the msi-map property.
52 - msi-parent: Describes the MSI parent of the root complex itself. Where
53 the root complex and MSI controller do not pass sideband data with MSI
54 writes, this property may be used to describe the MSI controller(s)
55 used by PCI devices under the root complex, if defined as such in the
56 binding for the root complex.
66 msi: msi-controller@a {
68 compatible = "vendor,some-controller";
75 compatible = "vendor,pcie-root-complex";
79 * The sideband data provided to the MSI controller is
80 * the RID, identity-mapped.
82 msi-map = <0x0 &msi_a 0x0 0x10000>,
94 msi: msi-controller@a {
96 compatible = "vendor,some-controller";
103 compatible = "vendor,pcie-root-complex";
107 * The sideband data provided to the MSI controller is
108 * the RID, masked to only the device and function bits.
110 msi-map = <0x0 &msi_a 0x0 0x100>,
111 msi-map-mask = <0xff>
120 #address-cells = <1>;
123 msi: msi-controller@a {
125 compatible = "vendor,some-controller";
132 compatible = "vendor,pcie-root-complex";
136 * The sideband data provided to the MSI controller is
137 * the RID, but the high bit of the bus number is
140 msi-map = <0x0000 &msi 0x0000 0x8000>,
141 <0x8000 &msi 0x0000 0x8000>;
150 #address-cells = <1>;
153 msi: msi-controller@a {
155 compatible = "vendor,some-controller";
162 compatible = "vendor,pcie-root-complex";
166 * The sideband data provided to the MSI controller is
167 * the RID, but the high bit of the bus number is
170 msi-map = <0x0000 &msi 0x8000 0x8000>,
171 <0x8000 &msi 0x0000 0x8000>;
180 #address-cells = <1>;
183 msi_a: msi-controller@a {
185 compatible = "vendor,some-controller";
190 msi_b: msi-controller@b {
192 compatible = "vendor,some-controller";
197 msi_c: msi-controller@c {
199 compatible = "vendor,some-controller";
206 compatible = "vendor,pcie-root-complex";
210 * The sideband data provided to MSI controller a is the
211 * RID, but the high bit of the bus number is negated.
212 * The sideband data provided to MSI controller b is the
213 * RID, identity-mapped.
214 * MSI controller c is not addressable.
216 msi-map = <0x0000 &msi_a 0x8000 0x08000>,
217 <0x8000 &msi_a 0x0000 0x08000>,
218 <0x0000 &msi_b 0x0000 0x10000>;