Skip to content

Commit 8d81b77

Browse files
sremmind
authored andcommitted
arm64: dts: rockchip: add rk3588 PCIe2 support
Add all three PCIe2 IP blocks to the RK3588 DT. Note, that RK3588 also has two PCIe3 IP blocks, that will be handled separately. Co-developed-by: Kever Yang <kever.yang@rock-chips.com> Signed-off-by: Kever Yang <kever.yang@rock-chips.com> Tested-by: Jagan Teki <jagan@edgeble.ai> # edgeble-neu6a, 6b Reviewed-by: Jagan Teki <jagan@edgeble.ai> Signed-off-by: Sebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20230731165723.53069-6-sebastian.reichel@collabora.com Signed-off-by: Heiko Stuebner <heiko@sntech.de>
1 parent eddf730 commit 8d81b77

File tree

2 files changed

+153
-0
lines changed

2 files changed

+153
-0
lines changed

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

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -187,6 +187,57 @@
187187
};
188188
};
189189

190+
pcie2x1l0: pcie@fe170000 {
191+
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
192+
bus-range = <0x20 0x2f>;
193+
clocks = <&cru ACLK_PCIE_1L0_MSTR>, <&cru ACLK_PCIE_1L0_SLV>,
194+
<&cru ACLK_PCIE_1L0_DBI>, <&cru PCLK_PCIE_1L0>,
195+
<&cru CLK_PCIE_AUX2>, <&cru CLK_PCIE1L0_PIPE>;
196+
clock-names = "aclk_mst", "aclk_slv",
197+
"aclk_dbi", "pclk",
198+
"aux", "pipe";
199+
device_type = "pci";
200+
interrupts = <GIC_SPI 243 IRQ_TYPE_LEVEL_HIGH 0>,
201+
<GIC_SPI 242 IRQ_TYPE_LEVEL_HIGH 0>,
202+
<GIC_SPI 241 IRQ_TYPE_LEVEL_HIGH 0>,
203+
<GIC_SPI 240 IRQ_TYPE_LEVEL_HIGH 0>,
204+
<GIC_SPI 239 IRQ_TYPE_LEVEL_HIGH 0>;
205+
interrupt-names = "sys", "pmc", "msg", "legacy", "err";
206+
#interrupt-cells = <1>;
207+
interrupt-map-mask = <0 0 0 7>;
208+
interrupt-map = <0 0 0 1 &pcie2x1l0_intc 0>,
209+
<0 0 0 2 &pcie2x1l0_intc 1>,
210+
<0 0 0 3 &pcie2x1l0_intc 2>,
211+
<0 0 0 4 &pcie2x1l0_intc 3>;
212+
linux,pci-domain = <2>;
213+
max-link-speed = <2>;
214+
msi-map = <0x2000 &its0 0x2000 0x1000>;
215+
num-lanes = <1>;
216+
phys = <&combphy1_ps PHY_TYPE_PCIE>;
217+
phy-names = "pcie-phy";
218+
power-domains = <&power RK3588_PD_PCIE>;
219+
ranges = <0x01000000 0x0 0xf2100000 0x0 0xf2100000 0x0 0x00100000>,
220+
<0x02000000 0x0 0xf2200000 0x0 0xf2200000 0x0 0x00e00000>,
221+
<0x03000000 0x0 0x40000000 0x9 0x80000000 0x0 0x40000000>;
222+
reg = <0xa 0x40800000 0x0 0x00400000>,
223+
<0x0 0xfe170000 0x0 0x00010000>,
224+
<0x0 0xf2000000 0x0 0x00100000>;
225+
reg-names = "dbi", "apb", "config";
226+
resets = <&cru SRST_PCIE2_POWER_UP>, <&cru SRST_P_PCIE2>;
227+
reset-names = "pwr", "pipe";
228+
#address-cells = <3>;
229+
#size-cells = <2>;
230+
status = "disabled";
231+
232+
pcie2x1l0_intc: legacy-interrupt-controller {
233+
interrupt-controller;
234+
#address-cells = <0>;
235+
#interrupt-cells = <1>;
236+
interrupt-parent = <&gic>;
237+
interrupts = <GIC_SPI 240 IRQ_TYPE_EDGE_RISING 0>;
238+
};
239+
};
240+
190241
gmac0: ethernet@fe1b0000 {
191242
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
192243
reg = <0x0 0xfe1b0000 0x0 0x10000>;

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

Lines changed: 102 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1227,6 +1227,108 @@
12271227
reg = <0x0 0xfdf82200 0x0 0x20>;
12281228
};
12291229

