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