mt7621.dtsi 8.9 KB

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