Commit bd7bc02b authored by Binbin Zhou's avatar Binbin Zhou Committed by Huacai Chen

LoongArch: dts: Add new supported device nodes to Loongson-2K0500

By now, more Loongson-2K0500 related drivers are supported, such as
clock controller, thermal controller, and dma controller. So we add
these device nodes to the Loongson-2K0500 dts file.
Signed-off-by: default avatarBinbin Zhou <zhoubinbin@loongson.cn>
Signed-off-by: default avatarHuacai Chen <chenhuacai@loongson.cn>
parent 3e4d599c
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
/dts-v1/; /dts-v1/;
#include <dt-bindings/interrupt-controller/irq.h> #include <dt-bindings/interrupt-controller/irq.h>
#include <dt-bindings/clock/loongson,ls2k-clk.h>
/ { / {
#address-cells = <2>; #address-cells = <2>;
...@@ -19,14 +20,15 @@ cpu0: cpu@0 { ...@@ -19,14 +20,15 @@ cpu0: cpu@0 {
compatible = "loongson,la264"; compatible = "loongson,la264";
device_type = "cpu"; device_type = "cpu";
reg = <0x0>; reg = <0x0>;
clocks = <&cpu_clk>; clocks = <&clk LOONGSON2_NODE_CLK>;
}; };
}; };
cpu_clk: cpu-clk { ref_100m: clock-ref-100m {
compatible = "fixed-clock"; compatible = "fixed-clock";
#clock-cells = <0>; #clock-cells = <0>;
clock-frequency = <500000000>; clock-frequency = <100000000>;
clock-output-names = "ref_100m";
}; };
cpuintc: interrupt-controller { cpuintc: interrupt-controller {
...@@ -35,6 +37,28 @@ cpuintc: interrupt-controller { ...@@ -35,6 +37,28 @@ cpuintc: interrupt-controller {
interrupt-controller; interrupt-controller;
}; };
thermal-zones {
cpu-thermal {
polling-delay-passive = <1000>;
polling-delay = <5000>;
thermal-sensors = <&tsensor 0>;
trips {
cpu-alert {
temperature = <33000>;
hysteresis = <2000>;
type = "active";
};
cpu-crit {
temperature = <85000>;
hysteresis = <5000>;
type = "critical";
};
};
};
};
bus@10000000 { bus@10000000 {
compatible = "simple-bus"; compatible = "simple-bus";
ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>, ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
...@@ -52,6 +76,54 @@ isa@16400000 { ...@@ -52,6 +76,54 @@ isa@16400000 {
ranges = <1 0x0 0x0 0x16400000 0x4000>; ranges = <1 0x0 0x0 0x16400000 0x4000>;
}; };
clk: clock-controller@1fe10400 {
compatible = "loongson,ls2k0500-clk";
reg = <0x0 0x1fe10400 0x0 0x2c>;
#clock-cells = <1>;
clocks = <&ref_100m>;
clock-names = "ref_100m";
};
dma-controller@1fe10c00 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c00 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <67>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};
dma-controller@1fe10c10 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c10 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <68>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};
dma-controller@1fe10c20 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c20 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <69>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};
dma-controller@1fe10c30 {
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
reg = <0 0x1fe10c30 0 0x8>;
interrupt-parent = <&eiointc>;
interrupts = <70>;
clocks = <&clk LOONGSON2_APB_CLK>;
#dma-cells = <1>;
status = "disabled";
};
liointc0: interrupt-controller@1fe11400 { liointc0: interrupt-controller@1fe11400 {
compatible = "loongson,liointc-2.0"; compatible = "loongson,liointc-2.0";
reg = <0x0 0x1fe11400 0x0 0x40>, reg = <0x0 0x1fe11400 0x0 0x40>,
...@@ -139,6 +211,14 @@ ohci0: usb@1f058000 { ...@@ -139,6 +211,14 @@ ohci0: usb@1f058000 {
status = "disabled"; status = "disabled";
}; };
tsensor: thermal-sensor@1fe11500 {
compatible = "loongson,ls2k0500-thermal", "loongson,ls2k1000-thermal";
reg = <0x0 0x1fe11500 0x0 0x30>;
interrupt-parent = <&liointc0>;
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
#thermal-sensor-cells = <1>;
};
uart0: serial@1ff40800 { uart0: serial@1ff40800 {
compatible = "ns16550a"; compatible = "ns16550a";
reg = <0x0 0x1ff40800 0x0 0x10>; reg = <0x0 0x1ff40800 0x0 0x10>;
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment