Skip to content

Commit 0acf4fa

Browse files
sremmind
authored andcommitted
arm64: dts: rockchip: add PCIe3 support for rk3588
Add both PCIe3 controllers together with the shared PHY. Signed-off-by: Sebastian Reichel <[email protected]> Link: https://lore.kernel.org/r/[email protected] Signed-off-by: Heiko Stuebner <[email protected]>
1 parent c75b725 commit 0acf4fa

File tree

1 file changed

+120
-0
lines changed

1 file changed

+120
-0
lines changed

arch/arm64/boot/dts/rockchip/rk3588.dtsi

Lines changed: 120 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,11 @@
77
#include "rk3588-pinctrl.dtsi"
88

99
/ {
10+
pcie30_phy_grf: syscon@fd5b8000 {
11+
compatible = "rockchip,rk3588-pcie3-phy-grf", "syscon";
12+
reg = <0x0 0xfd5b8000 0x0 0x10000>;
13+
};
14+
1015
pipe_phy1_grf: syscon@fd5c0000 {
1116
compatible = "rockchip,rk3588-pipe-phy-grf", "syscon";
1217
reg = <0x0 0xfd5c0000 0x0 0x100>;
@@ -80,6 +85,108 @@
8085
status = "disabled";
8186
};
8287

88+
pcie3x4: pcie@fe150000 {
89+
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
90+
#address-cells = <3>;
91+
#size-cells = <2>;
92+
bus-range = <0x00 0x0f>;
93+
clocks = <&cru ACLK_PCIE_4L_MSTR>, <&cru ACLK_PCIE_4L_SLV>,
94+
<&cru ACLK_PCIE_4L_DBI>, <&cru PCLK_PCIE_4L>,
95+
<&cru CLK_PCIE_AUX0>, <&cru CLK_PCIE4L_PIPE>;
96+
clock-names = "aclk_mst", "aclk_slv",
97+
"aclk_dbi", "pclk",
98+
"aux", "pipe";
99+
device_type = "pci";
100+
interrupts = <GIC_SPI 263 IRQ_TYPE_LEVEL_HIGH 0>,
101+
<GIC_SPI 262 IRQ_TYPE_LEVEL_HIGH 0>,
102+
<GIC_SPI 261 IRQ_TYPE_LEVEL_HIGH 0>,
103+
<GIC_SPI 260 IRQ_TYPE_LEVEL_HIGH 0>,
104+
<GIC_SPI 259 IRQ_TYPE_LEVEL_HIGH 0>;
105+
interrupt-names = "sys", "pmc", "msg", "legacy", "err";
106+
#interrupt-cells = <1>;
107+
interrupt-map-mask = <0 0 0 7>;
108+
interrupt-map = <0 0 0 1 &pcie3x4_intc 0>,
109+
<0 0 0 2 &pcie3x4_intc 1>,
110+
<0 0 0 3 &pcie3x4_intc 2>,
111+
<0 0 0 4 &pcie3x4_intc 3>;
112+
linux,pci-domain = <0>;
113+
max-link-speed = <3>;
114+
msi-map = <0x0000 &its1 0x0000 0x1000>;
115+
num-lanes = <4>;
116+
phys = <&pcie30phy>;
117+
phy-names = "pcie-phy";
118+
power-domains = <&power RK3588_PD_PCIE>;
119+
ranges = <0x01000000 0x0 0xf0100000 0x0 0xf0100000 0x0 0x00100000>,
120+
<0x02000000 0x0 0xf0200000 0x0 0xf0200000 0x0 0x00e00000>,
121+
<0x03000000 0x0 0x40000000 0x9 0x00000000 0x0 0x40000000>;
122+
reg = <0xa 0x40000000 0x0 0x00400000>,
123+
<0x0 0xfe150000 0x0 0x00010000>,
124+
<0x0 0xf0000000 0x0 0x00100000>;
125+
reg-names = "dbi", "apb", "config";
126+
resets = <&cru SRST_PCIE0_POWER_UP>, <&cru SRST_P_PCIE0>;
127+
reset-names = "pwr", "pipe";
128+
status = "disabled";
129+
130+
pcie3x4_intc: legacy-interrupt-controller {
131+
interrupt-controller;
132+
#address-cells = <0>;
133+
#interrupt-cells = <1>;
134+
interrupt-parent = <&gic>;
135+
interrupts = <GIC_SPI 260 IRQ_TYPE_EDGE_RISING 0>;
136+
};
137+
};
138+
139+
pcie3x2: pcie@fe160000 {
140+
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
141+
#address-cells = <3>;
142+
#size-cells = <2>;
143+
bus-range = <0x10 0x1f>;
144+
clocks = <&cru ACLK_PCIE_2L_MSTR>, <&cru ACLK_PCIE_2L_SLV>,
145+
<&cru ACLK_PCIE_2L_DBI>, <&cru PCLK_PCIE_2L>,
146+
<&cru CLK_PCIE_AUX1>, <&cru CLK_PCIE2L_PIPE>;
147+
clock-names = "aclk_mst", "aclk_slv",
148+
"aclk_dbi", "pclk",
149+
"aux", "pipe";
150+
device_type = "pci";
151+
interrupts = <GIC_SPI 258 IRQ_TYPE_LEVEL_HIGH 0>,
152+
<GIC_SPI 257 IRQ_TYPE_LEVEL_HIGH 0>,
153+
<GIC_SPI 256 IRQ_TYPE_LEVEL_HIGH 0>,
154+
<GIC_SPI 255 IRQ_TYPE_LEVEL_HIGH 0>,
155+
<GIC_SPI 254 IRQ_TYPE_LEVEL_HIGH 0>;
156+
interrupt-names = "sys", "pmc", "msg", "legacy", "err";
157+
#interrupt-cells = <1>;
158+
interrupt-map-mask = <0 0 0 7>;
159+
interrupt-map = <0 0 0 1 &pcie3x2_intc 0>,
160+
<0 0 0 2 &pcie3x2_intc 1>,
161+
<0 0 0 3 &pcie3x2_intc 2>,
162+
<0 0 0 4 &pcie3x2_intc 3>;
163+
linux,pci-domain = <1>;
164+
max-link-speed = <3>;
165+
msi-map = <0x1000 &its1 0x1000 0x1000>;
166+
num-lanes = <2>;
167+
phys = <&pcie30phy>;
168+
phy-names = "pcie-phy";
169+
power-domains = <&power RK3588_PD_PCIE>;
170+
ranges = <0x01000000 0x0 0xf1100000 0x0 0xf1100000 0x0 0x00100000>,
171+
<0x02000000 0x0 0xf1200000 0x0 0xf1200000 0x0 0x00e00000>,
172+
<0x03000000 0x0 0x40000000 0x9 0x40000000 0x0 0x40000000>;
173+
reg = <0xa 0x40400000 0x0 0x00400000>,
174+
<0x0 0xfe160000 0x0 0x00010000>,
175+
<0x0 0xf1000000 0x0 0x00100000>;
176+
reg-names = "dbi", "apb", "config";
177+
resets = <&cru SRST_PCIE1_POWER_UP>, <&cru SRST_P_PCIE1>;
178+
reset-names = "pwr", "pipe";
179+
status = "disabled";
180+
181+
pcie3x2_intc: legacy-interrupt-controller {
182+
interrupt-controller;
183+
#address-cells = <0>;
184+
#interrupt-cells = <1>;
185+
interrupt-parent = <&gic>;
186+
interrupts = <GIC_SPI 255 IRQ_TYPE_EDGE_RISING 0>;
187+
};
188+
};
189+
83190
gmac0: ethernet@fe1b0000 {
84191
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
85192
reg = <0x0 0xfe1b0000 0x0 0x10000>;
@@ -167,4 +274,17 @@
167274
rockchip,pipe-phy-grf = <&pipe_phy1_grf>;
168275
status = "disabled";
169276
};
277+
278+
pcie30phy: phy@fee80000 {
279+
compatible = "rockchip,rk3588-pcie3-phy";
280+
reg = <0x0 0xfee80000 0x0 0x20000>;
281+
#phy-cells = <0>;
282+
clocks = <&cru PCLK_PCIE_COMBO_PIPE_PHY>;
283+
clock-names = "pclk";
284+
resets = <&cru SRST_PCIE30_PHY>;
285+
reset-names = "phy";
286+
rockchip,pipe-grf = <&php_grf>;
287+
rockchip,phy-grf = <&pcie30_phy_grf>;
288+
status = "disabled";
289+
};
170290
};

0 commit comments

Comments
 (0)