mt8516.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2019 MediaTek Inc.
  4. * Copyright (c) 2019 BayLibre, SAS.
  5. * Author: Fabien Parent <[email protected]>
  6. */
  7. #include <dt-bindings/clock/mt8516-clk.h>
  8. #include <dt-bindings/interrupt-controller/arm-gic.h>
  9. #include <dt-bindings/interrupt-controller/irq.h>
  10. #include <dt-bindings/phy/phy.h>
  11. #include "mt8516-pinfunc.h"
  12. / {
  13. compatible = "mediatek,mt8516";
  14. interrupt-parent = <&sysirq>;
  15. #address-cells = <2>;
  16. #size-cells = <2>;
  17. cluster0_opp: opp-table-0 {
  18. compatible = "operating-points-v2";
  19. opp-shared;
  20. opp-598000000 {
  21. opp-hz = /bits/ 64 <598000000>;
  22. opp-microvolt = <1150000>;
  23. };
  24. opp-747500000 {
  25. opp-hz = /bits/ 64 <747500000>;
  26. opp-microvolt = <1150000>;
  27. };
  28. opp-1040000000 {
  29. opp-hz = /bits/ 64 <1040000000>;
  30. opp-microvolt = <1200000>;
  31. };
  32. opp-1196000000 {
  33. opp-hz = /bits/ 64 <1196000000>;
  34. opp-microvolt = <1250000>;
  35. };
  36. opp-1300000000 {
  37. opp-hz = /bits/ 64 <1300000000>;
  38. opp-microvolt = <1300000>;
  39. };
  40. };
  41. cpus {
  42. #address-cells = <1>;
  43. #size-cells = <0>;
  44. cpu0: cpu@0 {
  45. device_type = "cpu";
  46. compatible = "arm,cortex-a35";
  47. reg = <0x0>;
  48. enable-method = "psci";
  49. cpu-idle-states = <&CLUSTER_SLEEP_0 &CLUSTER_SLEEP_0>,
  50. <&CPU_SLEEP_0_0 &CPU_SLEEP_0_0 &CPU_SLEEP_0_0>;
  51. clocks = <&infracfg CLK_IFR_MUX1_SEL>,
  52. <&topckgen CLK_TOP_MAINPLL_D2>;
  53. clock-names = "cpu", "intermediate";
  54. operating-points-v2 = <&cluster0_opp>;
  55. };
  56. cpu1: cpu@1 {
  57. device_type = "cpu";
  58. compatible = "arm,cortex-a35";
  59. reg = <0x1>;
  60. enable-method = "psci";
  61. cpu-idle-states = <&CLUSTER_SLEEP_0 &CLUSTER_SLEEP_0>,
  62. <&CPU_SLEEP_0_0 &CPU_SLEEP_0_0 &CPU_SLEEP_0_0>;
  63. clocks = <&infracfg CLK_IFR_MUX1_SEL>,
  64. <&topckgen CLK_TOP_MAINPLL_D2>;
  65. clock-names = "cpu", "intermediate";
  66. operating-points-v2 = <&cluster0_opp>;
  67. };
  68. cpu2: cpu@2 {
  69. device_type = "cpu";
  70. compatible = "arm,cortex-a35";
  71. reg = <0x2>;
  72. enable-method = "psci";
  73. cpu-idle-states = <&CLUSTER_SLEEP_0 &CLUSTER_SLEEP_0>,
  74. <&CPU_SLEEP_0_0 &CPU_SLEEP_0_0 &CPU_SLEEP_0_0>;
  75. clocks = <&infracfg CLK_IFR_MUX1_SEL>,
  76. <&topckgen CLK_TOP_MAINPLL_D2>;
  77. clock-names = "cpu", "intermediate";
  78. operating-points-v2 = <&cluster0_opp>;
  79. };
  80. cpu3: cpu@3 {
  81. device_type = "cpu";
  82. compatible = "arm,cortex-a35";
  83. reg = <0x3>;
  84. enable-method = "psci";
  85. cpu-idle-states = <&CLUSTER_SLEEP_0 &CLUSTER_SLEEP_0>,
  86. <&CPU_SLEEP_0_0 &CPU_SLEEP_0_0 &CPU_SLEEP_0_0>;
  87. clocks = <&infracfg CLK_IFR_MUX1_SEL>,
  88. <&topckgen CLK_TOP_MAINPLL_D2>;
  89. clock-names = "cpu", "intermediate", "armpll";
  90. operating-points-v2 = <&cluster0_opp>;
  91. };
  92. idle-states {
  93. entry-method = "psci";
  94. CPU_SLEEP_0_0: cpu-sleep-0-0 {
  95. compatible = "arm,idle-state";
  96. entry-latency-us = <600>;
  97. exit-latency-us = <600>;
  98. min-residency-us = <1200>;
  99. arm,psci-suspend-param = <0x0010000>;
  100. };
  101. CLUSTER_SLEEP_0: cluster-sleep-0 {
  102. compatible = "arm,idle-state";
  103. entry-latency-us = <800>;
  104. exit-latency-us = <1000>;
  105. min-residency-us = <2000>;
  106. arm,psci-suspend-param = <0x2010000>;
  107. };
  108. };
  109. };
  110. psci {
  111. compatible = "arm,psci-1.0";
  112. method = "smc";
  113. };
  114. clk26m: clk26m {
  115. compatible = "fixed-clock";
  116. #clock-cells = <0>;
  117. clock-frequency = <26000000>;
  118. clock-output-names = "clk26m";
  119. };
  120. clk32k: clk32k {
  121. compatible = "fixed-clock";
  122. #clock-cells = <0>;
  123. clock-frequency = <32000>;
  124. clock-output-names = "clk32k";
  125. };
  126. reserved-memory {
  127. #address-cells = <2>;
  128. #size-cells = <2>;
  129. ranges;
  130. /* 128 KiB reserved for ARM Trusted Firmware (BL31) */
  131. bl31_secmon_reserved: secmon@43000000 {
  132. no-map;
  133. reg = <0 0x43000000 0 0x20000>;
  134. };
  135. };
  136. timer {
  137. compatible = "arm,armv8-timer";
  138. interrupt-parent = <&gic>;
  139. interrupts = <GIC_PPI 13
  140. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  141. <GIC_PPI 14
  142. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  143. <GIC_PPI 11
  144. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  145. <GIC_PPI 10
  146. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  147. };
  148. pmu {
  149. compatible = "arm,armv8-pmuv3";
  150. interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_LOW>,
  151. <GIC_SPI 5 IRQ_TYPE_LEVEL_LOW>,
  152. <GIC_SPI 6 IRQ_TYPE_LEVEL_LOW>,
  153. <GIC_SPI 7 IRQ_TYPE_LEVEL_LOW>;
  154. interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
  155. };
  156. soc {
  157. #address-cells = <2>;
  158. #size-cells = <2>;
  159. compatible = "simple-bus";
  160. ranges;
  161. topckgen: topckgen@10000000 {
  162. compatible = "mediatek,mt8516-topckgen", "syscon";
  163. reg = <0 0x10000000 0 0x1000>;
  164. #clock-cells = <1>;
  165. };
  166. infracfg: infracfg@10001000 {
  167. compatible = "mediatek,mt8516-infracfg", "syscon";
  168. reg = <0 0x10001000 0 0x1000>;
  169. #clock-cells = <1>;
  170. };
  171. pericfg: pericfg@10003050 {
  172. compatible = "mediatek,mt8516-pericfg", "syscon";
  173. reg = <0 0x10003050 0 0x1000>;
  174. };
  175. apmixedsys: apmixedsys@10018000 {
  176. compatible = "mediatek,mt8516-apmixedsys", "syscon";
  177. reg = <0 0x10018000 0 0x710>;
  178. #clock-cells = <1>;
  179. };
  180. toprgu: toprgu@10007000 {
  181. compatible = "mediatek,mt8516-wdt",
  182. "mediatek,mt6589-wdt";
  183. reg = <0 0x10007000 0 0x1000>;
  184. interrupts = <GIC_SPI 198 IRQ_TYPE_EDGE_FALLING>;
  185. #reset-cells = <1>;
  186. };
  187. timer: timer@10008000 {
  188. compatible = "mediatek,mt8516-timer",
  189. "mediatek,mt6577-timer";
  190. reg = <0 0x10008000 0 0x1000>;
  191. interrupts = <GIC_SPI 132 IRQ_TYPE_LEVEL_LOW>;
  192. clocks = <&topckgen CLK_TOP_CLK26M_D2>,
  193. <&topckgen CLK_TOP_APXGPT>;
  194. clock-names = "clk13m", "bus";
  195. };
  196. syscfg_pctl: syscfg-pctl@10005000 {
  197. compatible = "syscon";
  198. reg = <0 0x10005000 0 0x1000>;
  199. };
  200. pio: pinctrl@1000b000 {
  201. compatible = "mediatek,mt8516-pinctrl";
  202. reg = <0 0x1000b000 0 0x1000>;
  203. mediatek,pctl-regmap = <&syscfg_pctl>;
  204. pins-are-numbered;
  205. gpio-controller;
  206. #gpio-cells = <2>;
  207. interrupt-controller;
  208. #interrupt-cells = <2>;
  209. interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
  210. };
  211. efuse: efuse@10009000 {
  212. compatible = "mediatek,mt8516-efuse", "mediatek,efuse";
  213. reg = <0 0x10009000 0 0x1000>;
  214. #address-cells = <1>;
  215. #size-cells = <1>;
  216. };
  217. pwrap: pwrap@1000f000 {
  218. compatible = "mediatek,mt8516-pwrap";
  219. reg = <0 0x1000f000 0 0x1000>;
  220. reg-names = "pwrap";
  221. interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
  222. clocks = <&topckgen CLK_TOP_PMICWRAP_26M>,
  223. <&topckgen CLK_TOP_PMICWRAP_AP>;
  224. clock-names = "spi", "wrap";
  225. };
  226. sysirq: interrupt-controller@10200620 {
  227. compatible = "mediatek,mt8516-sysirq",
  228. "mediatek,mt6577-sysirq";
  229. interrupt-controller;
  230. #interrupt-cells = <3>;
  231. interrupt-parent = <&gic>;
  232. reg = <0 0x10200620 0 0x20>;
  233. };
  234. gic: interrupt-controller@10310000 {
  235. compatible = "arm,gic-400";
  236. #interrupt-cells = <3>;
  237. interrupt-parent = <&gic>;
  238. interrupt-controller;
  239. reg = <0 0x10310000 0 0x1000>,
  240. <0 0x10320000 0 0x1000>,
  241. <0 0x10340000 0 0x2000>,
  242. <0 0x10360000 0 0x2000>;
  243. interrupts = <GIC_PPI 9
  244. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  245. };
  246. apdma: dma-controller@11000480 {
  247. compatible = "mediatek,mt8516-uart-dma",
  248. "mediatek,mt6577-uart-dma";
  249. reg = <0 0x11000480 0 0x80>,
  250. <0 0x11000500 0 0x80>,
  251. <0 0x11000580 0 0x80>,
  252. <0 0x11000600 0 0x80>,
  253. <0 0x11000980 0 0x80>,
  254. <0 0x11000a00 0 0x80>;
  255. interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>,
  256. <GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>,
  257. <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>,
  258. <GIC_SPI 99 IRQ_TYPE_LEVEL_LOW>,
  259. <GIC_SPI 100 IRQ_TYPE_LEVEL_LOW>,
  260. <GIC_SPI 101 IRQ_TYPE_LEVEL_LOW>;
  261. dma-requests = <6>;
  262. clocks = <&topckgen CLK_TOP_APDMA>;
  263. clock-names = "apdma";
  264. #dma-cells = <1>;
  265. };
  266. uart0: serial@11005000 {
  267. compatible = "mediatek,mt8516-uart",
  268. "mediatek,mt6577-uart";
  269. reg = <0 0x11005000 0 0x1000>;
  270. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
  271. clocks = <&topckgen CLK_TOP_UART0_SEL>,
  272. <&topckgen CLK_TOP_UART0>;
  273. clock-names = "baud", "bus";
  274. dmas = <&apdma 0
  275. &apdma 1>;
  276. dma-names = "tx", "rx";
  277. status = "disabled";
  278. };
  279. uart1: serial@11006000 {
  280. compatible = "mediatek,mt8516-uart",
  281. "mediatek,mt6577-uart";
  282. reg = <0 0x11006000 0 0x1000>;
  283. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
  284. clocks = <&topckgen CLK_TOP_UART1_SEL>,
  285. <&topckgen CLK_TOP_UART1>;
  286. clock-names = "baud", "bus";
  287. dmas = <&apdma 2
  288. &apdma 3>;
  289. dma-names = "tx", "rx";
  290. status = "disabled";
  291. };
  292. uart2: serial@11007000 {
  293. compatible = "mediatek,mt8516-uart",
  294. "mediatek,mt6577-uart";
  295. reg = <0 0x11007000 0 0x1000>;
  296. interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>;
  297. clocks = <&topckgen CLK_TOP_UART2_SEL>,
  298. <&topckgen CLK_TOP_UART2>;
  299. clock-names = "baud", "bus";
  300. dmas = <&apdma 4
  301. &apdma 5>;
  302. dma-names = "tx", "rx";
  303. status = "disabled";
  304. };
  305. i2c0: i2c@11009000 {
  306. compatible = "mediatek,mt8516-i2c",
  307. "mediatek,mt2712-i2c";
  308. reg = <0 0x11009000 0 0x90>,
  309. <0 0x11000180 0 0x80>;
  310. interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
  311. clocks = <&topckgen CLK_TOP_I2C0>,
  312. <&topckgen CLK_TOP_APDMA>;
  313. clock-names = "main", "dma";
  314. #address-cells = <1>;
  315. #size-cells = <0>;
  316. status = "disabled";
  317. };
  318. i2c1: i2c@1100a000 {
  319. compatible = "mediatek,mt8516-i2c",
  320. "mediatek,mt2712-i2c";
  321. reg = <0 0x1100a000 0 0x90>,
  322. <0 0x11000200 0 0x80>;
  323. interrupts = <GIC_SPI 81 IRQ_TYPE_LEVEL_LOW>;
  324. clocks = <&topckgen CLK_TOP_I2C1>,
  325. <&topckgen CLK_TOP_APDMA>;
  326. clock-names = "main", "dma";
  327. #address-cells = <1>;
  328. #size-cells = <0>;
  329. status = "disabled";
  330. };
  331. i2c2: i2c@1100b000 {
  332. compatible = "mediatek,mt8516-i2c",
  333. "mediatek,mt2712-i2c";
  334. reg = <0 0x1100b000 0 0x90>,
  335. <0 0x11000280 0 0x80>;
  336. interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
  337. clocks = <&topckgen CLK_TOP_I2C2>,
  338. <&topckgen CLK_TOP_APDMA>;
  339. clock-names = "main", "dma";
  340. #address-cells = <1>;
  341. #size-cells = <0>;
  342. status = "disabled";
  343. };
  344. spi: spi@1100c000 {
  345. compatible = "mediatek,mt8516-spi",
  346. "mediatek,mt2712-spi";
  347. #address-cells = <1>;
  348. #size-cells = <0>;
  349. reg = <0 0x1100c000 0 0x1000>;
  350. interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>;
  351. clocks = <&topckgen CLK_TOP_UNIVPLL_D12>,
  352. <&topckgen CLK_TOP_SPI_SEL>,
  353. <&topckgen CLK_TOP_SPI>;
  354. clock-names = "parent-clk", "sel-clk", "spi-clk";
  355. status = "disabled";
  356. };
  357. mmc0: mmc@11120000 {
  358. compatible = "mediatek,mt8516-mmc";
  359. reg = <0 0x11120000 0 0x1000>;
  360. interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
  361. clocks = <&topckgen CLK_TOP_MSDC0>,
  362. <&topckgen CLK_TOP_AHB_INFRA_SEL>,
  363. <&topckgen CLK_TOP_MSDC0_INFRA>;
  364. clock-names = "source", "hclk", "source_cg";
  365. status = "disabled";
  366. };
  367. mmc1: mmc@11130000 {
  368. compatible = "mediatek,mt8516-mmc";
  369. reg = <0 0x11130000 0 0x1000>;
  370. interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
  371. clocks = <&topckgen CLK_TOP_MSDC1>,
  372. <&topckgen CLK_TOP_AHB_INFRA_SEL>,
  373. <&topckgen CLK_TOP_MSDC1_INFRA>;
  374. clock-names = "source", "hclk", "source_cg";
  375. status = "disabled";
  376. };
  377. mmc2: mmc@11170000 {
  378. compatible = "mediatek,mt8516-mmc";
  379. reg = <0 0x11170000 0 0x1000>;
  380. interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>;
  381. clocks = <&topckgen CLK_TOP_MSDC2>,
  382. <&topckgen CLK_TOP_RG_MSDC2>,
  383. <&topckgen CLK_TOP_MSDC2_INFRA>;
  384. clock-names = "source", "hclk", "source_cg";
  385. status = "disabled";
  386. };
  387. ethernet: ethernet@11180000 {
  388. compatible = "mediatek,mt8516-eth";
  389. reg = <0 0x11180000 0 0x1000>;
  390. mediatek,pericfg = <&pericfg>;
  391. interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
  392. clocks = <&topckgen CLK_TOP_RG_ETH>,
  393. <&topckgen CLK_TOP_66M_ETH>,
  394. <&topckgen CLK_TOP_133M_ETH>;
  395. clock-names = "core", "reg", "trans";
  396. status = "disabled";
  397. };
  398. rng: rng@1020c000 {
  399. compatible = "mediatek,mt8516-rng",
  400. "mediatek,mt7623-rng";
  401. reg = <0 0x1020c000 0 0x100>;
  402. clocks = <&topckgen CLK_TOP_TRNG>;
  403. clock-names = "rng";
  404. };
  405. pwm: pwm@11008000 {
  406. compatible = "mediatek,mt8516-pwm";
  407. reg = <0 0x11008000 0 0x1000>;
  408. #pwm-cells = <2>;
  409. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_LOW>;
  410. clocks = <&topckgen CLK_TOP_PWM>,
  411. <&topckgen CLK_TOP_PWM_B>,
  412. <&topckgen CLK_TOP_PWM1_FB>,
  413. <&topckgen CLK_TOP_PWM2_FB>,
  414. <&topckgen CLK_TOP_PWM3_FB>,
  415. <&topckgen CLK_TOP_PWM4_FB>,
  416. <&topckgen CLK_TOP_PWM5_FB>;
  417. clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
  418. "pwm4", "pwm5";
  419. };
  420. usb0: usb@11100000 {
  421. compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb";
  422. reg = <0 0x11100000 0 0x1000>;
  423. interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
  424. interrupt-names = "mc";
  425. phys = <&usb0_port PHY_TYPE_USB2>;
  426. clocks = <&topckgen CLK_TOP_USB>,
  427. <&topckgen CLK_TOP_USBIF>,
  428. <&topckgen CLK_TOP_USB_1P>;
  429. clock-names = "main","mcu","univpll";
  430. status = "disabled";
  431. };
  432. usb1: usb@11190000 {
  433. compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb";
  434. reg = <0 0x11190000 0 0x1000>;
  435. interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_LOW>;
  436. interrupt-names = "mc";
  437. phys = <&usb1_port PHY_TYPE_USB2>;
  438. clocks = <&topckgen CLK_TOP_USB>,
  439. <&topckgen CLK_TOP_USBIF>,
  440. <&topckgen CLK_TOP_USB_1P>;
  441. clock-names = "main","mcu","univpll";
  442. dr_mode = "host";
  443. status = "disabled";
  444. };
  445. usb_phy: t-phy@11110000 {
  446. compatible = "mediatek,mt8516-tphy",
  447. "mediatek,generic-tphy-v1";
  448. reg = <0 0x11110000 0 0x800>;
  449. #address-cells = <2>;
  450. #size-cells = <2>;
  451. ranges;
  452. status = "disabled";
  453. usb0_port: usb-phy@11110800 {
  454. reg = <0 0x11110800 0 0x100>;
  455. clocks = <&topckgen CLK_TOP_USB_PHY48M>;
  456. clock-names = "ref";
  457. #phy-cells = <1>;
  458. };
  459. usb1_port: usb-phy@11110900 {
  460. reg = <0 0x11110900 0 0x100>;
  461. clocks = <&topckgen CLK_TOP_USB_PHY48M>;
  462. clock-names = "ref";
  463. #phy-cells = <1>;
  464. };
  465. };
  466. auxadc: adc@11003000 {
  467. compatible = "mediatek,mt8516-auxadc",
  468. "mediatek,mt8173-auxadc";
  469. reg = <0 0x11003000 0 0x1000>;
  470. clocks = <&topckgen CLK_TOP_AUX_ADC>;
  471. clock-names = "main";
  472. #io-channel-cells = <1>;
  473. status = "disabled";
  474. };
  475. };
  476. };