Skip to content

Commit cb61c9d

Browse files
unicornxRevySR
authored andcommitted
FROMLIST: riscv: sophgo: dts: add pcie controllers for SG2042
Add PCIe controller nodes in DTS for Sophgo SG2042. Default they are disabled. Signed-off-by: Chen Wang <[email protected]> Link: https://lore.kernel.org/r/4a1f23e5426bfb56cad9c07f90d4efaad5eab976.1736923025.git.unicorn_wang@outlook.com Signed-off-by: Han Gao <[email protected]>
1 parent bcd50eb commit cb61c9d

File tree

1 file changed

+89
-0
lines changed

1 file changed

+89
-0
lines changed

arch/riscv/boot/dts/sophgo/sg2042.dtsi

Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -244,6 +244,95 @@
244244
#clock-cells = <1>;
245245
};
246246

247+
pcie_rc0: pcie@7060000000 {
248+
compatible = "sophgo,sg2042-pcie-host";
249+
device_type = "pci";
250+
reg = <0x70 0x60000000 0x0 0x02000000>,
251+
<0x40 0x00000000 0x0 0x00001000>;
252+
reg-names = "reg", "cfg";
253+
linux,pci-domain = <0>;
254+
#address-cells = <3>;
255+
#size-cells = <2>;
256+
ranges = <0x01000000 0x0 0xc0000000 0x40 0xc0000000 0x0 0x00400000>,
257+
<0x42000000 0x0 0xd0000000 0x40 0xd0000000 0x0 0x10000000>,
258+
<0x02000000 0x0 0xe0000000 0x40 0xe0000000 0x0 0x20000000>,
259+
<0x43000000 0x42 0x00000000 0x42 0x00000000 0x2 0x00000000>,
260+
<0x03000000 0x41 0x00000000 0x41 0x00000000 0x1 0x00000000>;
261+
bus-range = <0x0 0xff>;
262+
vendor-id = <0x1f1c>;
263+
device-id = <0x2042>;
264+
cdns,no-bar-match-nbits = <48>;
265+
sophgo,link-id = <0>;
266+
sophgo,syscon-pcie-ctrl = <&cdns_pcie0_ctrl>;
267+
msi-parent = <&msi>;
268+
status = "disabled";
269+
};
270+
271+
cdns_pcie0_ctrl: syscon@7061800000 {
272+
compatible = "sophgo,sg2042-pcie-ctrl", "syscon";
273+
reg = <0x70 0x61800000 0x0 0x800000>;
274+
};
275+
276+
pcie_rc1: pcie@7062000000 {
277+
compatible = "sophgo,sg2042-pcie-host";
278+
device_type = "pci";
279+
reg = <0x70 0x62000000 0x0 0x00800000>,
280+
<0x48 0x00000000 0x0 0x00001000>;
281+
reg-names = "reg", "cfg";
282+
linux,pci-domain = <1>;
283+
#address-cells = <3>;
284+
#size-cells = <2>;
285+
ranges = <0x01000000 0x0 0xc0800000 0x48 0xc0800000 0x0 0x00400000>,
286+
<0x42000000 0x0 0xd0000000 0x48 0xd0000000 0x0 0x10000000>,
287+
<0x02000000 0x0 0xe0000000 0x48 0xe0000000 0x0 0x20000000>,
288+
<0x03000000 0x49 0x00000000 0x49 0x00000000 0x1 0x00000000>,
289+
<0x43000000 0x4a 0x00000000 0x4a 0x00000000 0x2 0x00000000>;
290+
bus-range = <0x0 0xff>;
291+
vendor-id = <0x1f1c>;
292+
device-id = <0x2042>;
293+
cdns,no-bar-match-nbits = <48>;
294+
sophgo,link-id = <0>;
295+
sophgo,syscon-pcie-ctrl = <&cdns_pcie1_ctrl>;
296+
msi-parent = <&msi_pcie>;
297+
status = "disabled";
298+
msi_pcie: msi {
299+
compatible = "sophgo,sg2042-pcie-msi";
300+
msi-controller;
301+
interrupt-parent = <&intc>;
302+
interrupts = <123 IRQ_TYPE_LEVEL_HIGH>;
303+
interrupt-names = "msi";
304+
};
305+
};
306+
307+
pcie_rc2: pcie@7062800000 {
308+
compatible = "sophgo,sg2042-pcie-host";
309+
device_type = "pci";
310+
reg = <0x70 0x62800000 0x0 0x00800000>,
311+
<0x4c 0x00000000 0x0 0x00001000>;
312+
reg-names = "reg", "cfg";
313+
linux,pci-domain = <2>;
314+
#address-cells = <3>;
315+
#size-cells = <2>;
316+
ranges = <0x01000000 0x0 0xc0c00000 0x4c 0xc0c00000 0x0 0x00400000>,
317+
<0x42000000 0x0 0xf8000000 0x4c 0xf8000000 0x0 0x04000000>,
318+
<0x02000000 0x0 0xfc000000 0x4c 0xfc000000 0x0 0x04000000>,
319+
<0x43000000 0x4e 0x00000000 0x4e 0x00000000 0x2 0x00000000>,
320+
<0x03000000 0x4d 0x00000000 0x4d 0x00000000 0x1 0x00000000>;
321+
bus-range = <0x0 0xff>;
322+
vendor-id = <0x1f1c>;
323+
device-id = <0x2042>;
324+
cdns,no-bar-match-nbits = <48>;
325+
sophgo,link-id = <1>;
326+
sophgo,syscon-pcie-ctrl = <&cdns_pcie1_ctrl>;
327+
msi-parent = <&msi>;
328+
status = "disabled";
329+
};
330+
331+
cdns_pcie1_ctrl: syscon@7063800000 {
332+
compatible = "sophgo,sg2042-pcie-ctrl", "syscon";
333+
reg = <0x70 0x63800000 0x0 0x800000>;
334+
};
335+
247336
clint_mswi: interrupt-controller@7094000000 {
248337
compatible = "sophgo,sg2042-aclint-mswi", "thead,c900-aclint-mswi";
249338
reg = <0x00000070 0x94000000 0x00000000 0x00004000>;

0 commit comments

Comments
 (0)