mt7621.dtsi 7.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458
  1. #include <dt-bindings/interrupt-controller/mips-gic.h>
  2. / {
  3. #address-cells = <1>;
  4. #size-cells = <1>;
  5. compatible = "mediatek,mt7621-soc";
  6. cpus {
  7. cpu@0 {
  8. compatible = "mips,mips1004Kc";
  9. };
  10. cpu@1 {
  11. compatible = "mips,mips1004Kc";
  12. };
  13. };
  14. cpuintc: cpuintc@0 {
  15. #address-cells = <0>;
  16. #interrupt-cells = <1>;
  17. interrupt-controller;
  18. compatible = "mti,cpu-interrupt-controller";
  19. };
  20. aliases {
  21. serial0 = &uartlite;
  22. };
  23. cpuclock: cpuclock@0 {
  24. #clock-cells = <0>;
  25. compatible = "fixed-clock";
  26. /* FIXME: there should be way to detect this */
  27. clock-frequency = <880000000>;
  28. };
  29. sysclock: sysclock@0 {
  30. #clock-cells = <0>;
  31. compatible = "fixed-clock";
  32. /* FIXME: there should be way to detect this */
  33. clock-frequency = <50000000>;
  34. };
  35. palmbus: palmbus@1E000000 {
  36. compatible = "palmbus";
  37. reg = <0x1E000000 0x100000>;
  38. ranges = <0x0 0x1E000000 0x0FFFFF>;
  39. #address-cells = <1>;
  40. #size-cells = <1>;
  41. sysc: sysc@0 {
  42. compatible = "mtk,mt7621-sysc";
  43. reg = <0x0 0x100>;
  44. };
  45. wdt: wdt@100 {
  46. compatible = "mtk,mt7621-wdt";
  47. reg = <0x100 0x100>;
  48. };
  49. gpio@600 {
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52. compatible = "mtk,mt7621-gpio";
  53. reg = <0x600 0x100>;
  54. gpio0: bank@0 {
  55. reg = <0>;
  56. compatible = "mtk,mt7621-gpio-bank";
  57. gpio-controller;
  58. #gpio-cells = <2>;
  59. };
  60. gpio1: bank@1 {
  61. reg = <1>;
  62. compatible = "mtk,mt7621-gpio-bank";
  63. gpio-controller;
  64. #gpio-cells = <2>;
  65. };
  66. gpio2: bank@2 {
  67. reg = <2>;
  68. compatible = "mtk,mt7621-gpio-bank";
  69. gpio-controller;
  70. #gpio-cells = <2>;
  71. };
  72. };
  73. i2c: i2c@900 {
  74. compatible = "mediatek,mt7621-i2c";
  75. reg = <0x900 0x100>;
  76. clocks = <&sysclock>;
  77. resets = <&rstctrl 16>;
  78. reset-names = "i2c";
  79. #address-cells = <1>;
  80. #size-cells = <0>;
  81. status = "disabled";
  82. pinctrl-names = "default";
  83. pinctrl-0 = <&i2c_pins>;
  84. };
  85. i2s: i2s@a00 {
  86. compatible = "mediatek,mt7621-i2s";
  87. reg = <0xa00 0x100>;
  88. clocks = <&sysclock>;
  89. resets = <&rstctrl 17>;
  90. reset-names = "i2s";
  91. interrupt-parent = <&gic>;
  92. interrupts = <GIC_SHARED 16 IRQ_TYPE_LEVEL_HIGH>;
  93. txdma-req = <2>;
  94. rxdma-req = <3>;
  95. dmas = <&gdma 4>,
  96. <&gdma 6>;
  97. dma-names = "tx", "rx";
  98. status = "disabled";
  99. };
  100. memc: memc@5000 {
  101. compatible = "mtk,mt7621-memc";
  102. reg = <0x300 0x100>;
  103. };
  104. cpc: cpc@1fbf0000 {
  105. compatible = "mtk,mt7621-cpc";
  106. reg = <0x1fbf0000 0x8000>;
  107. };
  108. mc: mc@1fbf8000 {
  109. compatible = "mtk,mt7621-mc";
  110. reg = <0x1fbf8000 0x8000>;
  111. };
  112. uartlite: uartlite@c00 {
  113. compatible = "ns16550a";
  114. reg = <0xc00 0x100>;
  115. clocks = <&sysclock>;
  116. clock-frequency = <50000000>;
  117. interrupt-parent = <&gic>;
  118. interrupts = <GIC_SHARED 26 IRQ_TYPE_LEVEL_HIGH>;
  119. reg-shift = <2>;
  120. reg-io-width = <4>;
  121. no-loopback-test;
  122. };
  123. spi0: spi@b00 {
  124. status = "disabled";
  125. compatible = "ralink,mt7621-spi";
  126. reg = <0xb00 0x100>;
  127. clocks = <&sysclock>;
  128. resets = <&rstctrl 18>;
  129. reset-names = "spi";
  130. #address-cells = <1>;
  131. #size-cells = <0>;
  132. pinctrl-names = "default";
  133. pinctrl-0 = <&spi_pins>;
  134. };
  135. gdma: gdma@2800 {
  136. compatible = "ralink,rt3883-gdma";
  137. reg = <0x2800 0x800>;
  138. resets = <&rstctrl 14>;
  139. reset-names = "dma";
  140. interrupt-parent = <&gic>;
  141. interrupts = <0 13 4>;
  142. #dma-cells = <1>;
  143. #dma-channels = <16>;
  144. #dma-requests = <16>;
  145. status = "disabled";
  146. };
  147. hsdma: hsdma@7000 {
  148. compatible = "mediatek,mt7621-hsdma";
  149. reg = <0x7000 0x1000>;
  150. resets = <&rstctrl 5>;
  151. reset-names = "hsdma";
  152. interrupt-parent = <&gic>;
  153. interrupts = <0 11 4>;
  154. #dma-cells = <1>;
  155. #dma-channels = <1>;
  156. #dma-requests = <1>;
  157. status = "disabled";
  158. };
  159. };
  160. pinctrl: pinctrl {
  161. compatible = "ralink,rt2880-pinmux";
  162. pinctrl-names = "default";
  163. pinctrl-0 = <&state_default>;
  164. state_default: pinctrl0 {
  165. };
  166. i2c_pins: i2c {
  167. i2c {
  168. ralink,group = "i2c";
  169. ralink,function = "i2c";
  170. };
  171. };
  172. spi_pins: spi {
  173. spi {
  174. ralink,group = "spi";
  175. ralink,function = "spi";
  176. };
  177. };
  178. uart1_pins: uart1 {
  179. uart1 {
  180. ralink,group = "uart1";
  181. ralink,function = "uart1";
  182. };
  183. };
  184. uart2_pins: uart2 {
  185. uart2 {
  186. ralink,group = "uart2";
  187. ralink,function = "uart2";
  188. };
  189. };
  190. uart3_pins: uart3 {
  191. uart3 {
  192. ralink,group = "uart3";
  193. ralink,function = "uart3";
  194. };
  195. };
  196. rgmii1_pins: rgmii1 {
  197. rgmii1 {
  198. ralink,group = "rgmii1";
  199. ralink,function = "rgmii1";
  200. };
  201. };
  202. rgmii2_pins: rgmii2 {
  203. rgmii2 {
  204. ralink,group = "rgmii2";
  205. ralink,function = "rgmii2";
  206. };
  207. };
  208. mdio_pins: mdio {
  209. mdio {
  210. ralink,group = "mdio";
  211. ralink,function = "mdio";
  212. };
  213. };
  214. pcie_pins: pcie {
  215. pcie {
  216. ralink,group = "pcie";
  217. ralink,function = "pcie rst";
  218. };
  219. };
  220. nand_pins: nand {
  221. spi-nand {
  222. ralink,group = "spi";
  223. ralink,function = "nand1";
  224. };
  225. sdhci-nand {
  226. ralink,group = "sdhci";
  227. ralink,function = "nand2";
  228. };
  229. };
  230. sdhci_pins: sdhci {
  231. sdhci {
  232. ralink,group = "sdhci";
  233. ralink,function = "sdhci";
  234. };
  235. };
  236. };
  237. rstctrl: rstctrl {
  238. compatible = "ralink,rt2880-reset";
  239. #reset-cells = <1>;
  240. };
  241. clkctrl: clkctrl {
  242. compatible = "ralink,rt2880-clock";
  243. #clock-cells = <1>;
  244. };
  245. sdhci: sdhci@1E130000 {
  246. status = "disabled";
  247. compatible = "ralink,mt7620-sdhci";
  248. reg = <0x1E130000 0x4000>;
  249. interrupt-parent = <&gic>;
  250. interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
  251. };
  252. xhci: xhci@1E1C0000 {
  253. status = "okay";
  254. compatible = "mediatek,mt8173-xhci";
  255. reg = <0x1e1c0000 0x1000
  256. 0x1e1d0700 0x0100>;
  257. clocks = <&sysclock>;
  258. clock-names = "sys_ck";
  259. interrupt-parent = <&gic>;
  260. interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
  261. };
  262. gic: interrupt-controller@1fbc0000 {
  263. compatible = "mti,gic";
  264. reg = <0x1fbc0000 0x2000>;
  265. interrupt-controller;
  266. #interrupt-cells = <3>;
  267. mti,reserved-cpu-vectors = <7>;
  268. timer {
  269. compatible = "mti,gic-timer";
  270. interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
  271. clocks = <&cpuclock>;
  272. };
  273. };
  274. nand: nand@1e003000 {
  275. status = "disabled";
  276. compatible = "mtk,mt7621-nand";
  277. bank-width = <2>;
  278. reg = <0x1e003000 0x800
  279. 0x1e003800 0x800>;
  280. #address-cells = <1>;
  281. #size-cells = <1>;
  282. };
  283. ethernet: ethernet@1e100000 {
  284. compatible = "mediatek,mt7621-eth";
  285. reg = <0x1e100000 0x10000>;
  286. #address-cells = <1>;
  287. #size-cells = <0>;
  288. resets = <&rstctrl 6 &rstctrl 23>;
  289. reset-names = "fe", "eth";
  290. interrupt-parent = <&gic>;
  291. interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
  292. mediatek,switch = <&gsw>;
  293. mdio-bus {
  294. #address-cells = <1>;
  295. #size-cells = <0>;
  296. phy1f: ethernet-phy@1f {
  297. reg = <0x1f>;
  298. phy-mode = "rgmii";
  299. };
  300. };
  301. };
  302. gsw: gsw@1e110000 {
  303. compatible = "mediatek,mt7621-gsw";
  304. reg = <0x1e110000 0x8000>;
  305. interrupt-parent = <&gic>;
  306. interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
  307. };
  308. pcie: pcie@1e140000 {
  309. compatible = "mediatek,mt7621-pci";
  310. reg = <0x1e140000 0x100
  311. 0x1e142000 0x100>;
  312. #address-cells = <3>;
  313. #size-cells = <2>;
  314. pinctrl-names = "default";
  315. pinctrl-0 = <&pcie_pins>;
  316. device_type = "pci";
  317. bus-range = <0 255>;
  318. ranges = <
  319. 0x02000000 0 0x00000000 0x60000000 0 0x10000000 /* pci memory */
  320. 0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
  321. >;
  322. interrupt-parent = <&gic>;
  323. interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH
  324. GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH
  325. GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
  326. status = "disabled";
  327. resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>;
  328. reset-names = "pcie0", "pcie1", "pcie2";
  329. clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
  330. clock-names = "pcie0", "pcie1", "pcie2";
  331. pcie0 {
  332. reg = <0x0000 0 0 0 0>;
  333. #address-cells = <3>;
  334. #size-cells = <2>;
  335. device_type = "pci";
  336. };
  337. pcie1 {
  338. reg = <0x0800 0 0 0 0>;
  339. #address-cells = <3>;
  340. #size-cells = <2>;
  341. device_type = "pci";
  342. };
  343. pcie2 {
  344. reg = <0x1000 0 0 0 0>;
  345. #address-cells = <3>;
  346. #size-cells = <2>;
  347. device_type = "pci";
  348. };
  349. };
  350. };