Skip to content

Commit bd7bc02

Browse files
AaronDotchenhuacai
authored andcommitted
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: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent 3e4d599 commit bd7bc02

File tree

1 file changed

+83
-3
lines changed

1 file changed

+83
-3
lines changed

arch/loongarch/boot/dts/loongson-2k0500.dtsi

Lines changed: 83 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/dts-v1/;
77

88
#include <dt-bindings/interrupt-controller/irq.h>
9+
#include <dt-bindings/clock/loongson,ls2k-clk.h>
910

1011
/ {
1112
#address-cells = <2>;
@@ -19,14 +20,15 @@
1920
compatible = "loongson,la264";
2021
device_type = "cpu";
2122
reg = <0x0>;
22-
clocks = <&cpu_clk>;
23+
clocks = <&clk LOONGSON2_NODE_CLK>;
2324
};
2425
};
2526

26-
cpu_clk: cpu-clk {
27+
ref_100m: clock-ref-100m {
2728
compatible = "fixed-clock";
2829
#clock-cells = <0>;
29-
clock-frequency = <500000000>;
30+
clock-frequency = <100000000>;
31+
clock-output-names = "ref_100m";
3032
};
3133

3234
cpuintc: interrupt-controller {
@@ -35,6 +37,28 @@
3537
interrupt-controller;
3638
};
3739

40+
thermal-zones {
41+
cpu-thermal {
42+
polling-delay-passive = <1000>;
43+
polling-delay = <5000>;
44+
thermal-sensors = <&tsensor 0>;
45+
46+
trips {
47+
cpu-alert {
48+
temperature = <33000>;
49+
hysteresis = <2000>;
50+
type = "active";
51+
};
52+
53+
cpu-crit {
54+
temperature = <85000>;
55+
hysteresis = <5000>;
56+
type = "critical";
57+
};
58+
};
59+
};
60+
};
61+
3862
bus@10000000 {
3963
compatible = "simple-bus";
4064
ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
@@ -52,6 +76,54 @@
5276
ranges = <1 0x0 0x0 0x16400000 0x4000>;
5377
};
5478

79+
clk: clock-controller@1fe10400 {
80+
compatible = "loongson,ls2k0500-clk";
81+
reg = <0x0 0x1fe10400 0x0 0x2c>;
82+
#clock-cells = <1>;
83+
clocks = <&ref_100m>;
84+
clock-names = "ref_100m";
85+
};
86+
87+
dma-controller@1fe10c00 {
88+
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
89+
reg = <0 0x1fe10c00 0 0x8>;
90+
interrupt-parent = <&eiointc>;
91+
interrupts = <67>;
92+
clocks = <&clk LOONGSON2_APB_CLK>;
93+
#dma-cells = <1>;
94+
status = "disabled";
95+
};
96+
97+
dma-controller@1fe10c10 {
98+
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
99+
reg = <0 0x1fe10c10 0 0x8>;
100+
interrupt-parent = <&eiointc>;
101+
interrupts = <68>;
102+
clocks = <&clk LOONGSON2_APB_CLK>;
103+
#dma-cells = <1>;
104+
status = "disabled";
105+
};
106+
107+
dma-controller@1fe10c20 {
108+
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
109+
reg = <0 0x1fe10c20 0 0x8>;
110+
interrupt-parent = <&eiointc>;
111+
interrupts = <69>;
112+
clocks = <&clk LOONGSON2_APB_CLK>;
113+
#dma-cells = <1>;
114+
status = "disabled";
115+
};
116+
117+
dma-controller@1fe10c30 {
118+
compatible = "loongson,ls2k0500-apbdma", "loongson,ls2k1000-apbdma";
119+
reg = <0 0x1fe10c30 0 0x8>;
120+
interrupt-parent = <&eiointc>;
121+
interrupts = <70>;
122+
clocks = <&clk LOONGSON2_APB_CLK>;
123+
#dma-cells = <1>;
124+
status = "disabled";
125+
};
126+
55127
liointc0: interrupt-controller@1fe11400 {
56128
compatible = "loongson,liointc-2.0";
57129
reg = <0x0 0x1fe11400 0x0 0x40>,
@@ -139,6 +211,14 @@
139211
status = "disabled";
140212
};
141213

214+
tsensor: thermal-sensor@1fe11500 {
215+
compatible = "loongson,ls2k0500-thermal", "loongson,ls2k1000-thermal";
216+
reg = <0x0 0x1fe11500 0x0 0x30>;
217+
interrupt-parent = <&liointc0>;
218+
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
219+
#thermal-sensor-cells = <1>;
220+
};
221+
142222
uart0: serial@1ff40800 {
143223
compatible = "ns16550a";
144224
reg = <0x0 0x1ff40800 0x0 0x10>;

0 commit comments

Comments
 (0)