Merge git://git.kernel.org/pub/scm/linux/kernel/git/davem/ide
[platform/kernel/linux-rpi.git] / drivers / staging / mt7621-pci / mediatek,mt7621-pci.txt
1 MediaTek MT7621 PCIe controller
2
3 Required properties:
4 - compatible: "mediatek,mt7621-pci"
5 - device_type: Must be "pci"
6 - reg: Base addresses and lengths of the PCIe subsys and root ports.
7 - bus-range: Range of bus numbers associated with this controller.
8 - #address-cells: Address representation for root ports (must be 3)
9 - pinctrl-names : The pin control state names.
10 - pinctrl-0: The "default" pinctrl state.
11 - #size-cells: Size representation for root ports (must be 2)
12 - ranges: Ranges for the PCI memory and I/O regions.
13 - #interrupt-cells: Must be 1
14 - interrupt-map-mask and interrupt-map: Standard PCI IRQ mapping properties.
15   Please refer to the standard PCI bus binding document for a more detailed
16   explanation.
17 - status: either "disabled" or "okay".
18 - resets: Must contain an entry for each entry in reset-names.
19   See ../reset/reset.txt for details.
20 - reset-names: Must be "pcie0", "pcie1", "pcieN"... based on the number of
21   root ports.
22 - clocks: Must contain an entry for each entry in clock-names.
23   See ../clocks/clock-bindings.txt for details.
24 - clock-names: Must be "pcie0", "pcie1", "pcieN"... based on the number of
25   root ports.
26
27 In addition, the device tree node must have sub-nodes describing each PCIe port
28 interface, having the following mandatory properties:
29
30 Required properties:
31 - reg: Only the first four bytes are used to refer to the correct bus number
32       and device number.
33 - #address-cells: Must be 3
34 - #size-cells: Must be 2
35 - ranges: Sub-ranges distributed from the PCIe controller node. An empty
36   property is sufficient.
37 - bus-range: Range of bus numbers associated with this port.
38
39 Example for MT7621:
40
41         pcie: pcie@1e140000 {
42                 compatible = "mediatek,mt7621-pci";
43         reg = <0x1e140000 0x100    /* host-pci bridge registers */
44                0x1e142000 0x100    /* pcie port 0 RC control registers */
45                0x1e143000 0x100    /* pcie port 1 RC control registers */
46                0x1e144000 0x100>;  /* pcie port 2 RC control registers */
47
48                 #address-cells = <3>;
49                 #size-cells = <2>;
50
51                 pinctrl-names = "default";
52                 pinctrl-0 = <&pcie_pins>;
53
54                 device_type = "pci";
55
56                 bus-range = <0 255>;
57                 ranges = <
58                         0x02000000 0 0x00000000 0x60000000 0 0x10000000 /* pci memory */
59                         0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
60                 >;
61
62                 #interrupt-cells = <1>;
63                 interrupt-map-mask = <0xF0000 0 0 1>;
64                 interrupt-map = <0x10000 0 0 1 &gic GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH>,
65                                 <0x20000 0 0 1 &gic GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH>,
66                                 <0x30000 0 0 1 &gic GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
67
68                 status = "disabled";
69
70                 resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>;
71                 reset-names = "pcie0", "pcie1", "pcie2";
72                 clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
73                 clock-names = "pcie0", "pcie1", "pcie2";
74
75                 pcie@0,0 {
76                         reg = <0x0000 0 0 0 0>;
77                         #address-cells = <3>;
78                         #size-cells = <2>;
79                         ranges;
80                         bus-range = <0x00 0xff>;
81                 };
82
83                 pcie@1,0 {
84                         reg = <0x0800 0 0 0 0>;
85                         #address-cells = <3>;
86                         #size-cells = <2>;
87                         ranges;
88                         bus-range = <0x00 0xff>;
89                 };
90
91                 pcie@2,0 {
92                         reg = <0x1000 0 0 0 0>;
93                         #address-cells = <3>;
94                         #size-cells = <2>;
95                         ranges;
96                         bus-range = <0x00 0xff>;
97                 };
98         };
99