mt2712e.dtsi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439
  1. /*
  2. * Copyright (c) 2017 MediaTek Inc.
  3. * Author: YT Shen <yt.shen@mediatek.com>
  4. *
  5. * SPDX-License-Identifier: (GPL-2.0 OR MIT)
  6. */
  7. #include <dt-bindings/clock/mt2712-clk.h>
  8. #include <dt-bindings/interrupt-controller/irq.h>
  9. #include <dt-bindings/interrupt-controller/arm-gic.h>
  10. #include <dt-bindings/power/mt2712-power.h>
  11. #include "mt2712-pinfunc.h"
  12. / {
  13. compatible = "mediatek,mt2712";
  14. interrupt-parent = <&sysirq>;
  15. #address-cells = <2>;
  16. #size-cells = <2>;
  17. cluster0_opp: opp_table0 {
  18. compatible = "operating-points-v2";
  19. opp-shared;
  20. opp00 {
  21. opp-hz = /bits/ 64 <598000000>;
  22. opp-microvolt = <1000000>;
  23. };
  24. opp01 {
  25. opp-hz = /bits/ 64 <702000000>;
  26. opp-microvolt = <1000000>;
  27. };
  28. opp02 {
  29. opp-hz = /bits/ 64 <793000000>;
  30. opp-microvolt = <1000000>;
  31. };
  32. };
  33. cluster1_opp: opp_table1 {
  34. compatible = "operating-points-v2";
  35. opp-shared;
  36. opp00 {
  37. opp-hz = /bits/ 64 <598000000>;
  38. opp-microvolt = <1000000>;
  39. };
  40. opp01 {
  41. opp-hz = /bits/ 64 <702000000>;
  42. opp-microvolt = <1000000>;
  43. };
  44. opp02 {
  45. opp-hz = /bits/ 64 <793000000>;
  46. opp-microvolt = <1000000>;
  47. };
  48. opp03 {
  49. opp-hz = /bits/ 64 <897000000>;
  50. opp-microvolt = <1000000>;
  51. };
  52. opp04 {
  53. opp-hz = /bits/ 64 <1001000000>;
  54. opp-microvolt = <1000000>;
  55. };
  56. };
  57. cpus {
  58. #address-cells = <1>;
  59. #size-cells = <0>;
  60. cpu-map {
  61. cluster0 {
  62. core0 {
  63. cpu = <&cpu0>;
  64. };
  65. core1 {
  66. cpu = <&cpu1>;
  67. };
  68. };
  69. cluster1 {
  70. core0 {
  71. cpu = <&cpu2>;
  72. };
  73. };
  74. };
  75. cpu0: cpu@0 {
  76. device_type = "cpu";
  77. compatible = "arm,cortex-a35";
  78. reg = <0x000>;
  79. clocks = <&mcucfg CLK_MCU_MP0_SEL>,
  80. <&topckgen CLK_TOP_F_MP0_PLL1>;
  81. clock-names = "cpu", "intermediate";
  82. proc-supply = <&cpus_fixed_vproc0>;
  83. operating-points-v2 = <&cluster0_opp>;
  84. cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
  85. };
  86. cpu1: cpu@1 {
  87. device_type = "cpu";
  88. compatible = "arm,cortex-a35";
  89. reg = <0x001>;
  90. enable-method = "psci";
  91. clocks = <&mcucfg CLK_MCU_MP0_SEL>,
  92. <&topckgen CLK_TOP_F_MP0_PLL1>;
  93. clock-names = "cpu", "intermediate";
  94. proc-supply = <&cpus_fixed_vproc0>;
  95. operating-points-v2 = <&cluster0_opp>;
  96. cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
  97. };
  98. cpu2: cpu@200 {
  99. device_type = "cpu";
  100. compatible = "arm,cortex-a72";
  101. reg = <0x200>;
  102. enable-method = "psci";
  103. clocks = <&mcucfg CLK_MCU_MP2_SEL>,
  104. <&topckgen CLK_TOP_F_BIG_PLL1>;
  105. clock-names = "cpu", "intermediate";
  106. proc-supply = <&cpus_fixed_vproc1>;
  107. operating-points-v2 = <&cluster1_opp>;
  108. cpu-idle-states = <&CPU_SLEEP_0 &CLUSTER_SLEEP_0>;
  109. };
  110. idle-states {
  111. entry-method = "psci";
  112. CPU_SLEEP_0: cpu-sleep-0 {
  113. compatible = "arm,idle-state";
  114. local-timer-stop;
  115. entry-latency-us = <100>;
  116. exit-latency-us = <80>;
  117. min-residency-us = <2000>;
  118. arm,psci-suspend-param = <0x0010000>;
  119. };
  120. CLUSTER_SLEEP_0: cluster-sleep-0 {
  121. compatible = "arm,idle-state";
  122. local-timer-stop;
  123. entry-latency-us = <350>;
  124. exit-latency-us = <80>;
  125. min-residency-us = <3000>;
  126. arm,psci-suspend-param = <0x1010000>;
  127. };
  128. };
  129. };
  130. psci {
  131. compatible = "arm,psci-0.2";
  132. method = "smc";
  133. };
  134. baud_clk: dummy26m {
  135. compatible = "fixed-clock";
  136. clock-frequency = <26000000>;
  137. #clock-cells = <0>;
  138. };
  139. sys_clk: dummyclk {
  140. compatible = "fixed-clock";
  141. clock-frequency = <26000000>;
  142. #clock-cells = <0>;
  143. };
  144. clk26m: oscillator@0 {
  145. compatible = "fixed-clock";
  146. #clock-cells = <0>;
  147. clock-frequency = <26000000>;
  148. clock-output-names = "clk26m";
  149. };
  150. clk32k: oscillator@1 {
  151. compatible = "fixed-clock";
  152. #clock-cells = <0>;
  153. clock-frequency = <32768>;
  154. clock-output-names = "clk32k";
  155. };
  156. clkfpc: oscillator@2 {
  157. compatible = "fixed-clock";
  158. #clock-cells = <0>;
  159. clock-frequency = <50000000>;
  160. clock-output-names = "clkfpc";
  161. };
  162. clkaud_ext_i_0: oscillator@3 {
  163. compatible = "fixed-clock";
  164. #clock-cells = <0>;
  165. clock-frequency = <6500000>;
  166. clock-output-names = "clkaud_ext_i_0";
  167. };
  168. clkaud_ext_i_1: oscillator@4 {
  169. compatible = "fixed-clock";
  170. #clock-cells = <0>;
  171. clock-frequency = <196608000>;
  172. clock-output-names = "clkaud_ext_i_1";
  173. };
  174. clkaud_ext_i_2: oscillator@5 {
  175. compatible = "fixed-clock";
  176. #clock-cells = <0>;
  177. clock-frequency = <180633600>;
  178. clock-output-names = "clkaud_ext_i_2";
  179. };
  180. clki2si0_mck_i: oscillator@6 {
  181. compatible = "fixed-clock";
  182. #clock-cells = <0>;
  183. clock-frequency = <30000000>;
  184. clock-output-names = "clki2si0_mck_i";
  185. };
  186. clki2si1_mck_i: oscillator@7 {
  187. compatible = "fixed-clock";
  188. #clock-cells = <0>;
  189. clock-frequency = <30000000>;
  190. clock-output-names = "clki2si1_mck_i";
  191. };
  192. clki2si2_mck_i: oscillator@8 {
  193. compatible = "fixed-clock";
  194. #clock-cells = <0>;
  195. clock-frequency = <30000000>;
  196. clock-output-names = "clki2si2_mck_i";
  197. };
  198. clktdmin_mclk_i: oscillator@9 {
  199. compatible = "fixed-clock";
  200. #clock-cells = <0>;
  201. clock-frequency = <30000000>;
  202. clock-output-names = "clktdmin_mclk_i";
  203. };
  204. timer {
  205. compatible = "arm,armv8-timer";
  206. interrupt-parent = <&gic>;
  207. interrupts = <GIC_PPI 13
  208. (GIC_CPU_MASK_RAW(0x13) | IRQ_TYPE_LEVEL_LOW)>,
  209. <GIC_PPI 14
  210. (GIC_CPU_MASK_RAW(0x13) | IRQ_TYPE_LEVEL_LOW)>,
  211. <GIC_PPI 11
  212. (GIC_CPU_MASK_RAW(0x13) | IRQ_TYPE_LEVEL_LOW)>,
  213. <GIC_PPI 10
  214. (GIC_CPU_MASK_RAW(0x13) | IRQ_TYPE_LEVEL_LOW)>;
  215. };
  216. topckgen: syscon@10000000 {
  217. compatible = "mediatek,mt2712-topckgen", "syscon";
  218. reg = <0 0x10000000 0 0x1000>;
  219. #clock-cells = <1>;
  220. };
  221. infracfg: syscon@10001000 {
  222. compatible = "mediatek,mt2712-infracfg", "syscon";
  223. reg = <0 0x10001000 0 0x1000>;
  224. #clock-cells = <1>;
  225. };
  226. pericfg: syscon@10003000 {
  227. compatible = "mediatek,mt2712-pericfg", "syscon";
  228. reg = <0 0x10003000 0 0x1000>;
  229. #clock-cells = <1>;
  230. };
  231. syscfg_pctl_a: syscfg_pctl_a@10005000 {
  232. compatible = "mediatek,mt2712-pctl-a-syscfg", "syscon";
  233. reg = <0 0x10005000 0 0x1000>;
  234. };
  235. pio: pinctrl@10005000 {
  236. compatible = "mediatek,mt2712-pinctrl";
  237. reg = <0 0x1000b000 0 0x1000>;
  238. mediatek,pctl-regmap = <&syscfg_pctl_a>;
  239. pins-are-numbered;
  240. gpio-controller;
  241. #gpio-cells = <2>;
  242. interrupt-controller;
  243. #interrupt-cells = <2>;
  244. interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
  245. };
  246. scpsys: scpsys@10006000 {
  247. compatible = "mediatek,mt2712-scpsys", "syscon";
  248. #power-domain-cells = <1>;
  249. reg = <0 0x10006000 0 0x1000>;
  250. clocks = <&topckgen CLK_TOP_MM_SEL>,
  251. <&topckgen CLK_TOP_MFG_SEL>,
  252. <&topckgen CLK_TOP_VENC_SEL>,
  253. <&topckgen CLK_TOP_JPGDEC_SEL>,
  254. <&topckgen CLK_TOP_A1SYS_HP_SEL>,
  255. <&topckgen CLK_TOP_VDEC_SEL>;
  256. clock-names = "mm", "mfg", "venc",
  257. "jpgdec", "audio", "vdec";
  258. infracfg = <&infracfg>;
  259. };
  260. uart5: serial@1000f000 {
  261. compatible = "mediatek,mt2712-uart",
  262. "mediatek,mt6577-uart";
  263. reg = <0 0x1000f000 0 0x400>;
  264. interrupts = <GIC_SPI 127 IRQ_TYPE_LEVEL_LOW>;
  265. clocks = <&baud_clk>, <&sys_clk>;
  266. clock-names = "baud", "bus";
  267. status = "disabled";
  268. };
  269. apmixedsys: syscon@10209000 {
  270. compatible = "mediatek,mt2712-apmixedsys", "syscon";
  271. reg = <0 0x10209000 0 0x1000>;
  272. #clock-cells = <1>;
  273. };
  274. mcucfg: syscon@10220000 {
  275. compatible = "mediatek,mt2712-mcucfg", "syscon";
  276. reg = <0 0x10220000 0 0x1000>;
  277. #clock-cells = <1>;
  278. };
  279. sysirq: interrupt-controller@10220a80 {
  280. compatible = "mediatek,mt2712-sysirq",
  281. "mediatek,mt6577-sysirq";
  282. interrupt-controller;
  283. #interrupt-cells = <3>;
  284. interrupt-parent = <&gic>;
  285. reg = <0 0x10220a80 0 0x40>;
  286. };
  287. gic: interrupt-controller@10510000 {
  288. compatible = "arm,gic-400";
  289. #interrupt-cells = <3>;
  290. interrupt-parent = <&gic>;
  291. interrupt-controller;
  292. reg = <0 0x10510000 0 0x10000>,
  293. <0 0x10520000 0 0x20000>,
  294. <0 0x10540000 0 0x20000>,
  295. <0 0x10560000 0 0x20000>;
  296. interrupts = <GIC_PPI 9
  297. (GIC_CPU_MASK_RAW(0x13) | IRQ_TYPE_LEVEL_HIGH)>;
  298. };
  299. auxadc: adc@11001000 {
  300. compatible = "mediatek,mt2712-auxadc";
  301. reg = <0 0x11001000 0 0x1000>;
  302. clocks = <&pericfg CLK_PERI_AUXADC>;
  303. clock-names = "main";
  304. #io-channel-cells = <1>;
  305. status = "disabled";
  306. };
  307. uart0: serial@11002000 {
  308. compatible = "mediatek,mt2712-uart",
  309. "mediatek,mt6577-uart";
  310. reg = <0 0x11002000 0 0x400>;
  311. interrupts = <GIC_SPI 91 IRQ_TYPE_LEVEL_LOW>;
  312. clocks = <&baud_clk>, <&sys_clk>;
  313. clock-names = "baud", "bus";
  314. status = "disabled";
  315. };
  316. uart1: serial@11003000 {
  317. compatible = "mediatek,mt2712-uart",
  318. "mediatek,mt6577-uart";
  319. reg = <0 0x11003000 0 0x400>;
  320. interrupts = <GIC_SPI 92 IRQ_TYPE_LEVEL_LOW>;
  321. clocks = <&baud_clk>, <&sys_clk>;
  322. clock-names = "baud", "bus";
  323. status = "disabled";
  324. };
  325. uart2: serial@11004000 {
  326. compatible = "mediatek,mt2712-uart",
  327. "mediatek,mt6577-uart";
  328. reg = <0 0x11004000 0 0x400>;
  329. interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_LOW>;
  330. clocks = <&baud_clk>, <&sys_clk>;
  331. clock-names = "baud", "bus";
  332. status = "disabled";
  333. };
  334. uart3: serial@11005000 {
  335. compatible = "mediatek,mt2712-uart",
  336. "mediatek,mt6577-uart";
  337. reg = <0 0x11005000 0 0x400>;
  338. interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_LOW>;
  339. clocks = <&baud_clk>, <&sys_clk>;
  340. clock-names = "baud", "bus";
  341. status = "disabled";
  342. };
  343. uart4: serial@11019000 {
  344. compatible = "mediatek,mt2712-uart",
  345. "mediatek,mt6577-uart";
  346. reg = <0 0x11019000 0 0x400>;
  347. interrupts = <GIC_SPI 126 IRQ_TYPE_LEVEL_LOW>;
  348. clocks = <&baud_clk>, <&sys_clk>;
  349. clock-names = "baud", "bus";
  350. status = "disabled";
  351. };
  352. mfgcfg: syscon@13000000 {
  353. compatible = "mediatek,mt2712-mfgcfg", "syscon";
  354. reg = <0 0x13000000 0 0x1000>;
  355. #clock-cells = <1>;
  356. };
  357. mmsys: syscon@14000000 {
  358. compatible = "mediatek,mt2712-mmsys", "syscon";
  359. reg = <0 0x14000000 0 0x1000>;
  360. #clock-cells = <1>;
  361. };
  362. imgsys: syscon@15000000 {
  363. compatible = "mediatek,mt2712-imgsys", "syscon";
  364. reg = <0 0x15000000 0 0x1000>;
  365. #clock-cells = <1>;
  366. };
  367. bdpsys: syscon@15010000 {
  368. compatible = "mediatek,mt2712-bdpsys", "syscon";
  369. reg = <0 0x15010000 0 0x1000>;
  370. #clock-cells = <1>;
  371. };
  372. vdecsys: syscon@16000000 {
  373. compatible = "mediatek,mt2712-vdecsys", "syscon";
  374. reg = <0 0x16000000 0 0x1000>;
  375. #clock-cells = <1>;
  376. };
  377. vencsys: syscon@18000000 {
  378. compatible = "mediatek,mt2712-vencsys", "syscon";
  379. reg = <0 0x18000000 0 0x1000>;
  380. #clock-cells = <1>;
  381. };
  382. jpgdecsys: syscon@19000000 {
  383. compatible = "mediatek,mt2712-jpgdecsys", "syscon";
  384. reg = <0 0x19000000 0 0x1000>;
  385. #clock-cells = <1>;
  386. };
  387. };