loongson-2k1000.dtsi 13 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2023 Loongson Technology Corporation Limited
  4. */
  5. /dts-v1/;
  6. #include <dt-bindings/interrupt-controller/irq.h>
  7. #include <dt-bindings/clock/loongson,ls2k-clk.h>
  8. #include <dt-bindings/gpio/gpio.h>
  9. / {
  10. #address-cells = <2>;
  11. #size-cells = <2>;
  12. cpus {
  13. #address-cells = <1>;
  14. #size-cells = <0>;
  15. cpu0: cpu@0 {
  16. compatible = "loongson,la264";
  17. device_type = "cpu";
  18. reg= <0x0>;
  19. clocks = <&clk LOONGSON2_NODE_CLK>;
  20. };
  21. cpu1: cpu@1 {
  22. compatible = "loongson,la264";
  23. device_type = "cpu";
  24. reg = <0x1>;
  25. clocks = <&clk LOONGSON2_NODE_CLK>;
  26. };
  27. };
  28. ref_100m: clock-ref-100m {
  29. compatible = "fixed-clock";
  30. #clock-cells = <0>;
  31. clock-frequency = <100000000>;
  32. clock-output-names = "ref_100m";
  33. };
  34. cpuintc: interrupt-controller {
  35. compatible = "loongson,cpu-interrupt-controller";
  36. #interrupt-cells = <1>;
  37. interrupt-controller;
  38. };
  39. /* i2c of the dvi eeprom edid */
  40. i2c-gpio-0 {
  41. compatible = "i2c-gpio";
  42. scl-gpios = <&gpio0 0 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  43. sda-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  44. i2c-gpio,delay-us = <5>; /* ~100 kHz */
  45. #address-cells = <1>;
  46. #size-cells = <0>;
  47. status = "disabled";
  48. };
  49. /* i2c of the eeprom edid */
  50. i2c-gpio-1 {
  51. compatible = "i2c-gpio";
  52. scl-gpios = <&gpio0 33 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  53. sda-gpios = <&gpio0 32 (GPIO_ACTIVE_HIGH | GPIO_OPEN_DRAIN)>;
  54. i2c-gpio,delay-us = <5>; /* ~100 kHz */
  55. #address-cells = <1>;
  56. #size-cells = <0>;
  57. status = "disabled";
  58. };
  59. thermal-zones {
  60. cpu-thermal {
  61. polling-delay-passive = <1000>;
  62. polling-delay = <5000>;
  63. thermal-sensors = <&tsensor 0>;
  64. trips {
  65. cpu_alert: cpu-alert {
  66. temperature = <33000>;
  67. hysteresis = <2000>;
  68. type = "active";
  69. };
  70. cpu_crit: cpu-crit {
  71. temperature = <85000>;
  72. hysteresis = <5000>;
  73. type = "critical";
  74. };
  75. };
  76. };
  77. };
  78. bus@10000000 {
  79. compatible = "simple-bus";
  80. ranges = <0x0 0x10000000 0x0 0x10000000 0x0 0x10000000>,
  81. <0x0 0x02000000 0x0 0x02000000 0x0 0x02000000>,
  82. <0x0 0x20000000 0x0 0x20000000 0x0 0x10000000>,
  83. <0x0 0x40000000 0x0 0x40000000 0x0 0x40000000>,
  84. <0xfe 0x0 0xfe 0x0 0x0 0x40000000>;
  85. #address-cells = <2>;
  86. #size-cells = <2>;
  87. dma-coherent;
  88. isa@18000000 {
  89. compatible = "isa";
  90. #size-cells = <1>;
  91. #address-cells = <2>;
  92. ranges = <1 0x0 0x0 0x18000000 0x4000>;
  93. };
  94. liointc0: interrupt-controller@1fe01400 {
  95. compatible = "loongson,liointc-2.0";
  96. reg = <0x0 0x1fe01400 0x0 0x40>,
  97. <0x0 0x1fe01040 0x0 0x8>,
  98. <0x0 0x1fe01140 0x0 0x8>;
  99. reg-names = "main", "isr0", "isr1";
  100. interrupt-controller;
  101. #interrupt-cells = <2>;
  102. interrupt-parent = <&cpuintc>;
  103. interrupts = <2>;
  104. interrupt-names = "int0";
  105. loongson,parent_int_map = <0xffffffff>, /* int0 */
  106. <0x00000000>, /* int1 */
  107. <0x00000000>, /* int2 */
  108. <0x00000000>; /* int3 */
  109. };
  110. liointc1: interrupt-controller@1fe01440 {
  111. compatible = "loongson,liointc-2.0";
  112. reg = <0x0 0x1fe01440 0x0 0x40>,
  113. <0x0 0x1fe01048 0x0 0x8>,
  114. <0x0 0x1fe01148 0x0 0x8>;
  115. reg-names = "main", "isr0", "isr1";
  116. interrupt-controller;
  117. #interrupt-cells = <2>;
  118. interrupt-parent = <&cpuintc>;
  119. interrupts = <3>;
  120. interrupt-names = "int1";
  121. loongson,parent_int_map = <0x00000000>, /* int0 */
  122. <0xffffffff>, /* int1 */
  123. <0x00000000>, /* int2 */
  124. <0x00000000>; /* int3 */
  125. };
  126. chipid@1fe00000 {
  127. compatible = "loongson,ls2k-chipid";
  128. reg = <0x0 0x1fe00000 0x0 0x30>;
  129. little-endian;
  130. };
  131. pctrl: pinctrl@1fe00420 {
  132. compatible = "loongson,ls2k-pinctrl";
  133. reg = <0x0 0x1fe00420 0x0 0x18>;
  134. status = "disabled";
  135. };
  136. clk: clock-controller@1fe00480 {
  137. compatible = "loongson,ls2k-clk";
  138. reg = <0x0 0x1fe00480 0x0 0x58>;
  139. #clock-cells = <1>;
  140. clocks = <&ref_100m>;
  141. clock-names = "ref_100m";
  142. };
  143. gpio0: gpio@1fe00500 {
  144. compatible = "loongson,ls2k-gpio";
  145. reg = <0x0 0x1fe00500 0x0 0x38>;
  146. ngpios = <64>;
  147. #gpio-cells = <2>;
  148. gpio-controller;
  149. gpio-ranges = <&pctrl 0x0 0x0 15>,
  150. <&pctrl 16 16 15>,
  151. <&pctrl 32 32 10>,
  152. <&pctrl 44 44 20>;
  153. interrupt-parent = <&liointc1>;
  154. interrupts = <28 IRQ_TYPE_LEVEL_HIGH>,
  155. <29 IRQ_TYPE_LEVEL_HIGH>,
  156. <30 IRQ_TYPE_LEVEL_HIGH>,
  157. <30 IRQ_TYPE_LEVEL_HIGH>,
  158. <26 IRQ_TYPE_LEVEL_HIGH>,
  159. <26 IRQ_TYPE_LEVEL_HIGH>,
  160. <26 IRQ_TYPE_LEVEL_HIGH>,
  161. <26 IRQ_TYPE_LEVEL_HIGH>,
  162. <26 IRQ_TYPE_LEVEL_HIGH>,
  163. <26 IRQ_TYPE_LEVEL_HIGH>,
  164. <26 IRQ_TYPE_LEVEL_HIGH>,
  165. <26 IRQ_TYPE_LEVEL_HIGH>,
  166. <26 IRQ_TYPE_LEVEL_HIGH>,
  167. <26 IRQ_TYPE_LEVEL_HIGH>,
  168. <26 IRQ_TYPE_LEVEL_HIGH>,
  169. <>,
  170. <26 IRQ_TYPE_LEVEL_HIGH>,
  171. <26 IRQ_TYPE_LEVEL_HIGH>,
  172. <26 IRQ_TYPE_LEVEL_HIGH>,
  173. <26 IRQ_TYPE_LEVEL_HIGH>,
  174. <26 IRQ_TYPE_LEVEL_HIGH>,
  175. <26 IRQ_TYPE_LEVEL_HIGH>,
  176. <26 IRQ_TYPE_LEVEL_HIGH>,
  177. <26 IRQ_TYPE_LEVEL_HIGH>,
  178. <26 IRQ_TYPE_LEVEL_HIGH>,
  179. <26 IRQ_TYPE_LEVEL_HIGH>,
  180. <26 IRQ_TYPE_LEVEL_HIGH>,
  181. <26 IRQ_TYPE_LEVEL_HIGH>,
  182. <26 IRQ_TYPE_LEVEL_HIGH>,
  183. <26 IRQ_TYPE_LEVEL_HIGH>,
  184. <26 IRQ_TYPE_LEVEL_HIGH>,
  185. <26 IRQ_TYPE_LEVEL_HIGH>,
  186. <27 IRQ_TYPE_LEVEL_HIGH>,
  187. <27 IRQ_TYPE_LEVEL_HIGH>,
  188. <27 IRQ_TYPE_LEVEL_HIGH>,
  189. <27 IRQ_TYPE_LEVEL_HIGH>,
  190. <27 IRQ_TYPE_LEVEL_HIGH>,
  191. <>,
  192. <27 IRQ_TYPE_LEVEL_HIGH>,
  193. <27 IRQ_TYPE_LEVEL_HIGH>,
  194. <27 IRQ_TYPE_LEVEL_HIGH>,
  195. <27 IRQ_TYPE_LEVEL_HIGH>,
  196. <>,
  197. <>,
  198. <27 IRQ_TYPE_LEVEL_HIGH>,
  199. <27 IRQ_TYPE_LEVEL_HIGH>,
  200. <27 IRQ_TYPE_LEVEL_HIGH>,
  201. <27 IRQ_TYPE_LEVEL_HIGH>,
  202. <27 IRQ_TYPE_LEVEL_HIGH>,
  203. <27 IRQ_TYPE_LEVEL_HIGH>,
  204. <27 IRQ_TYPE_LEVEL_HIGH>,
  205. <27 IRQ_TYPE_LEVEL_HIGH>,
  206. <27 IRQ_TYPE_LEVEL_HIGH>,
  207. <27 IRQ_TYPE_LEVEL_HIGH>,
  208. <27 IRQ_TYPE_LEVEL_HIGH>,
  209. <27 IRQ_TYPE_LEVEL_HIGH>,
  210. <27 IRQ_TYPE_LEVEL_HIGH>,
  211. <27 IRQ_TYPE_LEVEL_HIGH>,
  212. <27 IRQ_TYPE_LEVEL_HIGH>,
  213. <27 IRQ_TYPE_LEVEL_HIGH>,
  214. <27 IRQ_TYPE_LEVEL_HIGH>,
  215. <27 IRQ_TYPE_LEVEL_HIGH>,
  216. <27 IRQ_TYPE_LEVEL_HIGH>,
  217. <27 IRQ_TYPE_LEVEL_HIGH>;
  218. };
  219. tsensor: thermal-sensor@1fe01500 {
  220. compatible = "loongson,ls2k1000-thermal";
  221. reg = <0x0 0x1fe01500 0x0 0x30>;
  222. interrupt-parent = <&liointc0>;
  223. interrupts = <7 IRQ_TYPE_LEVEL_HIGH>;
  224. #thermal-sensor-cells = <1>;
  225. };
  226. dma-controller@1fe00c00 {
  227. compatible = "loongson,ls2k1000-apbdma";
  228. reg = <0x0 0x1fe00c00 0x0 0x8>;
  229. interrupt-parent = <&liointc1>;
  230. interrupts = <12 IRQ_TYPE_LEVEL_HIGH>;
  231. clocks = <&clk LOONGSON2_APB_CLK>;
  232. #dma-cells = <1>;
  233. status = "disabled";
  234. };
  235. dma-controller@1fe00c10 {
  236. compatible = "loongson,ls2k1000-apbdma";
  237. reg = <0x0 0x1fe00c10 0x0 0x8>;
  238. interrupt-parent = <&liointc1>;
  239. interrupts = <13 IRQ_TYPE_LEVEL_HIGH>;
  240. clocks = <&clk LOONGSON2_APB_CLK>;
  241. #dma-cells = <1>;
  242. status = "disabled";
  243. };
  244. dma-controller@1fe00c20 {
  245. compatible = "loongson,ls2k1000-apbdma";
  246. reg = <0x0 0x1fe00c20 0x0 0x8>;
  247. interrupt-parent = <&liointc1>;
  248. interrupts = <14 IRQ_TYPE_LEVEL_HIGH>;
  249. clocks = <&clk LOONGSON2_APB_CLK>;
  250. #dma-cells = <1>;
  251. status = "disabled";
  252. };
  253. dma-controller@1fe00c30 {
  254. compatible = "loongson,ls2k1000-apbdma";
  255. reg = <0x0 0x1fe00c30 0x0 0x8>;
  256. interrupt-parent = <&liointc1>;
  257. interrupts = <15 IRQ_TYPE_LEVEL_HIGH>;
  258. clocks = <&clk LOONGSON2_APB_CLK>;
  259. #dma-cells = <1>;
  260. status = "disabled";
  261. };
  262. dma-controller@1fe00c40 {
  263. compatible = "loongson,ls2k1000-apbdma";
  264. reg = <0x0 0x1fe00c40 0x0 0x8>;
  265. interrupt-parent = <&liointc1>;
  266. interrupts = <16 IRQ_TYPE_LEVEL_HIGH>;
  267. clocks = <&clk LOONGSON2_APB_CLK>;
  268. #dma-cells = <1>;
  269. status = "disabled";
  270. };
  271. uart0: serial@1fe20000 {
  272. compatible = "ns16550a";
  273. reg = <0x0 0x1fe20000 0x0 0x10>;
  274. clock-frequency = <125000000>;
  275. interrupt-parent = <&liointc0>;
  276. interrupts = <0x0 IRQ_TYPE_LEVEL_HIGH>;
  277. no-loopback-test;
  278. status = "disabled";
  279. };
  280. i2c2: i2c@1fe21000 {
  281. compatible = "loongson,ls2k-i2c";
  282. reg = <0x0 0x1fe21000 0x0 0x8>;
  283. interrupt-parent = <&liointc0>;
  284. interrupts = <22 IRQ_TYPE_LEVEL_HIGH>;
  285. status = "disabled";
  286. };
  287. i2c3: i2c@1fe21800 {
  288. compatible = "loongson,ls2k-i2c";
  289. reg = <0x0 0x1fe21800 0x0 0x8>;
  290. interrupt-parent = <&liointc0>;
  291. interrupts = <23 IRQ_TYPE_LEVEL_HIGH>;
  292. status = "disabled";
  293. };
  294. pmc: power-management@1fe27000 {
  295. compatible = "loongson,ls2k1000-pmc", "loongson,ls2k0500-pmc", "syscon";
  296. reg = <0x0 0x1fe27000 0x0 0x58>;
  297. interrupt-parent = <&liointc1>;
  298. interrupts = <11 IRQ_TYPE_LEVEL_HIGH>;
  299. loongson,suspend-address = <0x0 0x1c000500>;
  300. syscon-reboot {
  301. compatible = "syscon-reboot";
  302. offset = <0x30>;
  303. mask = <0x1>;
  304. };
  305. syscon-poweroff {
  306. compatible = "syscon-poweroff";
  307. regmap = <&pmc>;
  308. offset = <0x14>;
  309. mask = <0x3c00>;
  310. value = <0x3c00>;
  311. };
  312. };
  313. rtc0: rtc@1fe27800 {
  314. compatible = "loongson,ls2k1000-rtc";
  315. reg = <0x0 0x1fe27800 0x0 0x100>;
  316. interrupt-parent = <&liointc1>;
  317. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
  318. status = "disabled";
  319. };
  320. spi0: spi@1fff0220 {
  321. compatible = "loongson,ls2k1000-spi";
  322. reg = <0x0 0x1fff0220 0x0 0x10>;
  323. clocks = <&clk LOONGSON2_BOOT_CLK>;
  324. status = "disabled";
  325. };
  326. pcie@1a000000 {
  327. compatible = "loongson,ls2k-pci";
  328. reg = <0x0 0x1a000000 0x0 0x02000000>,
  329. <0xfe 0x0 0x0 0x20000000>;
  330. #address-cells = <3>;
  331. #size-cells = <2>;
  332. device_type = "pci";
  333. bus-range = <0x0 0xff>;
  334. ranges = <0x01000000 0x0 0x00008000 0x0 0x18008000 0x0 0x00008000>,
  335. <0x02000000 0x0 0x60000000 0x0 0x60000000 0x0 0x20000000>;
  336. gmac0: ethernet@3,0 {
  337. reg = <0x1800 0x0 0x0 0x0 0x0>;
  338. interrupt-parent = <&liointc0>;
  339. interrupts = <12 IRQ_TYPE_LEVEL_HIGH>,
  340. <13 IRQ_TYPE_LEVEL_HIGH>;
  341. interrupt-names = "macirq", "eth_lpi";
  342. status = "disabled";
  343. };
  344. gmac1: ethernet@3,1 {
  345. reg = <0x1900 0x0 0x0 0x0 0x0>;
  346. interrupt-parent = <&liointc0>;
  347. interrupts = <14 IRQ_TYPE_LEVEL_HIGH>,
  348. <15 IRQ_TYPE_LEVEL_HIGH>;
  349. interrupt-names = "macirq", "eth_lpi";
  350. status = "disabled";
  351. };
  352. ehci0: usb@4,1 {
  353. reg = <0x2100 0x0 0x0 0x0 0x0>;
  354. interrupt-parent = <&liointc1>;
  355. interrupts = <18 IRQ_TYPE_LEVEL_HIGH>;
  356. status = "disabled";
  357. };
  358. ohci0: usb@4,2 {
  359. reg = <0x2200 0x0 0x0 0x0 0x0>;
  360. interrupt-parent = <&liointc1>;
  361. interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
  362. status = "disabled";
  363. };
  364. display@6,0 {
  365. reg = <0x3000 0x0 0x0 0x0 0x0>;
  366. interrupt-parent = <&liointc0>;
  367. interrupts = <28 IRQ_TYPE_LEVEL_HIGH>;
  368. status = "disabled";
  369. };
  370. hda@7,0 {
  371. reg = <0x3800 0x0 0x0 0x0 0x0>;
  372. interrupt-parent = <&liointc0>;
  373. interrupts = <4 IRQ_TYPE_LEVEL_HIGH>;
  374. status = "disabled";
  375. };
  376. sata: sata@8,0 {
  377. reg = <0x4000 0x0 0x0 0x0 0x0>;
  378. interrupt-parent = <&liointc0>;
  379. interrupts = <19 IRQ_TYPE_LEVEL_HIGH>;
  380. status = "disabled";
  381. };
  382. pcie@9,0 {
  383. reg = <0x4800 0x0 0x0 0x0 0x0>;
  384. #address-cells = <3>;
  385. #size-cells = <2>;
  386. device_type = "pci";
  387. #interrupt-cells = <1>;
  388. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  389. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 0x0 IRQ_TYPE_LEVEL_HIGH>;
  390. ranges;
  391. };
  392. pcie@a,0 {
  393. reg = <0x5000 0x0 0x0 0x0 0x0>;
  394. #address-cells = <3>;
  395. #size-cells = <2>;
  396. device_type = "pci";
  397. interrupt-parent = <&liointc1>;
  398. #interrupt-cells = <1>;
  399. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  400. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 1 IRQ_TYPE_LEVEL_HIGH>;
  401. ranges;
  402. };
  403. pcie@b,0 {
  404. reg = <0x5800 0x0 0x0 0x0 0x0>;
  405. #address-cells = <3>;
  406. #size-cells = <2>;
  407. device_type = "pci";
  408. interrupt-parent = <&liointc1>;
  409. #interrupt-cells = <1>;
  410. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  411. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 2 IRQ_TYPE_LEVEL_HIGH>;
  412. ranges;
  413. };
  414. pcie@c,0 {
  415. reg = <0x6000 0x0 0x0 0x0 0x0>;
  416. #address-cells = <3>;
  417. #size-cells = <2>;
  418. device_type = "pci";
  419. interrupt-parent = <&liointc1>;
  420. #interrupt-cells = <1>;
  421. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  422. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 3 IRQ_TYPE_LEVEL_HIGH>;
  423. ranges;
  424. };
  425. pcie@d,0 {
  426. reg = <0x6800 0x0 0x0 0x0 0x0>;
  427. #address-cells = <3>;
  428. #size-cells = <2>;
  429. device_type = "pci";
  430. interrupt-parent = <&liointc1>;
  431. #interrupt-cells = <1>;
  432. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  433. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 4 IRQ_TYPE_LEVEL_HIGH>;
  434. ranges;
  435. };
  436. pcie@e,0 {
  437. reg = <0x7000 0x0 0x0 0x0 0x0>;
  438. #address-cells = <3>;
  439. #size-cells = <2>;
  440. device_type = "pci";
  441. interrupt-parent = <&liointc1>;
  442. #interrupt-cells = <1>;
  443. interrupt-map-mask = <0x0 0x0 0x0 0x0>;
  444. interrupt-map = <0x0 0x0 0x0 0x0 &liointc1 5 IRQ_TYPE_LEVEL_HIGH>;
  445. ranges;
  446. };
  447. };
  448. };
  449. };