mt7621.dtsi 8.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464
  1. #include <dt-bindings/interrupt-controller/mips-gic.h>
  2. / {
  3. #address-cells = <1>;
  4. #size-cells = <1>;
  5. compatible = "mediatek,mtk7621-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 = "okay";
  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. m25p80@0 {
  135. #address-cells = <1>;
  136. #size-cells = <1>;
  137. reg = <0>;
  138. spi-max-frequency = <10000000>;
  139. m25p,chunked-io = <32>;
  140. };
  141. };
  142. gdma: gdma@2800 {
  143. compatible = "ralink,rt3883-gdma";
  144. reg = <0x2800 0x800>;
  145. resets = <&rstctrl 14>;
  146. reset-names = "dma";
  147. interrupt-parent = <&gic>;
  148. interrupts = <0 13 4>;
  149. #dma-cells = <1>;
  150. #dma-channels = <16>;
  151. #dma-requests = <16>;
  152. status = "disabled";
  153. };
  154. hsdma: hsdma@7000 {
  155. compatible = "mediatek,mt7621-hsdma";
  156. reg = <0x7000 0x1000>;
  157. resets = <&rstctrl 5>;
  158. reset-names = "hsdma";
  159. interrupt-parent = <&gic>;
  160. interrupts = <0 11 4>;
  161. #dma-cells = <1>;
  162. #dma-channels = <1>;
  163. #dma-requests = <1>;
  164. status = "disabled";
  165. };
  166. };
  167. pinctrl: pinctrl {
  168. compatible = "ralink,rt2880-pinmux";
  169. pinctrl-names = "default";
  170. pinctrl-0 = <&state_default>;
  171. state_default: pinctrl0 {
  172. };
  173. i2c_pins: i2c {
  174. i2c {
  175. ralink,group = "i2c";
  176. ralink,function = "i2c";
  177. };
  178. };
  179. spi_pins: spi {
  180. spi {
  181. ralink,group = "spi";
  182. ralink,function = "spi";
  183. };
  184. };
  185. uart1_pins: uart1 {
  186. uart1 {
  187. ralink,group = "uart1";
  188. ralink,function = "uart1";
  189. };
  190. };
  191. uart2_pins: uart2 {
  192. uart2 {
  193. ralink,group = "uart2";
  194. ralink,function = "uart2";
  195. };
  196. };
  197. uart3_pins: uart3 {
  198. uart3 {
  199. ralink,group = "uart3";
  200. ralink,function = "uart3";
  201. };
  202. };
  203. rgmii1_pins: rgmii1 {
  204. rgmii1 {
  205. ralink,group = "rgmii1";
  206. ralink,function = "rgmii1";
  207. };
  208. };
  209. rgmii2_pins: rgmii2 {
  210. rgmii2 {
  211. ralink,group = "rgmii2";
  212. ralink,function = "rgmii2";
  213. };
  214. };
  215. mdio_pins: mdio {
  216. mdio {
  217. ralink,group = "mdio";
  218. ralink,function = "mdio";
  219. };
  220. };
  221. pcie_pins: pcie {
  222. pcie {
  223. ralink,group = "pcie";
  224. ralink,function = "pcie rst";
  225. };
  226. };
  227. nand_pins: nand {
  228. spi-nand {
  229. ralink,group = "spi";
  230. ralink,function = "nand1";
  231. };
  232. sdhci-nand {
  233. ralink,group = "sdhci";
  234. ralink,function = "nand2";
  235. };
  236. };
  237. sdhci_pins: sdhci {
  238. sdhci {
  239. ralink,group = "sdhci";
  240. ralink,function = "sdhci";
  241. };
  242. };
  243. };
  244. rstctrl: rstctrl {
  245. compatible = "ralink,rt2880-reset";
  246. #reset-cells = <1>;
  247. };
  248. clkctrl: clkctrl {
  249. compatible = "ralink,rt2880-clock";
  250. #clock-cells = <1>;
  251. };
  252. sdhci: sdhci@1E130000 {
  253. compatible = "ralink,mt7620-sdhci";
  254. reg = <0x1E130000 0x4000>;
  255. interrupt-parent = <&gic>;
  256. interrupts = <GIC_SHARED 20 IRQ_TYPE_LEVEL_HIGH>;
  257. };
  258. xhci: xhci@1E1C0000 {
  259. status = "okay";
  260. compatible = "mediatek,mt8173-xhci";
  261. reg = <0x1e1c0000 0x1000
  262. 0x1e1d0700 0x0100>;
  263. clocks = <&sysclock>;
  264. clock-names = "sys_ck";
  265. interrupt-parent = <&gic>;
  266. interrupts = <GIC_SHARED 22 IRQ_TYPE_LEVEL_HIGH>;
  267. };
  268. gic: interrupt-controller@1fbc0000 {
  269. compatible = "mti,gic";
  270. reg = <0x1fbc0000 0x2000>;
  271. interrupt-controller;
  272. #interrupt-cells = <3>;
  273. mti,reserved-cpu-vectors = <7>;
  274. timer {
  275. compatible = "mti,gic-timer";
  276. interrupts = <GIC_LOCAL 1 IRQ_TYPE_NONE>;
  277. clocks = <&cpuclock>;
  278. };
  279. };
  280. nand: nand@1e003000 {
  281. status = "disabled";
  282. compatible = "mtk,mt7621-nand";
  283. bank-width = <2>;
  284. reg = <0x1e003000 0x800
  285. 0x1e003800 0x800>;
  286. #address-cells = <1>;
  287. #size-cells = <1>;
  288. };
  289. ethernet: ethernet@1e100000 {
  290. compatible = "mediatek,mt7621-eth";
  291. reg = <0x1e100000 0x10000>;
  292. #address-cells = <1>;
  293. #size-cells = <0>;
  294. resets = <&rstctrl 6 &rstctrl 23>;
  295. reset-names = "fe", "eth";
  296. interrupt-parent = <&gic>;
  297. interrupts = <GIC_SHARED 3 IRQ_TYPE_LEVEL_HIGH>;
  298. mediatek,switch = <&gsw>;
  299. mdio-bus {
  300. #address-cells = <1>;
  301. #size-cells = <0>;
  302. phy1f: ethernet-phy@1f {
  303. reg = <0x1f>;
  304. phy-mode = "rgmii";
  305. };
  306. };
  307. };
  308. gsw: gsw@1e110000 {
  309. compatible = "mediatek,mt7621-gsw";
  310. reg = <0x1e110000 0x8000>;
  311. interrupt-parent = <&gic>;
  312. interrupts = <GIC_SHARED 23 IRQ_TYPE_LEVEL_HIGH>;
  313. };
  314. pcie: pcie@1e140000 {
  315. compatible = "mediatek,mt7621-pci";
  316. reg = <0x1e140000 0x100
  317. 0x1e142000 0x100>;
  318. #address-cells = <3>;
  319. #size-cells = <2>;
  320. pinctrl-names = "default";
  321. pinctrl-0 = <&pcie_pins>;
  322. device_type = "pci";
  323. bus-range = <0 255>;
  324. ranges = <
  325. 0x02000000 0 0x00000000 0x60000000 0 0x10000000 /* pci memory */
  326. 0x01000000 0 0x00000000 0x1e160000 0 0x00010000 /* io space */
  327. >;
  328. interrupt-parent = <&gic>;
  329. interrupts = <GIC_SHARED 4 IRQ_TYPE_LEVEL_HIGH
  330. GIC_SHARED 24 IRQ_TYPE_LEVEL_HIGH
  331. GIC_SHARED 25 IRQ_TYPE_LEVEL_HIGH>;
  332. status = "okay";
  333. resets = <&rstctrl 24 &rstctrl 25 &rstctrl 26>;
  334. reset-names = "pcie0", "pcie1", "pcie2";
  335. clocks = <&clkctrl 24 &clkctrl 25 &clkctrl 26>;
  336. clock-names = "pcie0", "pcie1", "pcie2";
  337. pcie0 {
  338. reg = <0x0000 0 0 0 0>;
  339. #address-cells = <3>;
  340. #size-cells = <2>;
  341. device_type = "pci";
  342. };
  343. pcie1 {
  344. reg = <0x0800 0 0 0 0>;
  345. #address-cells = <3>;
  346. #size-cells = <2>;
  347. device_type = "pci";
  348. };
  349. pcie2 {
  350. reg = <0x1000 0 0 0 0>;
  351. #address-cells = <3>;
  352. #size-cells = <2>;
  353. device_type = "pci";
  354. };
  355. };
  356. };