mt8516.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530
  1. // SPDX-License-Identifier: GPL-2.0
  2. /*
  3. * Copyright (c) 2019 MediaTek Inc.
  4. * Copyright (c) 2019 BayLibre, SAS.
  5. * Author: Fabien Parent <fparent@baylibre.com>
  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. /* 192 KiB reserved for ARM Trusted Firmware (BL31) */
  131. bl31_secmon_reserved: secmon@43000000 {
  132. no-map;
  133. reg = <0 0x43000000 0 0x30000>;
  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,cortex-a35-pmu";
  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. watchdog@10007000 {
  181. compatible = "mediatek,mt8516-wdt",
  182. "mediatek,mt6589-wdt";
  183. reg = <0 0x10007000 0 0x1000>;
  184. interrupts = <GIC_SPI 198 IRQ_TYPE_LEVEL_LOW>;
  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. gpio-controller;
  205. #gpio-cells = <2>;
  206. interrupt-controller;
  207. #interrupt-cells = <2>;
  208. interrupts = <GIC_SPI 134 IRQ_TYPE_LEVEL_HIGH>;
  209. };
  210. efuse: efuse@10009000 {
  211. compatible = "mediatek,mt8516-efuse", "mediatek,efuse";
  212. reg = <0 0x10009000 0 0x1000>;
  213. #address-cells = <1>;
  214. #size-cells = <1>;
  215. };
  216. pwrap: pwrap@1000f000 {
  217. compatible = "mediatek,mt8516-pwrap";
  218. reg = <0 0x1000f000 0 0x1000>;
  219. reg-names = "pwrap";
  220. interrupts = <GIC_SPI 204 IRQ_TYPE_LEVEL_LOW>;
  221. clocks = <&topckgen CLK_TOP_PMICWRAP_26M>,
  222. <&topckgen CLK_TOP_PMICWRAP_AP>;
  223. clock-names = "spi", "wrap";
  224. };
  225. sysirq: interrupt-controller@10200620 {
  226. compatible = "mediatek,mt8516-sysirq",
  227. "mediatek,mt6577-sysirq";
  228. interrupt-controller;
  229. #interrupt-cells = <3>;
  230. interrupt-parent = <&gic>;
  231. reg = <0 0x10200620 0 0x20>;
  232. };
  233. gic: interrupt-controller@10310000 {
  234. compatible = "arm,gic-400";
  235. #interrupt-cells = <3>;
  236. interrupt-parent = <&gic>;
  237. interrupt-controller;
  238. reg = <0 0x10310000 0 0x1000>,
  239. <0 0x1032f000 0 0x2000>,
  240. <0 0x10340000 0 0x2000>,
  241. <0 0x10360000 0 0x2000>;
  242. interrupts = <GIC_PPI 9
  243. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  244. };
  245. apdma: dma-controller@11000480 {
  246. compatible = "mediatek,mt8516-uart-dma",
  247. "mediatek,mt6577-uart-dma";
  248. reg = <0 0x11000480 0 0x80>,
  249. <0 0x11000500 0 0x80>,
  250. <0 0x11000580 0 0x80>,
  251. <0 0x11000600 0 0x80>,
  252. <0 0x11000980 0 0x80>,
  253. <0 0x11000a00 0 0x80>;
  254. interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_LOW>,
  255. <GIC_SPI 97 IRQ_TYPE_LEVEL_LOW>,
  256. <GIC_SPI 98 IRQ_TYPE_LEVEL_LOW>,
  257. <GIC_SPI 99 IRQ_TYPE_LEVEL_LOW>,
  258. <GIC_SPI 100 IRQ_TYPE_LEVEL_LOW>,
  259. <GIC_SPI 101 IRQ_TYPE_LEVEL_LOW>;
  260. dma-requests = <6>;
  261. clocks = <&topckgen CLK_TOP_APDMA>;
  262. clock-names = "apdma";
  263. #dma-cells = <1>;
  264. };
  265. uart0: serial@11005000 {
  266. compatible = "mediatek,mt8516-uart",
  267. "mediatek,mt6577-uart";
  268. reg = <0 0x11005000 0 0x1000>;
  269. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
  270. clocks = <&topckgen CLK_TOP_UART0_SEL>,
  271. <&topckgen CLK_TOP_UART0>;
  272. clock-names = "baud", "bus";
  273. dmas = <&apdma 0
  274. &apdma 1>;
  275. dma-names = "tx", "rx";
  276. status = "disabled";
  277. };
  278. uart1: serial@11006000 {
  279. compatible = "mediatek,mt8516-uart",
  280. "mediatek,mt6577-uart";
  281. reg = <0 0x11006000 0 0x1000>;
  282. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
  283. clocks = <&topckgen CLK_TOP_UART1_SEL>,
  284. <&topckgen CLK_TOP_UART1>;
  285. clock-names = "baud", "bus";
  286. dmas = <&apdma 2
  287. &apdma 3>;
  288. dma-names = "tx", "rx";
  289. status = "disabled";
  290. };
  291. uart2: serial@11007000 {
  292. compatible = "mediatek,mt8516-uart",
  293. "mediatek,mt6577-uart";
  294. reg = <0 0x11007000 0 0x1000>;
  295. interrupts = <GIC_SPI 211 IRQ_TYPE_LEVEL_LOW>;
  296. clocks = <&topckgen CLK_TOP_UART2_SEL>,
  297. <&topckgen CLK_TOP_UART2>;
  298. clock-names = "baud", "bus";
  299. dmas = <&apdma 4
  300. &apdma 5>;
  301. dma-names = "tx", "rx";
  302. status = "disabled";
  303. };
  304. i2c0: i2c@11009000 {
  305. compatible = "mediatek,mt8516-i2c",
  306. "mediatek,mt2712-i2c";
  307. reg = <0 0x11009000 0 0x90>,
  308. <0 0x11000180 0 0x80>;
  309. interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
  310. clock-div = <2>;
  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. clock-div = <2>;
  325. clocks = <&topckgen CLK_TOP_I2C1>,
  326. <&topckgen CLK_TOP_APDMA>;
  327. clock-names = "main", "dma";
  328. #address-cells = <1>;
  329. #size-cells = <0>;
  330. status = "disabled";
  331. };
  332. i2c2: i2c@1100b000 {
  333. compatible = "mediatek,mt8516-i2c",
  334. "mediatek,mt2712-i2c";
  335. reg = <0 0x1100b000 0 0x90>,
  336. <0 0x11000280 0 0x80>;
  337. interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
  338. clock-div = <2>;
  339. clocks = <&topckgen CLK_TOP_I2C2>,
  340. <&topckgen CLK_TOP_APDMA>;
  341. clock-names = "main", "dma";
  342. #address-cells = <1>;
  343. #size-cells = <0>;
  344. status = "disabled";
  345. };
  346. spi: spi@1100c000 {
  347. compatible = "mediatek,mt8516-spi",
  348. "mediatek,mt2712-spi";
  349. #address-cells = <1>;
  350. #size-cells = <0>;
  351. reg = <0 0x1100c000 0 0x1000>;
  352. interrupts = <GIC_SPI 104 IRQ_TYPE_LEVEL_LOW>;
  353. clocks = <&topckgen CLK_TOP_UNIVPLL_D12>,
  354. <&topckgen CLK_TOP_SPI_SEL>,
  355. <&topckgen CLK_TOP_SPI>;
  356. clock-names = "parent-clk", "sel-clk", "spi-clk";
  357. status = "disabled";
  358. };
  359. mmc0: mmc@11120000 {
  360. compatible = "mediatek,mt8516-mmc";
  361. reg = <0 0x11120000 0 0x1000>;
  362. interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
  363. clocks = <&topckgen CLK_TOP_MSDC0>,
  364. <&topckgen CLK_TOP_AHB_INFRA_SEL>,
  365. <&topckgen CLK_TOP_MSDC0_INFRA>;
  366. clock-names = "source", "hclk", "source_cg";
  367. status = "disabled";
  368. };
  369. mmc1: mmc@11130000 {
  370. compatible = "mediatek,mt8516-mmc";
  371. reg = <0 0x11130000 0 0x1000>;
  372. interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
  373. clocks = <&topckgen CLK_TOP_MSDC1>,
  374. <&topckgen CLK_TOP_AHB_INFRA_SEL>,
  375. <&topckgen CLK_TOP_MSDC1_INFRA>;
  376. clock-names = "source", "hclk", "source_cg";
  377. status = "disabled";
  378. };
  379. mmc2: mmc@11170000 {
  380. compatible = "mediatek,mt8516-mmc";
  381. reg = <0 0x11170000 0 0x1000>;
  382. interrupts = <GIC_SPI 109 IRQ_TYPE_LEVEL_LOW>;
  383. clocks = <&topckgen CLK_TOP_MSDC2>,
  384. <&topckgen CLK_TOP_RG_MSDC2>,
  385. <&topckgen CLK_TOP_MSDC2_INFRA>;
  386. clock-names = "source", "hclk", "source_cg";
  387. status = "disabled";
  388. };
  389. ethernet: ethernet@11180000 {
  390. compatible = "mediatek,mt8516-eth";
  391. reg = <0 0x11180000 0 0x1000>;
  392. mediatek,pericfg = <&pericfg>;
  393. interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_LOW>;
  394. clocks = <&topckgen CLK_TOP_RG_ETH>,
  395. <&topckgen CLK_TOP_66M_ETH>,
  396. <&topckgen CLK_TOP_133M_ETH>;
  397. clock-names = "core", "reg", "trans";
  398. status = "disabled";
  399. };
  400. rng: rng@1020c000 {
  401. compatible = "mediatek,mt8516-rng",
  402. "mediatek,mt7623-rng";
  403. reg = <0 0x1020c000 0 0x100>;
  404. clocks = <&topckgen CLK_TOP_TRNG>;
  405. clock-names = "rng";
  406. };
  407. pwm: pwm@11008000 {
  408. compatible = "mediatek,mt8516-pwm";
  409. reg = <0 0x11008000 0 0x1000>;
  410. #pwm-cells = <2>;
  411. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_LOW>;
  412. clocks = <&topckgen CLK_TOP_PWM>,
  413. <&topckgen CLK_TOP_PWM_B>,
  414. <&topckgen CLK_TOP_PWM1_FB>,
  415. <&topckgen CLK_TOP_PWM2_FB>,
  416. <&topckgen CLK_TOP_PWM3_FB>,
  417. <&topckgen CLK_TOP_PWM4_FB>,
  418. <&topckgen CLK_TOP_PWM5_FB>;
  419. clock-names = "top", "main", "pwm1", "pwm2", "pwm3",
  420. "pwm4", "pwm5";
  421. };
  422. usb0: usb@11100000 {
  423. compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb";
  424. reg = <0 0x11100000 0 0x1000>;
  425. interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
  426. interrupt-names = "mc";
  427. phys = <&usb0_port PHY_TYPE_USB2>;
  428. clocks = <&topckgen CLK_TOP_USB>,
  429. <&topckgen CLK_TOP_USBIF>,
  430. <&topckgen CLK_TOP_USB_1P>;
  431. clock-names = "main","mcu","univpll";
  432. status = "disabled";
  433. };
  434. usb1: usb@11190000 {
  435. compatible = "mediatek,mt8516-musb", "mediatek,mtk-musb";
  436. reg = <0 0x11190000 0 0x1000>;
  437. interrupts = <GIC_SPI 210 IRQ_TYPE_LEVEL_LOW>;
  438. interrupt-names = "mc";
  439. phys = <&usb1_port PHY_TYPE_USB2>;
  440. clocks = <&topckgen CLK_TOP_USB>,
  441. <&topckgen CLK_TOP_USBIF>,
  442. <&topckgen CLK_TOP_USB_1P>;
  443. clock-names = "main","mcu","univpll";
  444. dr_mode = "host";
  445. status = "disabled";
  446. };
  447. usb_phy: t-phy@11110000 {
  448. compatible = "mediatek,mt8516-tphy",
  449. "mediatek,generic-tphy-v1";
  450. reg = <0 0x11110000 0 0x800>;
  451. #address-cells = <2>;
  452. #size-cells = <2>;
  453. ranges;
  454. status = "disabled";
  455. usb0_port: usb-phy@11110800 {
  456. reg = <0 0x11110800 0 0x100>;
  457. clocks = <&topckgen CLK_TOP_USB_PHY48M>;
  458. clock-names = "ref";
  459. #phy-cells = <1>;
  460. };
  461. usb1_port: usb-phy@11110900 {
  462. reg = <0 0x11110900 0 0x100>;
  463. clocks = <&topckgen CLK_TOP_USB_PHY48M>;
  464. clock-names = "ref";
  465. #phy-cells = <1>;
  466. };
  467. };
  468. auxadc: adc@11003000 {
  469. compatible = "mediatek,mt8516-auxadc",
  470. "mediatek,mt8173-auxadc";
  471. reg = <0 0x11003000 0 0x1000>;
  472. clocks = <&topckgen CLK_TOP_AUX_ADC>;
  473. clock-names = "main";
  474. #io-channel-cells = <1>;
  475. status = "disabled";
  476. };
  477. };
  478. };