1230+
pcie2x1l1: pcie@fe180000 {
1231+
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
1232+
bus-range = <0x30 0x3f>;
1233+
clocks = <&cru ACLK_PCIE_1L1_MSTR>, <&cru ACLK_PCIE_1L1_SLV>,
1234+
<&cru ACLK_PCIE_1L1_DBI>, <&cru PCLK_PCIE_1L1>,
1235+
<&cru CLK_PCIE_AUX3>, <&cru CLK_PCIE1L1_PIPE>;
1236+
clock-names = "aclk_mst", "aclk_slv",
1237+
"aclk_dbi", "pclk",
1238+
"aux", "pipe";
1239+
device_type = "pci";
1240+
interrupts = <GIC_SPI 248 IRQ_TYPE_LEVEL_HIGH 0>,
1241+
<GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH 0>,
1242+
<GIC_SPI 246 IRQ_TYPE_LEVEL_HIGH 0>,
1243+
<GIC_SPI 245 IRQ_TYPE_LEVEL_HIGH 0>,
1244+
<GIC_SPI 244 IRQ_TYPE_LEVEL_HIGH 0>;
1245+
interrupt-names = "sys", "pmc", "msg", "legacy", "err";
1246+
#interrupt-cells = <1>;
1247+
interrupt-map-mask = <0 0 0 7>;
1248+
interrupt-map = <0 0 0 1 &pcie2x1l1_intc 0>,
1249+
<0 0 0 2 &pcie2x1l1_intc 1>,
1250+
<0 0 0 3 &pcie2x1l1_intc 2>,
1251+
<0 0 0 4 &pcie2x1l1_intc 3>;
1252+
linux,pci-domain = <3>;
1253+
max-link-speed = <2>;
1254+
msi-map = <0x3000 &its0 0x3000 0x1000>;
1255+
num-lanes = <1>;
1256+
phys = <&combphy2_psu PHY_TYPE_PCIE>;
1257+
phy-names = "pcie-phy";
1258+
power-domains = <&power RK3588_PD_PCIE>;
1259+
ranges = <0x01000000 0x0 0xf3100000 0x0 0xf3100000 0x0 0x00100000>,
1260+
<0x02000000 0x0 0xf3200000 0x0 0xf3200000 0x0 0x00e00000>,
1261+
<0x03000000 0x0 0x40000000 0x9 0xc0000000 0x0 0x40000000>;
1262+
reg = <0xa 0x40c00000 0x0 0x00400000>,
1263+
<0x0 0xfe180000 0x0 0x00010000>,
1264+
<0x0 0xf3000000 0x0 0x00100000>;
1265+
reg-names = "dbi", "apb", "config";
1266+
resets = <&cru SRST_PCIE3_POWER_UP>, <&cru SRST_P_PCIE3>;
1267+
reset-names = "pwr", "pipe";
1268+
#address-cells = <3>;
1269+
#size-cells = <2>;
1270+
status = "disabled";
1271+
1272+
pcie2x1l1_intc: legacy-interrupt-controller {
1273+
interrupt-controller;
1274+
#address-cells = <0>;
1275+
#interrupt-cells = <1>;
1276+
interrupt-parent = <&gic>;
1277+
interrupts = <GIC_SPI 245 IRQ_TYPE_EDGE_RISING 0>;
1278+
};
1279+
};
1280+
1281+
pcie2x1l2: pcie@fe190000 {
1282+
compatible = "rockchip,rk3588-pcie", "rockchip,rk3568-pcie";
1283+
bus-range = <0x40 0x4f>;
1284+
clocks = <&cru ACLK_PCIE_1L2_MSTR>, <&cru ACLK_PCIE_1L2_SLV>,
1285+
<&cru ACLK_PCIE_1L2_DBI>, <&cru PCLK_PCIE_1L2>,
1286+
<&cru CLK_PCIE_AUX4>, <&cru CLK_PCIE1L2_PIPE>;
1287+
clock-names = "aclk_mst", "aclk_slv",
1288+
"aclk_dbi", "pclk",
1289+
"aux", "pipe";
1290+
device_type = "pci";
1291+
interrupts = <GIC_SPI 253 IRQ_TYPE_LEVEL_HIGH 0>,
1292+
<GIC_SPI 252 IRQ_TYPE_LEVEL_HIGH 0>,
1293+
<GIC_SPI 251 IRQ_TYPE_LEVEL_HIGH 0>,
1294+
<GIC_SPI 250 IRQ_TYPE_LEVEL_HIGH 0>,
1295+
<GIC_SPI 249 IRQ_TYPE_LEVEL_HIGH 0>;
1296+
interrupt-names = "sys", "pmc", "msg", "legacy", "err";
1297+
#interrupt-cells = <1>;
1298+
interrupt-map-mask = <0 0 0 7>;
1299+
interrupt-map = <0 0 0 1 &pcie2x1l2_intc 0>,
1300+
<0 0 0 2 &pcie2x1l2_intc 1>,
1301+
<0 0 0 3 &pcie2x1l2_intc 2>,
1302+
<0 0 0 4 &pcie2x1l2_intc 3>;
1303+
linux,pci-domain = <4>;
1304+
max-link-speed = <2>;
1305+
msi-map = <0x4000 &its0 0x4000 0x1000>;
1306+
num-lanes = <1>;
1307+
phys = <&combphy0_ps PHY_TYPE_PCIE>;
1308+
phy-names = "pcie-phy";
1309+
power-domains = <&power RK3588_PD_PCIE>;
1310+
ranges = <0x01000000 0x0 0xf4100000 0x0 0xf4100000 0x0 0x00100000>,
1311+
<0x02000000 0x0 0xf4200000 0x0 0xf4200000 0x0 0x00e00000>,
1312+
<0x03000000 0x0 0x40000000 0xa 0x00000000 0x0 0x40000000>;
1313+
reg = <0xa 0x41000000 0x0 0x00400000>,
1314+
<0x0 0xfe190000 0x0 0x00010000>,
1315+
<0x0 0xf4000000 0x0 0x00100000>;
1316+
reg-names = "dbi", "apb", "config";
1317+
resets = <&cru SRST_PCIE4_POWER_UP>, <&cru SRST_P_PCIE4>;
1318+
reset-names = "pwr", "pipe";
1319+
#address-cells = <3>;
1320+
#size-cells = <2>;
1321+
status = "disabled";
1322+
1323+
pcie2x1l2_intc: legacy-interrupt-controller {
1324+
interrupt-controller;
1325+
#address-cells = <0>;
1326+
#interrupt-cells = <1>;
1327+
interrupt-parent = <&gic>;
1328+
interrupts = <GIC_SPI 250 IRQ_TYPE_EDGE_RISING 0>;
1329+
};
1330+
};
1331+
12301332
gmac1: ethernet@fe1c0000 {
12311333
compatible = "rockchip,rk3588-gmac", "snps,dwmac-4.20a";
12321334
reg = <0x0 0xfe1c0000 0x0 0x10000>;

0 commit comments

Comments
 (0)