mt7621.dtsi 6.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (C) 2022 MediaTek Inc. All rights reserved.
  4. *
  5. * Author: Weijie Gao <weijie.gao@mediatek.com>
  6. */
  7. #include <dt-bindings/clock/mt7621-clk.h>
  8. #include <dt-bindings/reset/mt7621-reset.h>
  9. #include <dt-bindings/phy/phy.h>
  10. / {
  11. #address-cells = <1>;
  12. #size-cells = <1>;
  13. compatible = "mediatek,mt7621-soc";
  14. cpus {
  15. #address-cells = <1>;
  16. #size-cells = <0>;
  17. cpu@0 {
  18. device_type = "cpu";
  19. compatible = "mips,mips1004Kc";
  20. reg = <0>;
  21. };
  22. cpu@1 {
  23. device_type = "cpu";
  24. compatible = "mips,mips1004Kc";
  25. reg = <1>;
  26. };
  27. };
  28. clk48m: clk48m {
  29. compatible = "fixed-clock";
  30. clock-frequency = <48000000>;
  31. #clock-cells = <0>;
  32. };
  33. clk50m: clk50m {
  34. compatible = "fixed-clock";
  35. clock-frequency = <50000000>;
  36. #clock-cells = <0>;
  37. };
  38. sysc: sysctrl@1e000000 {
  39. compatible = "mediatek,mt7621-sysc", "syscon";
  40. reg = <0x1e000000 0x100>;
  41. clkctrl: clock-controller@1e000030 {
  42. compatible = "mediatek,mt7621-clk";
  43. mediatek,memc = <&memc>;
  44. #clock-cells = <1>;
  45. };
  46. };
  47. rstctrl: reset-controller@1e000034 {
  48. compatible = "mediatek,mtmips-reset";
  49. reg = <0x1e000034 0x4>;
  50. #reset-cells = <1>;
  51. };
  52. reboot: resetctl-reboot {
  53. compatible = "resetctl-reboot";
  54. resets = <&rstctrl RST_SYS>;
  55. reset-names = "sysreset";
  56. };
  57. memc: memctrl@1e005000 {
  58. compatible = "mediatek,mt7621-memc", "syscon";
  59. reg = <0x1e005000 0x1000>;
  60. };
  61. pinctrl: pinctrl@1e000060 {
  62. compatible = "mediatek,mt7621-pinctrl";
  63. reg = <0x1e000048 0x30>;
  64. pinctrl-names = "default";
  65. pinctrl-0 = <&state_default>;
  66. state_default: pin_state {
  67. };
  68. uart1_pins: uart1_pins {
  69. groups = "uart1";
  70. function = "uart";
  71. };
  72. uart2_pins: uart2_pins {
  73. groups = "uart2";
  74. function = "uart";
  75. };
  76. uart3_pins: uart3_pins {
  77. groups = "uart3";
  78. function = "uart";
  79. };
  80. sdxc_pins: sdxc_pins {
  81. groups = "sdxc";
  82. function = "sdxc";
  83. };
  84. spi_pins: spi_pins {
  85. groups = "spi";
  86. function = "spi";
  87. };
  88. eth_pins: eth_pins {
  89. mdio_pins {
  90. groups = "mdio";
  91. function = "mdio";
  92. };
  93. rgmii1_pins {
  94. groups = "rgmii1";
  95. function = "rgmii";
  96. };
  97. esw_pins {
  98. groups = "esw int";
  99. function = "esw int";
  100. };
  101. mdio_pconf {
  102. groups = "mdio";
  103. drive-strength = <2>;
  104. };
  105. };
  106. };
  107. watchdog: watchdog@1e000100 {
  108. compatible = "mediatek,mt7621-wdt";
  109. reg = <0x1e000100 0x40>;
  110. resets = <&rstctrl RST_TIMER>;
  111. reset-names = "wdt";
  112. status = "disabled";
  113. };
  114. gpio: gpio@1e000600 {
  115. #address-cells = <1>;
  116. #size-cells = <0>;
  117. compatible = "mtk,mt7621-gpio";
  118. reg = <0x1e000600 0x100>;
  119. resets = <&rstctrl RST_PIO>;
  120. reset-names = "pio";
  121. gpio0: bank@0 {
  122. reg = <0>;
  123. compatible = "mtk,mt7621-gpio-bank";
  124. gpio-controller;
  125. #gpio-cells = <2>;
  126. };
  127. gpio1: bank@1 {
  128. reg = <1>;
  129. compatible = "mtk,mt7621-gpio-bank";
  130. gpio-controller;
  131. #gpio-cells = <2>;
  132. };
  133. gpio2: bank@2 {
  134. reg = <2>;
  135. compatible = "mtk,mt7621-gpio-bank";
  136. gpio-controller;
  137. #gpio-cells = <2>;
  138. };
  139. };
  140. spi: spi@1e000b00 {
  141. compatible = "ralink,mt7621-spi";
  142. reg = <0x1e000b00 0x40>;
  143. status = "disabled";
  144. pinctrl-names = "default";
  145. pinctrl-0 = <&spi_pins>;
  146. resets = <&rstctrl RST_SPI>;
  147. reset-names = "spi";
  148. clocks = <&clkctrl MT7621_CLK_SPI>;
  149. #address-cells = <1>;
  150. #size-cells = <0>;
  151. };
  152. uart0: uart1@1e000c00 {
  153. compatible = "mediatek,hsuart", "ns16550a";
  154. reg = <0x1e000c00 0x100>;
  155. pinctrl-names = "default";
  156. pinctrl-0 = <&uart1_pins>;
  157. clocks = <&clkctrl MT7621_CLK_UART1>;
  158. resets = <&rstctrl RST_UART1>;
  159. reg-shift = <2>;
  160. };
  161. uart1: uart2@1e000d00 {
  162. compatible = "mediatek,hsuart", "ns16550a";
  163. reg = <0x1e000d00 0x100>;
  164. pinctrl-names = "default";
  165. pinctrl-0 = <&uart2_pins>;
  166. clocks = <&clkctrl MT7621_CLK_UART2>;
  167. resets = <&rstctrl RST_UART2>;
  168. reg-shift = <2>;
  169. status = "disabled";
  170. };
  171. uart2: uart3@1e000e00 {
  172. compatible = "mediatek,hsuart", "ns16550a";
  173. reg = <0x1e000e00 0x100>;
  174. pinctrl-names = "default";
  175. pinctrl-0 = <&uart3_pins>;
  176. clocks = <&clkctrl MT7621_CLK_UART3>;
  177. resets = <&rstctrl RST_UART3>;
  178. reg-shift = <2>;
  179. status = "disabled";
  180. };
  181. eth: eth@1e100000 {
  182. compatible = "mediatek,mt7621-eth";
  183. reg = <0x1e100000 0x20000>;
  184. mediatek,ethsys = <&sysc>;
  185. pinctrl-names = "default";
  186. pinctrl-0 = <&eth_pins>;
  187. resets = <&rstctrl RST_FE>, <&rstctrl RST_GMAC>, <&rstctrl RST_MCM>;
  188. reset-names = "fe", "gmac", "mcm";
  189. clocks = <&clkctrl MT7621_CLK_GDMA>,
  190. <&clkctrl MT7621_CLK_ETH>;
  191. clock-names = "gmac", "fe";
  192. #address-cells = <1>;
  193. #size-cells = <0>;
  194. mediatek,gmac-id = <0>;
  195. phy-mode = "rgmii";
  196. mediatek,switch = "mt7530";
  197. mediatek,mcm;
  198. fixed-link {
  199. speed = <1000>;
  200. full-duplex;
  201. };
  202. };
  203. mmc: mmc@1e130000 {
  204. compatible = "mediatek,mt7621-mmc";
  205. reg = <0x1e130000 0x4000>;
  206. status = "disabled";
  207. bus-width = <4>;
  208. builtin-cd = <1>;
  209. r_smpl = <1>;
  210. pinctrl-names = "default";
  211. pinctrl-0 = <&sdxc_pins>;
  212. clocks = <&clk50m>, <&clkctrl MT7621_CLK_SHXC>;
  213. clock-names = "source", "hclk";
  214. resets = <&rstctrl RST_SDXC>;
  215. };
  216. ssusb: usb@1e1c0000 {
  217. compatible = "mediatek,mt7621-xhci", "mediatek,mtk-xhci";
  218. reg = <0x1e1c0000 0x1000>, <0x1e1d0700 0x100>;
  219. reg-names = "mac", "ippc";
  220. clocks = <&clk48m>, <&clk48m>;
  221. clock-names = "sys_ck", "ref_ck";
  222. phys = <&u2port0 PHY_TYPE_USB2>,
  223. <&u3port0 PHY_TYPE_USB3>,
  224. <&u2port1 PHY_TYPE_USB2>;
  225. status = "disabled";
  226. };
  227. u3phy: usb-phy@1e1d0000 {
  228. compatible = "mediatek,mt7621-u3phy",
  229. "mediatek,generic-tphy-v1";
  230. reg = <0x1e1d0000 0x700>;
  231. #address-cells = <1>;
  232. #size-cells = <1>;
  233. ranges;
  234. status = "disabled";
  235. u2port0: usb-phy@1e1d0800 {
  236. reg = <0x1e1d0800 0x0100>;
  237. #phy-cells = <1>;
  238. clocks = <&clk48m>;
  239. clock-names = "ref";
  240. };
  241. u3port0: usb-phy@1e1d0900 {
  242. reg = <0x1e1d0900 0x0100>;
  243. #phy-cells = <1>;
  244. };
  245. u2port1: usb-phy@1e1d1000 {
  246. reg = <0x1e1d1000 0x0100>;
  247. #phy-cells = <1>;
  248. clocks = <&clk48m>;
  249. clock-names = "ref";
  250. };
  251. };
  252. i2c: i2c@1e000900 {
  253. compatible = "i2c-gpio";
  254. status = "disabled";
  255. i2c-gpio,delay-us = <3>;
  256. gpios = <&gpio0 3 1>, /* PIN3 as SDA */
  257. <&gpio0 4 1>; /* PIN4 as CLK */
  258. #address-cells = <1>;
  259. #size-cells = <0>;
  260. };
  261. };