Skip to content

Commit ebb87dd

Browse files
committed
riscv: dts: sophgo: fix the node order of SG2042 peripheral
In sg2042.dtsi, some peripheral device node does not follow the address order. Reorder them in ascending order by address. Reviewed-by: Chen Wang <unicorn_wang@outlook.com> Link: https://lore.kernel.org/r/20260113023828.790136-2-inochiama@gmail.com Signed-off-by: Inochi Amaoto <inochiama@gmail.com> Signed-off-by: Chen Wang <unicorn_wang@outlook.com> Signed-off-by: Chen Wang <wangchen20@iscas.ac.cn>
1 parent 5e6836e commit ebb87dd

1 file changed

Lines changed: 88 additions & 88 deletions

File tree

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

Lines changed: 88 additions & 88 deletions
Original file line numberDiff line numberDiff line change
@@ -264,94 +264,6 @@
264264
#clock-cells = <1>;
265265
};
266266

267-
pcie_rc0: pcie@7060000000 {
268-
compatible = "sophgo,sg2042-pcie-host";
269-
device_type = "pci";
270-
reg = <0x70 0x60000000 0x0 0x00800000>,
271-
<0x40 0x00000000 0x0 0x00001000>;
272-
reg-names = "reg", "cfg";
273-
linux,pci-domain = <0>;
274-
#address-cells = <3>;
275-
#size-cells = <2>;
276-
ranges = <0x01000000 0x0 0x00000000 0x40 0xc0000000 0x0 0x00400000>,
277-
<0x42000000 0x0 0xd0000000 0x40 0xd0000000 0x0 0x10000000>,
278-
<0x02000000 0x0 0xe0000000 0x40 0xe0000000 0x0 0x20000000>,
279-
<0x43000000 0x42 0x00000000 0x42 0x00000000 0x2 0x00000000>,
280-
<0x03000000 0x41 0x00000000 0x41 0x00000000 0x1 0x00000000>;
281-
bus-range = <0x0 0xff>;
282-
vendor-id = <0x1f1c>;
283-
device-id = <0x2042>;
284-
cdns,no-bar-match-nbits = <48>;
285-
msi-parent = <&msi>;
286-
status = "disabled";
287-
};
288-
289-
pcie_rc1: pcie@7060800000 {
290-
compatible = "sophgo,sg2042-pcie-host";
291-
device_type = "pci";
292-
reg = <0x70 0x60800000 0x0 0x00800000>,
293-
<0x44 0x00000000 0x0 0x00001000>;
294-
reg-names = "reg", "cfg";
295-
linux,pci-domain = <1>;
296-
#address-cells = <3>;
297-
#size-cells = <2>;
298-
ranges = <0x01000000 0x0 0x00000000 0x44 0xc0400000 0x0 0x00400000>,
299-
<0x42000000 0x0 0xd0000000 0x44 0xd0000000 0x0 0x10000000>,
300-
<0x02000000 0x0 0xe0000000 0x44 0xe0000000 0x0 0x20000000>,
301-
<0x43000000 0x46 0x00000000 0x46 0x00000000 0x2 0x00000000>,
302-
<0x03000000 0x45 0x00000000 0x45 0x00000000 0x1 0x00000000>;
303-
bus-range = <0x0 0xff>;
304-
vendor-id = <0x1f1c>;
305-
device-id = <0x2042>;
306-
cdns,no-bar-match-nbits = <48>;
307-
msi-parent = <&msi>;
308-
status = "disabled";
309-
};
310-
311-
pcie_rc2: pcie@7062000000 {
312-
compatible = "sophgo,sg2042-pcie-host";
313-
device_type = "pci";
314-
reg = <0x70 0x62000000 0x0 0x00800000>,
315-
<0x48 0x00000000 0x0 0x00001000>;
316-
reg-names = "reg", "cfg";
317-
linux,pci-domain = <2>;
318-
#address-cells = <3>;
319-
#size-cells = <2>;
320-
ranges = <0x01000000 0x0 0x00000000 0x48 0xc0800000 0x0 0x00400000>,
321-
<0x42000000 0x0 0xd0000000 0x48 0xd0000000 0x0 0x10000000>,
322-
<0x02000000 0x0 0xe0000000 0x48 0xe0000000 0x0 0x20000000>,
323-
<0x03000000 0x49 0x00000000 0x49 0x00000000 0x1 0x00000000>,
324-
<0x43000000 0x4a 0x00000000 0x4a 0x00000000 0x2 0x00000000>;
325-
bus-range = <0x0 0xff>;
326-
vendor-id = <0x1f1c>;
327-
device-id = <0x2042>;
328-
cdns,no-bar-match-nbits = <48>;
329-
msi-parent = <&msi>;
330-
status = "disabled";
331-
};
332-
333-
pcie_rc3: pcie@7062800000 {
334-
compatible = "sophgo,sg2042-pcie-host";
335-
device_type = "pci";
336-
reg = <0x70 0x62800000 0x0 0x00800000>,
337-
<0x4c 0x00000000 0x0 0x00001000>;
338-
reg-names = "reg", "cfg";
339-
linux,pci-domain = <3>;
340-
#address-cells = <3>;
341-
#size-cells = <2>;
342-
ranges = <0x01000000 0x0 0x00000000 0x4c 0xc0c00000 0x0 0x00400000>,
343-
<0x42000000 0x0 0xf8000000 0x4c 0xf8000000 0x0 0x04000000>,
344-
<0x02000000 0x0 0xfc000000 0x4c 0xfc000000 0x0 0x04000000>,
345-
<0x43000000 0x4e 0x00000000 0x4e 0x00000000 0x2 0x00000000>,
346-
<0x03000000 0x4d 0x00000000 0x4d 0x00000000 0x1 0x00000000>;
347-
bus-range = <0x0 0xff>;
348-
vendor-id = <0x1f1c>;
349-
device-id = <0x2042>;
350-
cdns,no-bar-match-nbits = <48>;
351-
msi-parent = <&msi>;
352-
status = "disabled";
353-
};
354-
355267
rstgen: reset-controller@7030013000 {
356268
compatible = "sophgo,sg2042-reset";
357269
reg = <0x00000070 0x30013000 0x00000000 0x0000000c>;
@@ -486,5 +398,93 @@
486398
"timer";
487399
status = "disabled";
488400
};
401+
402+
pcie_rc0: pcie@7060000000 {
403+
compatible = "sophgo,sg2042-pcie-host";
404+
device_type = "pci";
405+
reg = <0x70 0x60000000 0x0 0x00800000>,
406+
<0x40 0x00000000 0x0 0x00001000>;
407+
reg-names = "reg", "cfg";
408+
linux,pci-domain = <0>;
409+
#address-cells = <3>;
410+
#size-cells = <2>;
411+
ranges = <0x01000000 0x0 0x00000000 0x40 0xc0000000 0x0 0x00400000>,
412+
<0x42000000 0x0 0xd0000000 0x40 0xd0000000 0x0 0x10000000>,
413+
<0x02000000 0x0 0xe0000000 0x40 0xe0000000 0x0 0x20000000>,
414+
<0x43000000 0x42 0x00000000 0x42 0x00000000 0x2 0x00000000>,
415+
<0x03000000 0x41 0x00000000 0x41 0x00000000 0x1 0x00000000>;
416+
bus-range = <0x0 0xff>;
417+
vendor-id = <0x1f1c>;
418+
device-id = <0x2042>;
419+
cdns,no-bar-match-nbits = <48>;
420+
msi-parent = <&msi>;
421+
status = "disabled";
422+
};
423+
424+
pcie_rc1: pcie@7060800000 {
425+
compatible = "sophgo,sg2042-pcie-host";
426+
device_type = "pci";
427+
reg = <0x70 0x60800000 0x0 0x00800000>,
428+
<0x44 0x00000000 0x0 0x00001000>;
429+
reg-names = "reg", "cfg";
430+
linux,pci-domain = <1>;
431+
#address-cells = <3>;
432+
#size-cells = <2>;
433+
ranges = <0x01000000 0x0 0x00000000 0x44 0xc0400000 0x0 0x00400000>,
434+
<0x42000000 0x0 0xd0000000 0x44 0xd0000000 0x0 0x10000000>,
435+
<0x02000000 0x0 0xe0000000 0x44 0xe0000000 0x0 0x20000000>,
436+
<0x43000000 0x46 0x00000000 0x46 0x00000000 0x2 0x00000000>,
437+
<0x03000000 0x45 0x00000000 0x45 0x00000000 0x1 0x00000000>;
438+
bus-range = <0x0 0xff>;
439+
vendor-id = <0x1f1c>;
440+
device-id = <0x2042>;
441+
cdns,no-bar-match-nbits = <48>;
442+
msi-parent = <&msi>;
443+
status = "disabled";
444+
};
445+
446+
pcie_rc2: pcie@7062000000 {
447+
compatible = "sophgo,sg2042-pcie-host";
448+
device_type = "pci";
449+
reg = <0x70 0x62000000 0x0 0x00800000>,
450+
<0x48 0x00000000 0x0 0x00001000>;
451+
reg-names = "reg", "cfg";
452+
linux,pci-domain = <2>;
453+
#address-cells = <3>;
454+
#size-cells = <2>;
455+
ranges = <0x01000000 0x0 0x00000000 0x48 0xc0800000 0x0 0x00400000>,
456+
<0x42000000 0x0 0xd0000000 0x48 0xd0000000 0x0 0x10000000>,
457+
<0x02000000 0x0 0xe0000000 0x48 0xe0000000 0x0 0x20000000>,
458+
<0x03000000 0x49 0x00000000 0x49 0x00000000 0x1 0x00000000>,
459+
<0x43000000 0x4a 0x00000000 0x4a 0x00000000 0x2 0x00000000>;
460+
bus-range = <0x0 0xff>;
461+
vendor-id = <0x1f1c>;
462+
device-id = <0x2042>;
463+
cdns,no-bar-match-nbits = <48>;
464+
msi-parent = <&msi>;
465+
status = "disabled";
466+
};
467+
468+
pcie_rc3: pcie@7062800000 {
469+
compatible = "sophgo,sg2042-pcie-host";
470+
device_type = "pci";
471+
reg = <0x70 0x62800000 0x0 0x00800000>,
472+
<0x4c 0x00000000 0x0 0x00001000>;
473+
reg-names = "reg", "cfg";
474+
linux,pci-domain = <3>;
475+
#address-cells = <3>;
476+
#size-cells = <2>;
477+
ranges = <0x01000000 0x0 0x00000000 0x4c 0xc0c00000 0x0 0x00400000>,
478+
<0x42000000 0x0 0xf8000000 0x4c 0xf8000000 0x0 0x04000000>,
479+
<0x02000000 0x0 0xfc000000 0x4c 0xfc000000 0x0 0x04000000>,
480+
<0x43000000 0x4e 0x00000000 0x4e 0x00000000 0x2 0x00000000>,
481+
<0x03000000 0x4d 0x00000000 0x4d 0x00000000 0x1 0x00000000>;
482+
bus-range = <0x0 0xff>;
483+
vendor-id = <0x1f1c>;
484+
device-id = <0x2042>;
485+
cdns,no-bar-match-nbits = <48>;
486+
msi-parent = <&msi>;
487+
status = "disabled";
488+
};
489489
};
490490
};

0 commit comments

Comments
 (0)