1126b16e2SMark RutlandThis document describes the generic device tree binding for MSI controllers and 2126b16e2SMark Rutlandtheir master(s). 3126b16e2SMark Rutland 4126b16e2SMark RutlandMessage Signaled Interrupts (MSIs) are a class of interrupts generated by a 5126b16e2SMark Rutlandwrite to an MMIO address. 6126b16e2SMark Rutland 7126b16e2SMark RutlandMSIs were originally specified by PCI (and are used with PCIe), but may also be 8126b16e2SMark Rutlandused with other busses, and hence a mechanism is required to relate devices on 9126b16e2SMark Rutlandthose busses to the MSI controllers which they are capable of using, 10126b16e2SMark Rutlandpotentially including additional information. 11126b16e2SMark Rutland 12126b16e2SMark RutlandMSIs are distinguished by some combination of: 13126b16e2SMark Rutland 14126b16e2SMark Rutland- The doorbell (the MMIO address written to). 15126b16e2SMark Rutland 16126b16e2SMark Rutland Devices may be configured by software to write to arbitrary doorbells which 17126b16e2SMark Rutland they can address. An MSI controller may feature a number of doorbells. 18126b16e2SMark Rutland 19126b16e2SMark Rutland- The payload (the value written to the doorbell). 20126b16e2SMark Rutland 21126b16e2SMark Rutland Devices may be configured to write an arbitrary payload chosen by software. 22126b16e2SMark Rutland MSI controllers may have restrictions on permitted payloads. 23126b16e2SMark Rutland 24126b16e2SMark Rutland- Sideband information accompanying the write. 25126b16e2SMark Rutland 26126b16e2SMark Rutland Typically this is neither configurable nor probeable, and depends on the path 27126b16e2SMark Rutland taken through the memory system (i.e. it is a property of the combination of 28126b16e2SMark Rutland MSI controller and device rather than a property of either in isolation). 29126b16e2SMark Rutland 30126b16e2SMark Rutland 31126b16e2SMark RutlandMSI controllers: 32126b16e2SMark Rutland================ 33126b16e2SMark Rutland 34126b16e2SMark RutlandAn MSI controller signals interrupts to a CPU when a write is made to an MMIO 35126b16e2SMark Rutlandaddress by some master. An MSI controller may feature a number of doorbells. 36126b16e2SMark Rutland 37126b16e2SMark RutlandRequired properties: 38126b16e2SMark Rutland-------------------- 39126b16e2SMark Rutland 40126b16e2SMark Rutland- msi-controller: Identifies the node as an MSI controller. 41126b16e2SMark Rutland 42126b16e2SMark RutlandOptional properties: 43126b16e2SMark Rutland-------------------- 44126b16e2SMark Rutland 45126b16e2SMark Rutland- #msi-cells: The number of cells in an msi-specifier, required if not zero. 46126b16e2SMark Rutland 47126b16e2SMark Rutland Typically this will encode information related to sideband data, and will 48126b16e2SMark Rutland not encode doorbells or payloads as these can be configured dynamically. 49126b16e2SMark Rutland 50126b16e2SMark Rutland The meaning of the msi-specifier is defined by the device tree binding of 51126b16e2SMark Rutland the specific MSI controller. 52126b16e2SMark Rutland 53126b16e2SMark Rutland 54126b16e2SMark RutlandMSI clients 55126b16e2SMark Rutland=========== 56126b16e2SMark Rutland 57126b16e2SMark RutlandMSI clients are devices which generate MSIs. For each MSI they wish to 58126b16e2SMark Rutlandgenerate, the doorbell and payload may be configured, though sideband 59126b16e2SMark Rutlandinformation may not be configurable. 60126b16e2SMark Rutland 61126b16e2SMark RutlandRequired properties: 62126b16e2SMark Rutland-------------------- 63126b16e2SMark Rutland 64126b16e2SMark Rutland- msi-parent: A list of phandle + msi-specifier pairs, one for each MSI 65126b16e2SMark Rutland controller which the device is capable of using. 66126b16e2SMark Rutland 67126b16e2SMark Rutland This property is unordered, and MSIs may be allocated from any combination of 68126b16e2SMark Rutland MSI controllers listed in the msi-parent property. 69126b16e2SMark Rutland 70126b16e2SMark Rutland If a device has restrictions on the allocation of MSIs, these restrictions 71126b16e2SMark Rutland must be described with additional properties. 72126b16e2SMark Rutland 73126b16e2SMark Rutland When #msi-cells is non-zero, busses with an msi-parent will require 74126b16e2SMark Rutland additional properties to describe the relationship between devices on the bus 75126b16e2SMark Rutland and the set of MSIs they can potentially generate. 76126b16e2SMark Rutland 77126b16e2SMark Rutland 78126b16e2SMark RutlandExample 79126b16e2SMark Rutland======= 80126b16e2SMark Rutland 81126b16e2SMark Rutland/ { 82126b16e2SMark Rutland #address-cells = <1>; 83126b16e2SMark Rutland #size-cells = <1>; 84126b16e2SMark Rutland 85126b16e2SMark Rutland msi_a: msi-controller@a { 86126b16e2SMark Rutland reg = <0xa 0xf00>; 87126b16e2SMark Rutland compatible = "vendor-a,some-controller"; 88126b16e2SMark Rutland msi-controller; 89126b16e2SMark Rutland /* No sideband data, so #msi-cells omitted */ 90126b16e2SMark Rutland }; 91126b16e2SMark Rutland 92126b16e2SMark Rutland msi_b: msi-controller@b { 93126b16e2SMark Rutland reg = <0xb 0xf00>; 94126b16e2SMark Rutland compatible = "vendor-b,another-controller"; 95126b16e2SMark Rutland msi-controller; 96126b16e2SMark Rutland /* Each device has some unique ID */ 97126b16e2SMark Rutland #msi-cells = <1>; 98126b16e2SMark Rutland }; 99126b16e2SMark Rutland 100126b16e2SMark Rutland msi_c: msi-controller@c { 101*c80f0104SBin Meng reg = <0xc 0xf00>; 102126b16e2SMark Rutland compatible = "vendor-b,another-controller"; 103126b16e2SMark Rutland msi-controller; 104126b16e2SMark Rutland /* Each device has some unique ID */ 105126b16e2SMark Rutland #msi-cells = <1>; 106126b16e2SMark Rutland }; 107126b16e2SMark Rutland 108126b16e2SMark Rutland dev@0 { 109126b16e2SMark Rutland reg = <0x0 0xf00>; 110126b16e2SMark Rutland compatible = "vendor-c,some-device"; 111126b16e2SMark Rutland 112126b16e2SMark Rutland /* Can only generate MSIs to msi_a */ 113126b16e2SMark Rutland msi-parent = <&msi_a>; 114126b16e2SMark Rutland }; 115126b16e2SMark Rutland 116126b16e2SMark Rutland dev@1 { 117126b16e2SMark Rutland reg = <0x1 0xf00>; 118126b16e2SMark Rutland compatible = "vendor-c,some-device"; 119126b16e2SMark Rutland 120126b16e2SMark Rutland /* 121126b16e2SMark Rutland * Can generate MSIs to either A or B. 122126b16e2SMark Rutland */ 123126b16e2SMark Rutland msi-parent = <&msi_a>, <&msi_b 0x17>; 124126b16e2SMark Rutland }; 125126b16e2SMark Rutland 126126b16e2SMark Rutland dev@2 { 127126b16e2SMark Rutland reg = <0x2 0xf00>; 128126b16e2SMark Rutland compatible = "vendor-c,some-device"; 129126b16e2SMark Rutland /* 130126b16e2SMark Rutland * Has different IDs at each MSI controller. 131126b16e2SMark Rutland * Can generate MSIs to all of the MSI controllers. 132126b16e2SMark Rutland */ 133126b16e2SMark Rutland msi-parent = <&msi_a>, <&msi_b 0x17>, <&msi_c 0x53>; 134126b16e2SMark Rutland }; 135126b16e2SMark Rutland}; 136