xref: /OK3568_Linux_fs/kernel/Documentation/devicetree/bindings/pci/rockchip-pcie.txt (revision 4882a59341e53eb6f0b4789bf948001014eff981)
1*4882a593Smuzhiyun* Rockchip AXI PCIe Root Port Bridge DT description
2*4882a593Smuzhiyun
3*4882a593SmuzhiyunRequired properties:
4*4882a593Smuzhiyun- #address-cells: Address representation for root ports, set to <3>
5*4882a593Smuzhiyun- #size-cells: Size representation for root ports, set to <2>
6*4882a593Smuzhiyun- #interrupt-cells: specifies the number of cells needed to encode an
7*4882a593Smuzhiyun		interrupt source. The value must be 1.
8*4882a593Smuzhiyun- compatible: Should contain "rockchip,rk3399-pcie"
9*4882a593Smuzhiyun- reg: Two register ranges as listed in the reg-names property
10*4882a593Smuzhiyun- reg-names: Must include the following names
11*4882a593Smuzhiyun	- "axi-base"
12*4882a593Smuzhiyun	- "apb-base"
13*4882a593Smuzhiyun- clocks: Must contain an entry for each entry in clock-names.
14*4882a593Smuzhiyun		See ../clocks/clock-bindings.txt for details.
15*4882a593Smuzhiyun- clock-names: Must include the following entries:
16*4882a593Smuzhiyun	- "aclk"
17*4882a593Smuzhiyun	- "aclk-perf"
18*4882a593Smuzhiyun	- "hclk"
19*4882a593Smuzhiyun	- "pm"
20*4882a593Smuzhiyun- msi-map: Maps a Requester ID to an MSI controller and associated
21*4882a593Smuzhiyun	msi-specifier data. See ./pci-msi.txt
22*4882a593Smuzhiyun- phys: From PHY bindings: Phandle for the Generic PHY for PCIe.
23*4882a593Smuzhiyun- phy-names:  MUST be "pcie-phy".
24*4882a593Smuzhiyun- interrupts: Three interrupt entries must be specified.
25*4882a593Smuzhiyun- interrupt-names: Must include the following names
26*4882a593Smuzhiyun	- "sys"
27*4882a593Smuzhiyun	- "legacy"
28*4882a593Smuzhiyun	- "client"
29*4882a593Smuzhiyun- resets: Must contain seven entries for each entry in reset-names.
30*4882a593Smuzhiyun	   See ../reset/reset.txt for details.
31*4882a593Smuzhiyun- reset-names: Must include the following names
32*4882a593Smuzhiyun	- "core"
33*4882a593Smuzhiyun	- "mgmt"
34*4882a593Smuzhiyun	- "mgmt-sticky"
35*4882a593Smuzhiyun	- "pipe"
36*4882a593Smuzhiyun	- "pm"
37*4882a593Smuzhiyun	- "aclk"
38*4882a593Smuzhiyun	- "pclk"
39*4882a593Smuzhiyun- pinctrl-names : The pin control state names
40*4882a593Smuzhiyun- pinctrl-0: The "default" pinctrl state
41*4882a593Smuzhiyun- #interrupt-cells: specifies the number of cells needed to encode an
42*4882a593Smuzhiyun	interrupt source. The value must be 1.
43*4882a593Smuzhiyun- interrupt-map-mask and interrupt-map: standard PCI properties
44*4882a593Smuzhiyun
45*4882a593SmuzhiyunOptional Property:
46*4882a593Smuzhiyun- aspm-no-l0s: RC won't support ASPM L0s. This property is needed if
47*4882a593Smuzhiyun	using 24MHz OSC for RC's PHY.
48*4882a593Smuzhiyun- ep-gpios: contain the entry for pre-reset gpio
49*4882a593Smuzhiyun- num-lanes: number of lanes to use
50*4882a593Smuzhiyun- vpcie3v3-supply: The phandle to the 3.3v regulator to use for PCIe.
51*4882a593Smuzhiyun- vpcie1v8-supply: The phandle to the 1.8v regulator to use for PCIe.
52*4882a593Smuzhiyun- vpcie0v9-supply: The phandle to the 0.9v regulator to use for PCIe.
53*4882a593Smuzhiyun
54*4882a593Smuzhiyun*Interrupt controller child node*
55*4882a593SmuzhiyunThe core controller provides a single interrupt for legacy INTx. The PCIe node
56*4882a593Smuzhiyunshould contain an interrupt controller node as a target for the PCI
57*4882a593Smuzhiyun'interrupt-map' property. This node represents the domain at which the four
58*4882a593SmuzhiyunINTx interrupts are decoded and routed.
59*4882a593Smuzhiyun
60*4882a593Smuzhiyun
61*4882a593SmuzhiyunRequired properties for Interrupt controller child node:
62*4882a593Smuzhiyun- interrupt-controller: identifies the node as an interrupt controller
63*4882a593Smuzhiyun- #address-cells: specifies the number of cells needed to encode an
64*4882a593Smuzhiyun	address. The value must be 0.
65*4882a593Smuzhiyun- #interrupt-cells: specifies the number of cells needed to encode an
66*4882a593Smuzhiyun	interrupt source. The value must be 1.
67*4882a593Smuzhiyun
68*4882a593SmuzhiyunExample:
69*4882a593Smuzhiyun
70*4882a593Smuzhiyunpcie0: pcie@f8000000 {
71*4882a593Smuzhiyun	compatible = "rockchip,rk3399-pcie";
72*4882a593Smuzhiyun	#address-cells = <3>;
73*4882a593Smuzhiyun	#size-cells = <2>;
74*4882a593Smuzhiyun	clocks = <&cru ACLK_PCIE>, <&cru ACLK_PERF_PCIE>,
75*4882a593Smuzhiyun		 <&cru PCLK_PCIE>, <&cru SCLK_PCIE_PM>;
76*4882a593Smuzhiyun	clock-names = "aclk", "aclk-perf",
77*4882a593Smuzhiyun		      "hclk", "pm";
78*4882a593Smuzhiyun	bus-range = <0x0 0x1>;
79*4882a593Smuzhiyun	interrupts = <GIC_SPI 49 IRQ_TYPE_LEVEL_HIGH 0>,
80*4882a593Smuzhiyun		     <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH 0>,
81*4882a593Smuzhiyun		     <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH 0>;
82*4882a593Smuzhiyun	interrupt-names = "sys", "legacy", "client";
83*4882a593Smuzhiyun	assigned-clocks = <&cru SCLK_PCIEPHY_REF>;
84*4882a593Smuzhiyun	assigned-clock-parents = <&cru SCLK_PCIEPHY_REF100M>;
85*4882a593Smuzhiyun	assigned-clock-rates = <100000000>;
86*4882a593Smuzhiyun	ep-gpios = <&gpio3 13 GPIO_ACTIVE_HIGH>;
87*4882a593Smuzhiyun	ranges = <0x83000000 0x0 0xfa000000 0x0 0xfa000000 0x0 0x600000
88*4882a593Smuzhiyun		  0x81000000 0x0 0xfa600000 0x0 0xfa600000 0x0 0x100000>;
89*4882a593Smuzhiyun	num-lanes = <4>;
90*4882a593Smuzhiyun	msi-map = <0x0 &its 0x0 0x1000>;
91*4882a593Smuzhiyun	reg = <0x0 0xf8000000 0x0 0x2000000>, <0x0 0xfd000000 0x0 0x1000000>;
92*4882a593Smuzhiyun	reg-names = "axi-base", "apb-base";
93*4882a593Smuzhiyun	resets = <&cru SRST_PCIE_CORE>, <&cru SRST_PCIE_MGMT>,
94*4882a593Smuzhiyun		 <&cru SRST_PCIE_MGMT_STICKY>, <&cru SRST_PCIE_PIPE> ,
95*4882a593Smuzhiyun		 <&cru SRST_PCIE_PM>, <&cru SRST_P_PCIE>, <&cru SRST_A_PCIE>;
96*4882a593Smuzhiyun	reset-names = "core", "mgmt", "mgmt-sticky", "pipe",
97*4882a593Smuzhiyun		      "pm", "pclk", "aclk";
98*4882a593Smuzhiyun	phys = <&pcie_phy>;
99*4882a593Smuzhiyun	phy-names = "pcie-phy";
100*4882a593Smuzhiyun	pinctrl-names = "default";
101*4882a593Smuzhiyun	pinctrl-0 = <&pcie_clkreq>;
102*4882a593Smuzhiyun	#interrupt-cells = <1>;
103*4882a593Smuzhiyun	interrupt-map-mask = <0 0 0 7>;
104*4882a593Smuzhiyun	interrupt-map = <0 0 0 1 &pcie0_intc 0>,
105*4882a593Smuzhiyun			<0 0 0 2 &pcie0_intc 1>,
106*4882a593Smuzhiyun			<0 0 0 3 &pcie0_intc 2>,
107*4882a593Smuzhiyun			<0 0 0 4 &pcie0_intc 3>;
108*4882a593Smuzhiyun	pcie0_intc: interrupt-controller {
109*4882a593Smuzhiyun		interrupt-controller;
110*4882a593Smuzhiyun		#address-cells = <0>;
111*4882a593Smuzhiyun		#interrupt-cells = <1>;
112*4882a593Smuzhiyun	};
113*4882a593Smuzhiyun};
114