Skip to content

Commit 7c33c91

Browse files
AaronDotchenhuacai
authored andcommitted
LoongArch: dts: Add new supported device nodes to Loongson-2K2000
By now, more Loongson-2K2000 related drivers are supported, such as clock controller and thermal controller. So we add these device nodes to the Loongson-2K2000 dts file. Signed-off-by: Binbin Zhou <zhoubinbin@loongson.cn> Signed-off-by: Huacai Chen <chenhuacai@loongson.cn>
1 parent bd7bc02 commit 7c33c91

File tree

1 file changed

+45
-4
lines changed

1 file changed

+45
-4
lines changed

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

Lines changed: 45 additions & 4 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,21 +20,22 @@
1920
compatible = "loongson,la364";
2021
device_type = "cpu";
2122
reg = <0x0>;
22-
clocks = <&cpu_clk>;
23+
clocks = <&clk LOONGSON2_NODE_CLK>;
2324
};
2425

2526
cpu1: cpu@2 {
2627
compatible = "loongson,la364";
2728
device_type = "cpu";
2829
reg = <0x1>;
29-
clocks = <&cpu_clk>;
30+
clocks = <&clk LOONGSON2_NODE_CLK>;
3031
};
3132
};
3233

33-
cpu_clk: cpu-clk {
34+
ref_100m: clock-ref-100m {
3435
compatible = "fixed-clock";
3536
#clock-cells = <0>;
36-
clock-frequency = <1400000000>;
37+
clock-frequency = <100000000>;
38+
clock-output-names = "ref_100m";
3739
};
3840

3941
cpuintc: interrupt-controller {
@@ -42,6 +44,28 @@
4244
interrupt-controller;
4345
};
4446

47+
thermal-zones {
48+
cpu-thermal {
49+
polling-delay-passive = <1000>;
50+
polling-delay = <5000>;
51+
thermal-sensors = <&tsensor 0>;
52+
53+
trips {
54+
cpu-alert {
55+
temperature = <40000>;
56+
hysteresis = <2000>;
57+
type = "active";
58+
};
59+
60+
cpu-crit {
61+
temperature = <85000>;
62+
hysteresis = <5000>;
63+
type = "critical";
64+
};
65+
};
66+
};
67+
};
68+
4569
bus@10000000 {
4670
compatible = "simple-bus";
4771
ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
@@ -58,6 +82,14 @@
5882
ranges = <1 0x0 0x0 0x18400000 0x4000>;
5983
};
6084

85+
clk: clock-controller@10010480 {
86+
compatible = "loongson,ls2k2000-clk";
87+
reg = <0x0 0x10010480 0x0 0x100>;
88+
#clock-cells = <1>;
89+
clocks = <&ref_100m>;
90+
clock-names = "ref_100m";
91+
};
92+
6193
pmc: power-management@100d0000 {
6294
compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
6395
reg = <0x0 0x100d0000 0x0 0x58>;
@@ -80,6 +112,15 @@
80112
};
81113
};
82114

115+
tsensor: thermal-sensor@1fe01460 {
116+
compatible = "loongson,ls2k2000-thermal";
117+
reg = <0x0 0x1fe01460 0x0 0x30>,
118+
<0x0 0x1fe0019c 0x0 0x4>;
119+
interrupt-parent = <&liointc>;
120+
interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
121+
#thermal-sensor-cells = <1>;
122+
};
123+
83124
liointc: interrupt-controller@1fe01400 {
84125
compatible = "loongson,liointc-1.0";
85126
reg = <0x0 0x1fe01400 0x0 0x64>;

0 commit comments

Comments
 (0)