1 // SPDX-License-Identifier: GPL-2.0
3 * Copyright (C) 2023 Loongson Technology Corporation Limited
8 #include <dt-bindings/interrupt-controller/irq.h>
9 #include <dt-bindings/clock/loongson,ls2k-clk.h>
20 compatible = "loongson,la364";
23 clocks = <&clk LOONGSON2_NODE_CLK>;
27 compatible = "loongson,la364";
30 clocks = <&clk LOONGSON2_NODE_CLK>;
34 ref_100m: clock-ref-100m {
35 compatible = "fixed-clock";
37 clock-frequency = <100000000>;
38 clock-output-names = "ref_100m";
41 cpuintc: interrupt-controller {
42 compatible = "loongson,cpu-interrupt-controller";
43 #interrupt-cells = <1>;
49 polling-delay-passive = <1000>;
50 polling-delay = <5000>;
51 thermal-sensors = <&tsensor 0>;
55 temperature = <40000>;
61 temperature = <85000>;
70 compatible = "simple-bus";
71 ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
72 <0x0 0x02000000 0x0 0x02000000 0x0 0x02000000>,
73 <0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>,
74 <0xfe 0x0 0xfe 0x0 0x0 0x40000000>;
82 ranges = <1 0x0 0x0 0x18400000 0x4000>;
85 clk: clock-controller@10010480 {
86 compatible = "loongson,ls2k2000-clk";
87 reg = <0x0 0x10010480 0x0 0x100>;
90 clock-names = "ref_100m";
93 pmc: power-management@100d0000 {
94 compatible = "loongson,ls2k2000-pmc", "loongson,ls2k0500-pmc", "syscon";
95 reg = <0x0 0x100d0000 0x0 0x58>;
96 interrupt-parent = <&eiointc>;
98 loongson,suspend-address = <0x0 0x1c000500>;
101 compatible = "syscon-reboot";
107 compatible = "syscon-poweroff";
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>;
124 liointc: interrupt-controller@1fe01400 {
125 compatible = "loongson,liointc-1.0";
126 reg = <0x0 0x1fe01400 0x0 0x64>;
128 interrupt-controller;
129 #interrupt-cells = <2>;
130 interrupt-parent = <&cpuintc>;
132 interrupt-names = "int0";
133 loongson,parent_int_map = <0xffffffff>, /* int0 */
134 <0x00000000>, /* int1 */
135 <0x00000000>, /* int2 */
136 <0x00000000>; /* int3 */
139 eiointc: interrupt-controller@1fe01600 {
140 compatible = "loongson,ls2k2000-eiointc";
141 reg = <0x0 0x1fe01600 0x0 0xea00>;
142 interrupt-controller;
143 #interrupt-cells = <1>;
144 interrupt-parent = <&cpuintc>;
148 pic: interrupt-controller@10000000 {
149 compatible = "loongson,pch-pic-1.0";
150 reg = <0x0 0x10000000 0x0 0x400>;
151 interrupt-controller;
152 #interrupt-cells = <2>;
153 loongson,pic-base-vec = <0>;
154 interrupt-parent = <&eiointc>;
157 msi: msi-controller@1fe01140 {
158 compatible = "loongson,pch-msi-1.0";
159 reg = <0x0 0x1fe01140 0x0 0x8>;
160 interrupt-controller;
161 #interrupt-cells = <1>;
163 loongson,msi-base-vec = <64>;
164 loongson,msi-num-vecs = <192>;
165 interrupt-parent = <&eiointc>;
169 compatible = "loongson,ls2k2000-rtc", "loongson,ls7a-rtc";
170 reg = <0x0 0x100d0100 0x0 0x100>;
171 interrupt-parent = <&pic>;
172 interrupts = <52 IRQ_TYPE_LEVEL_HIGH>;
177 compatible = "loongson,ls2k-i2c";
178 reg = <0x0 0x1fe00120 0x0 0x8>;
179 interrupt-parent = <&liointc>;
180 interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
185 compatible = "loongson,ls2k-i2c";
186 reg = <0x0 0x1fe00130 0x0 0x8>;
187 interrupt-parent = <&liointc>;
188 interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
192 uart0: serial@1fe001e0 {
193 compatible = "ns16550a";
194 reg = <0x0 0x1fe001e0 0x0 0x10>;
195 clock-frequency = <100000000>;
196 interrupt-parent = <&liointc>;
197 interrupts = <10 IRQ_TYPE_LEVEL_HIGH>;
203 compatible = "loongson,ls2k-pci";
204 reg = <0x0 0x1a000000 0x0 0x02000000>,
205 <0xfe 0x0 0x0 0x20000000>;
206 #address-cells = <3>;
210 bus-range = <0x0 0xff>;
211 ranges = <0x01000000 0x0 0x00008000 0x0 0x18408000 0x0 0x00008000>,
212 <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>;
214 gmac0: ethernet@3,0 {
215 reg = <0x1800 0x0 0x0 0x0 0x0>;
216 interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
217 <13 IRQ_TYPE_LEVEL_HIGH>;
218 interrupt-names = "macirq", "eth_lpi";
219 interrupt-parent = <&pic>;
223 gmac1: ethernet@3,1 {
224 reg = <0x1900 0x0 0x0 0x0 0x0>;
225 interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
226 <15 IRQ_TYPE_LEVEL_HIGH>;
227 interrupt-names = "macirq", "eth_lpi";
228 interrupt-parent = <&pic>;
232 gmac2: ethernet@3,2 {
233 reg = <0x1a00 0x0 0x0 0x0 0x0>;
234 interrupts = <17 IRQ_TYPE_LEVEL_HIGH>,
235 <18 IRQ_TYPE_LEVEL_HIGH>;
236 interrupt-names = "macirq", "eth_lpi";
237 interrupt-parent = <&pic>;
242 reg = <0x2000 0x0 0x0 0x0 0x0>;
243 interrupts = <48 IRQ_TYPE_LEVEL_HIGH>;
244 interrupt-parent = <&pic>;
249 reg = <0xc800 0x0 0x0 0x0 0x0>;
250 interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
251 interrupt-parent = <&pic>;
256 reg = <0x3100 0x0 0x0 0x0 0x0>;
257 interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
258 interrupt-parent = <&pic>;
263 reg = <0x3800 0x0 0x0 0x0 0x0>;
264 interrupts = <78 IRQ_TYPE_LEVEL_HIGH>,
265 <79 IRQ_TYPE_LEVEL_HIGH>;
266 interrupt-names = "tx", "rx";
267 interrupt-parent = <&pic>;
272 reg = <0x4000 0x0 0x0 0x0 0x0>;
273 interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
274 interrupt-parent = <&pic>;
279 reg = <0x4800 0x0 0x0 0x0 0x0>;
280 #address-cells = <3>;
283 interrupt-parent = <&pic>;
284 #interrupt-cells = <1>;
285 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
286 interrupt-map = <0x0 0x0 0x0 0x0 &pic 32 IRQ_TYPE_LEVEL_HIGH>;
291 reg = <0x5000 0x0 0x0 0x0 0x0>;
292 #address-cells = <3>;
295 interrupt-parent = <&pic>;
296 #interrupt-cells = <1>;
297 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
298 interrupt-map = <0x0 0x0 0x0 0x0 &pic 33 IRQ_TYPE_LEVEL_HIGH>;
303 reg = <0x5800 0x0 0x0 0x0 0x0>;
304 #address-cells = <3>;
307 interrupt-parent = <&pic>;
308 #interrupt-cells = <1>;
309 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
310 interrupt-map = <0x0 0x0 0x0 0x0 &pic 34 IRQ_TYPE_LEVEL_HIGH>;
315 reg = <0x6000 0x0 0x0 0x0 0x0>;
316 #address-cells = <3>;
319 interrupt-parent = <&pic>;
320 #interrupt-cells = <1>;
321 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
322 interrupt-map = <0x0 0x0 0x0 0x0 &pic 35 IRQ_TYPE_LEVEL_HIGH>;
327 reg = <0x6800 0x0 0x0 0x0 0x0>;
328 #address-cells = <3>;
331 interrupt-parent = <&pic>;
332 #interrupt-cells = <1>;
333 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
334 interrupt-map = <0x0 0x0 0x0 0x0 &pic 36 IRQ_TYPE_LEVEL_HIGH>;
339 reg = <0x7000 0x0 0x0 0x0 0x0>;
340 #address-cells = <3>;
343 interrupt-parent = <&pic>;
344 #interrupt-cells = <1>;
345 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
346 interrupt-map = <0x0 0x0 0x0 0x0 &pic 37 IRQ_TYPE_LEVEL_HIGH>;
351 reg = <0x7800 0x0 0x0 0x0 0x0>;
352 #address-cells = <3>;
355 interrupt-parent = <&pic>;
356 #interrupt-cells = <1>;
357 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
358 interrupt-map = <0x0 0x0 0x0 0x0 &pic 40 IRQ_TYPE_LEVEL_HIGH>;
363 reg = <0x8000 0x0 0x0 0x0 0x0>;
364 #address-cells = <3>;
367 interrupt-parent = <&pic>;
368 #interrupt-cells = <1>;
369 interrupt-map-mask = <0x0 0x0 0x0 0x0>;
370 interrupt-map = <0x0 0x0 0x0 0x0 &pic 30 IRQ_TYPE_LEVEL_HIGH>;