|
6 | 6 | /dts-v1/;
|
7 | 7 |
|
8 | 8 | #include <dt-bindings/interrupt-controller/irq.h>
|
| 9 | +#include <dt-bindings/clock/loongson,ls2k-clk.h> |
9 | 10 |
|
10 | 11 | / {
|
11 | 12 | #address-cells = <2>;
|
|
19 | 20 | compatible = "loongson,la364";
|
20 | 21 | device_type = "cpu";
|
21 | 22 | reg = <0x0>;
|
22 |
| - clocks = <&cpu_clk>; |
| 23 | + clocks = <&clk LOONGSON2_NODE_CLK>; |
23 | 24 | };
|
24 | 25 |
|
25 | 26 | cpu1: cpu@2 {
|
26 | 27 | compatible = "loongson,la364";
|
27 | 28 | device_type = "cpu";
|
28 | 29 | reg = <0x1>;
|
29 |
| - clocks = <&cpu_clk>; |
| 30 | + clocks = <&clk LOONGSON2_NODE_CLK>; |
30 | 31 | };
|
31 | 32 | };
|
32 | 33 |
|
33 |
| - cpu_clk: cpu-clk { |
| 34 | + ref_100m: clock-ref-100m { |
34 | 35 | compatible = "fixed-clock";
|
35 | 36 | #clock-cells = <0>;
|
36 |
| - clock-frequency = <1400000000>; |
| 37 | + clock-frequency = <100000000>; |
| 38 | + clock-output-names = "ref_100m"; |
37 | 39 | };
|
38 | 40 |
|
39 | 41 | cpuintc: interrupt-controller {
|
|
42 | 44 | interrupt-controller;
|
43 | 45 | };
|
44 | 46 |
|
| 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 | + |
45 | 69 | bus@10000000 {
|
46 | 70 | compatible = "simple-bus";
|
47 | 71 | ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
|
|
58 | 82 | ranges = <1 0x0 0x0 0x18400000 0x4000>;
|
59 | 83 | };
|
60 | 84 |
|
| 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 | + |
61 | 93 | pmc: power-management@100d0000 {
|
62 | 94 | compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
|
63 | 95 | reg = <0x0 0x100d0000 0x0 0x58>;
|
|
80 | 112 | };
|
81 | 113 | };
|
82 | 114 |
|
| 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 | + |
83 | 124 | liointc: interrupt-controller@1fe01400 {
|
84 | 125 | compatible = "loongson,liointc-1.0";
|
85 | 126 | reg = <0x0 0x1fe01400 0x0 0x64>;
|
|
0 commit comments