Skip to content

Commit

Permalink
MIPS: Loongson64: DeviceTree for LS7A PCH
Browse files Browse the repository at this point in the history
Add DeviceTree files for Classic Loongson64 Quad Core + LS7A boards and
Generic Loongson64 Quad Core + LS7A boards.

Signed-off-by: Huacai Chen <chenhc@lemote.com>
Signed-off-by: Jiaxun Yang <jiaxun.yang@flygoat.com>
Tested-by: Tiezhu Yang <yangtiezhu@loongson.cn>
Signed-off-by: Thomas Bogendoerfer <tsbogend@alpha.franken.de>
  • Loading branch information
Jiaxun Yang authored and Thomas Bogendoerfer committed Jul 16, 2020
1 parent a6aa35e commit 24af105
Show file tree
Hide file tree
Showing 6 changed files with 512 additions and 1 deletion.
5 changes: 4 additions & 1 deletion arch/mips/boot/dts/loongson/Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,7 @@
# SPDX_License_Identifier: GPL_2.0
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb loongson64c_8core_rs780e.dtb
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_ls7a.dtb
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_4core_rs780e.dtb
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64c_8core_rs780e.dtb
dtb-$(CONFIG_MACH_LOONGSON64) += loongson64g_4core_ls7a.dtb

obj-$(CONFIG_BUILTIN_DTB) += $(addsuffix .o, $(dtb-y))
37 changes: 37 additions & 0 deletions arch/mips/boot/dts/loongson/loongson64c_4core_ls7a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: GPL-2.0

/dts-v1/;

#include "loongson64c-package.dtsi"
#include "ls7a-pch.dtsi"

/ {
compatible = "loongson,loongson64c-4core-ls7a";
};

&package0 {
htvec: interrupt-controller@efdfb000080 {
compatible = "loongson,htvec-1.0";
reg = <0xefd 0xfb000080 0x40>;
interrupt-controller;
#interrupt-cells = <1>;

interrupt-parent = <&liointc>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>,
<25 IRQ_TYPE_LEVEL_HIGH>,
<26 IRQ_TYPE_LEVEL_HIGH>,
<27 IRQ_TYPE_LEVEL_HIGH>;
};
};

&pch {
msi: msi-controller@2ff00000 {
compatible = "loongson,pch-msi-1.0";
reg = <0 0x2ff00000 0 0x8>;
interrupt-controller;
msi-controller;
loongson,msi-base-vec = <64>;
loongson,msi-num-vecs = <64>;
interrupt-parent = <&htvec>;
};
};
61 changes: 61 additions & 0 deletions arch/mips/boot/dts/loongson/loongson64g-package.dtsi
Original file line number Diff line number Diff line change
@@ -0,0 +1,61 @@
// SPDX-License-Identifier: GPL-2.0

#include <dt-bindings/interrupt-controller/irq.h>

/ {
#address-cells = <2>;
#size-cells = <2>;

cpuintc: interrupt-controller {
#address-cells = <0>;
#interrupt-cells = <1>;
interrupt-controller;
compatible = "mti,cpu-interrupt-controller";
};

package0: bus@1fe00000 {
compatible = "simple-bus";
#address-cells = <2>;
#size-cells = <1>;
ranges = <0 0x1fe00000 0 0x1fe00000 0x100000
0 0x3ff00000 0 0x3ff00000 0x100000
0xefd 0xfb000000 0xefd 0xfb000000 0x10000000>;

liointc: interrupt-controller@3ff01400 {
compatible = "loongson,liointc-1.0";
reg = <0 0x3ff01400 0x64>;

interrupt-controller;
#interrupt-cells = <2>;

interrupt-parent = <&cpuintc>;
interrupts = <2>, <3>;
interrupt-names = "int0", "int1";

loongson,parent_int_map = <0x00ffffff>, /* int0 */
<0xff000000>, /* int1 */
<0x00000000>, /* int2 */
<0x00000000>; /* int3 */

};

cpu_uart0: serial@1fe001e0 {
compatible = "ns16550a";
reg = <0 0x1fe00100 0x10>;
clock-frequency = <100000000>;
interrupt-parent = <&liointc>;
interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
no-loopback-test;
};

cpu_uart1: serial@1fe001e8 {
status = "disabled";
compatible = "ns16550a";
reg = <0 0x1fe00110 0x10>;
clock-frequency = <100000000>;
interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
interrupt-parent = <&liointc>;
no-loopback-test;
};
};
};
37 changes: 37 additions & 0 deletions arch/mips/boot/dts/loongson/loongson64g_4core_ls7a.dts
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
// SPDX-License-Identifier: GPL-2.0

/dts-v1/;

#include "loongson64g-package.dtsi"
#include "ls7a-pch.dtsi"

/ {
compatible = "loongson,loongson64g-4core-ls7a";
};

&package0 {
htvec: interrupt-controller@efdfb000080 {
compatible = "loongson,htvec-1.0";
reg = <0xefd 0xfb000080 0x40>;
interrupt-controller;
#interrupt-cells = <1>;

interrupt-parent = <&liointc>;
interrupts = <24 IRQ_TYPE_LEVEL_HIGH>,
<25 IRQ_TYPE_LEVEL_HIGH>,
<26 IRQ_TYPE_LEVEL_HIGH>,
<27 IRQ_TYPE_LEVEL_HIGH>;
};
};

&pch {
msi: msi-controller@2ff00000 {
compatible = "loongson,pch-msi-1.0";
reg = <0 0x2ff00000 0 0x8>;
interrupt-controller;
msi-controller;
loongson,msi-base-vec = <64>;
loongson,msi-num-vecs = <128>;
interrupt-parent = <&htvec>;
};
};
Loading

0 comments on commit 24af105

Please sign in to comment.