1*c66ec88fSEmmanuel Vadot* Broadcom iProc PCIe controller with the platform bus interface
2*c66ec88fSEmmanuel Vadot
3*c66ec88fSEmmanuel VadotRequired properties:
4*c66ec88fSEmmanuel Vadot- compatible:
5*c66ec88fSEmmanuel Vadot      "brcm,iproc-pcie" for the first generation of PAXB based controller,
6*c66ec88fSEmmanuel Vadotused in SoCs including NSP, Cygnus, NS2, and Pegasus
7*c66ec88fSEmmanuel Vadot      "brcm,iproc-pcie-paxb-v2" for the second generation of PAXB-based
8*c66ec88fSEmmanuel Vadotcontrollers, used in Stingray
9*c66ec88fSEmmanuel Vadot      "brcm,iproc-pcie-paxc" for the first generation of PAXC based
10*c66ec88fSEmmanuel Vadotcontroller, used in NS2
11*c66ec88fSEmmanuel Vadot      "brcm,iproc-pcie-paxc-v2" for the second generation of PAXC based
12*c66ec88fSEmmanuel Vadotcontroller, used in Stingray
13*c66ec88fSEmmanuel Vadot  PAXB-based root complex is used for external endpoint devices. PAXC-based
14*c66ec88fSEmmanuel Vadotroot complex is connected to emulated endpoint devices internal to the ASIC
15*c66ec88fSEmmanuel Vadot- reg: base address and length of the PCIe controller I/O register space
16*c66ec88fSEmmanuel Vadot- #interrupt-cells: set to <1>
17*c66ec88fSEmmanuel Vadot- interrupt-map-mask and interrupt-map, standard PCI properties to define the
18*c66ec88fSEmmanuel Vadot  mapping of the PCIe interface to interrupt numbers
19*c66ec88fSEmmanuel Vadot- linux,pci-domain: PCI domain ID. Should be unique for each host controller
20*c66ec88fSEmmanuel Vadot- bus-range: PCI bus numbers covered
21*c66ec88fSEmmanuel Vadot- #address-cells: set to <3>
22*c66ec88fSEmmanuel Vadot- #size-cells: set to <2>
23*c66ec88fSEmmanuel Vadot- device_type: set to "pci"
24*c66ec88fSEmmanuel Vadot- ranges: ranges for the PCI memory and I/O regions
25*c66ec88fSEmmanuel Vadot
26*c66ec88fSEmmanuel VadotOptional properties:
27*c66ec88fSEmmanuel Vadot- phys: phandle of the PCIe PHY device
28*c66ec88fSEmmanuel Vadot- phy-names: must be "pcie-phy"
29*c66ec88fSEmmanuel Vadot- dma-coherent: present if DMA operations are coherent
30*c66ec88fSEmmanuel Vadot- dma-ranges: Some PAXB-based root complexes do not have inbound mapping done
31*c66ec88fSEmmanuel Vadot  by the ASIC after power on reset.  In this case, SW is required to configure
32*c66ec88fSEmmanuel Vadotthe mapping, based on inbound memory regions specified by this property.
33*c66ec88fSEmmanuel Vadot
34*c66ec88fSEmmanuel Vadot- brcm,pcie-ob: Some iProc SoCs do not have the outbound address mapping done
35*c66ec88fSEmmanuel Vadotby the ASIC after power on reset. In this case, SW needs to configure it
36*c66ec88fSEmmanuel Vadot
37*c66ec88fSEmmanuel VadotIf the brcm,pcie-ob property is present, the following properties become
38*c66ec88fSEmmanuel Vadoteffective:
39*c66ec88fSEmmanuel Vadot
40*c66ec88fSEmmanuel VadotRequired:
41*c66ec88fSEmmanuel Vadot- brcm,pcie-ob-axi-offset: The offset from the AXI address to the internal
42*c66ec88fSEmmanuel Vadotaddress used by the iProc PCIe core (not the PCIe address)
43*c66ec88fSEmmanuel Vadot
44*c66ec88fSEmmanuel VadotMSI support (optional):
45*c66ec88fSEmmanuel Vadot
46*c66ec88fSEmmanuel VadotFor older platforms without MSI integrated in the GIC, iProc PCIe core provides
47*c66ec88fSEmmanuel Vadotan event queue based MSI support.  The iProc MSI uses host memories to store
48*c66ec88fSEmmanuel VadotMSI posted writes in the event queues
49*c66ec88fSEmmanuel Vadot
50*c66ec88fSEmmanuel VadotOn newer iProc platforms, gicv2m or gicv3-its based MSI support should be used
51*c66ec88fSEmmanuel Vadot
52*c66ec88fSEmmanuel Vadot- msi-map: Maps a Requester ID to an MSI controller and associated MSI
53*c66ec88fSEmmanuel Vadotsideband data
54*c66ec88fSEmmanuel Vadot
55*c66ec88fSEmmanuel Vadot- msi-parent: Link to the device node of the MSI controller, used when no MSI
56*c66ec88fSEmmanuel Vadotsideband data is passed between the iProc PCIe controller and the MSI
57*c66ec88fSEmmanuel Vadotcontroller
58*c66ec88fSEmmanuel Vadot
59*c66ec88fSEmmanuel VadotRefer to the following binding documents for more detailed description on
60*c66ec88fSEmmanuel Vadotthe use of 'msi-map' and 'msi-parent':
61*c66ec88fSEmmanuel Vadot  Documentation/devicetree/bindings/pci/pci-msi.txt
62*c66ec88fSEmmanuel Vadot  Documentation/devicetree/bindings/interrupt-controller/msi.txt
63*c66ec88fSEmmanuel Vadot
64*c66ec88fSEmmanuel VadotWhen the iProc event queue based MSI is used, one needs to define the
65*c66ec88fSEmmanuel Vadotfollowing properties in the MSI device node:
66*c66ec88fSEmmanuel Vadot- compatible: Must be "brcm,iproc-msi"
67*c66ec88fSEmmanuel Vadot- msi-controller: claims itself as an MSI controller
68*c66ec88fSEmmanuel Vadot- interrupts: List of interrupt IDs from its parent interrupt device
69*c66ec88fSEmmanuel Vadot
70*c66ec88fSEmmanuel VadotOptional properties:
71*c66ec88fSEmmanuel Vadot- brcm,pcie-msi-inten: Needs to be present for some older iProc platforms that
72*c66ec88fSEmmanuel Vadotrequire the interrupt enable registers to be set explicitly to enable MSI
73*c66ec88fSEmmanuel Vadot
74*c66ec88fSEmmanuel VadotExample:
75*c66ec88fSEmmanuel Vadot	pcie0: pcie@18012000 {
76*c66ec88fSEmmanuel Vadot		compatible = "brcm,iproc-pcie";
77*c66ec88fSEmmanuel Vadot		reg = <0x18012000 0x1000>;
78*c66ec88fSEmmanuel Vadot
79*c66ec88fSEmmanuel Vadot		#interrupt-cells = <1>;
80*c66ec88fSEmmanuel Vadot		interrupt-map-mask = <0 0 0 0>;
81*c66ec88fSEmmanuel Vadot		interrupt-map = <0 0 0 0 &gic GIC_SPI 100 IRQ_TYPE_NONE>;
82*c66ec88fSEmmanuel Vadot
83*c66ec88fSEmmanuel Vadot		linux,pci-domain = <0>;
84*c66ec88fSEmmanuel Vadot
85*c66ec88fSEmmanuel Vadot		bus-range = <0x00 0xff>;
86*c66ec88fSEmmanuel Vadot
87*c66ec88fSEmmanuel Vadot		#address-cells = <3>;
88*c66ec88fSEmmanuel Vadot		#size-cells = <2>;
89*c66ec88fSEmmanuel Vadot		device_type = "pci";
90*c66ec88fSEmmanuel Vadot		ranges = <0x81000000 0 0	  0x28000000 0 0x00010000
91*c66ec88fSEmmanuel Vadot			  0x82000000 0 0x20000000 0x20000000 0 0x04000000>;
92*c66ec88fSEmmanuel Vadot
93*c66ec88fSEmmanuel Vadot		phys = <&phy 0 5>;
94*c66ec88fSEmmanuel Vadot		phy-names = "pcie-phy";
95*c66ec88fSEmmanuel Vadot
96*c66ec88fSEmmanuel Vadot		brcm,pcie-ob;
97*c66ec88fSEmmanuel Vadot		brcm,pcie-ob-axi-offset = <0x00000000>;
98*c66ec88fSEmmanuel Vadot
99*c66ec88fSEmmanuel Vadot		msi-parent = <&msi0>;
100*c66ec88fSEmmanuel Vadot
101*c66ec88fSEmmanuel Vadot		/* iProc event queue based MSI */
102*c66ec88fSEmmanuel Vadot		msi0: msi@18012000 {
103*c66ec88fSEmmanuel Vadot			compatible = "brcm,iproc-msi";
104*c66ec88fSEmmanuel Vadot			msi-controller;
105*c66ec88fSEmmanuel Vadot			interrupt-parent = <&gic>;
106*c66ec88fSEmmanuel Vadot			interrupts = <GIC_SPI 96 IRQ_TYPE_NONE>,
107*c66ec88fSEmmanuel Vadot				     <GIC_SPI 97 IRQ_TYPE_NONE>,
108*c66ec88fSEmmanuel Vadot				     <GIC_SPI 98 IRQ_TYPE_NONE>,
109*c66ec88fSEmmanuel Vadot				     <GIC_SPI 99 IRQ_TYPE_NONE>,
110*c66ec88fSEmmanuel Vadot		};
111*c66ec88fSEmmanuel Vadot	};
112*c66ec88fSEmmanuel Vadot
113*c66ec88fSEmmanuel Vadot	pcie1: pcie@18013000 {
114*c66ec88fSEmmanuel Vadot		compatible = "brcm,iproc-pcie";
115*c66ec88fSEmmanuel Vadot		reg = <0x18013000 0x1000>;
116*c66ec88fSEmmanuel Vadot
117*c66ec88fSEmmanuel Vadot		#interrupt-cells = <1>;
118*c66ec88fSEmmanuel Vadot		interrupt-map-mask = <0 0 0 0>;
119*c66ec88fSEmmanuel Vadot		interrupt-map = <0 0 0 0 &gic GIC_SPI 106 IRQ_TYPE_NONE>;
120*c66ec88fSEmmanuel Vadot
121*c66ec88fSEmmanuel Vadot		linux,pci-domain = <1>;
122*c66ec88fSEmmanuel Vadot
123*c66ec88fSEmmanuel Vadot		bus-range = <0x00 0xff>;
124*c66ec88fSEmmanuel Vadot
125*c66ec88fSEmmanuel Vadot		#address-cells = <3>;
126*c66ec88fSEmmanuel Vadot		#size-cells = <2>;
127*c66ec88fSEmmanuel Vadot		device_type = "pci";
128*c66ec88fSEmmanuel Vadot		ranges = <0x81000000 0 0	  0x48000000 0 0x00010000
129*c66ec88fSEmmanuel Vadot			  0x82000000 0 0x40000000 0x40000000 0 0x04000000>;
130*c66ec88fSEmmanuel Vadot
131*c66ec88fSEmmanuel Vadot		phys = <&phy 1 6>;
132*c66ec88fSEmmanuel Vadot		phy-names = "pcie-phy";
133*c66ec88fSEmmanuel Vadot	};
134