mt8173.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546
  1. /*
  2. * Copyright (c) 2014 MediaTek Inc.
  3. * Author: Eddie Huang <eddie.huang@mediatek.com>
  4. *
  5. * This program is free software; you can redistribute it and/or modify
  6. * it under the terms of the GNU General Public License version 2 as
  7. * published by the Free Software Foundation.
  8. *
  9. * This program is distributed in the hope that it will be useful,
  10. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  11. * GNU General Public License for more details.
  12. */
  13. #include <dt-bindings/clock/mt8173-clk.h>
  14. #include <dt-bindings/interrupt-controller/irq.h>
  15. #include <dt-bindings/interrupt-controller/arm-gic.h>
  16. #include <dt-bindings/power/mt8173-power.h>
  17. #include <dt-bindings/reset-controller/mt8173-resets.h>
  18. #include "mt8173-pinfunc.h"
  19. / {
  20. compatible = "mediatek,mt8173";
  21. interrupt-parent = <&sysirq>;
  22. #address-cells = <2>;
  23. #size-cells = <2>;
  24. cpus {
  25. #address-cells = <1>;
  26. #size-cells = <0>;
  27. cpu-map {
  28. cluster0 {
  29. core0 {
  30. cpu = <&cpu0>;
  31. };
  32. core1 {
  33. cpu = <&cpu1>;
  34. };
  35. };
  36. cluster1 {
  37. core0 {
  38. cpu = <&cpu2>;
  39. };
  40. core1 {
  41. cpu = <&cpu3>;
  42. };
  43. };
  44. };
  45. cpu0: cpu@0 {
  46. device_type = "cpu";
  47. compatible = "arm,cortex-a53";
  48. reg = <0x000>;
  49. enable-method = "psci";
  50. cpu-idle-states = <&CPU_SLEEP_0>;
  51. #cooling-cells = <2>;
  52. };
  53. cpu1: cpu@1 {
  54. device_type = "cpu";
  55. compatible = "arm,cortex-a53";
  56. reg = <0x001>;
  57. enable-method = "psci";
  58. cpu-idle-states = <&CPU_SLEEP_0>;
  59. };
  60. cpu2: cpu@100 {
  61. device_type = "cpu";
  62. compatible = "arm,cortex-a57";
  63. reg = <0x100>;
  64. enable-method = "psci";
  65. cpu-idle-states = <&CPU_SLEEP_0>;
  66. #cooling-cells = <2>;
  67. };
  68. cpu3: cpu@101 {
  69. device_type = "cpu";
  70. compatible = "arm,cortex-a57";
  71. reg = <0x101>;
  72. enable-method = "psci";
  73. cpu-idle-states = <&CPU_SLEEP_0>;
  74. };
  75. idle-states {
  76. entry-method = "psci";
  77. CPU_SLEEP_0: cpu-sleep-0 {
  78. compatible = "arm,idle-state";
  79. local-timer-stop;
  80. entry-latency-us = <639>;
  81. exit-latency-us = <680>;
  82. min-residency-us = <1088>;
  83. arm,psci-suspend-param = <0x0010000>;
  84. };
  85. };
  86. };
  87. psci {
  88. compatible = "arm,psci";
  89. method = "smc";
  90. cpu_suspend = <0x84000001>;
  91. cpu_off = <0x84000002>;
  92. cpu_on = <0x84000003>;
  93. };
  94. clk26m: oscillator@0 {
  95. compatible = "fixed-clock";
  96. #clock-cells = <0>;
  97. clock-frequency = <26000000>;
  98. clock-output-names = "clk26m";
  99. };
  100. clk32k: oscillator@1 {
  101. compatible = "fixed-clock";
  102. #clock-cells = <0>;
  103. clock-frequency = <32000>;
  104. clock-output-names = "clk32k";
  105. };
  106. cpum_ck: oscillator@2 {
  107. compatible = "fixed-clock";
  108. #clock-cells = <0>;
  109. clock-frequency = <0>;
  110. clock-output-names = "cpum_ck";
  111. };
  112. timer {
  113. compatible = "arm,armv8-timer";
  114. interrupt-parent = <&gic>;
  115. interrupts = <GIC_PPI 13
  116. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  117. <GIC_PPI 14
  118. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  119. <GIC_PPI 11
  120. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  121. <GIC_PPI 10
  122. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  123. };
  124. soc {
  125. #address-cells = <2>;
  126. #size-cells = <2>;
  127. compatible = "simple-bus";
  128. ranges;
  129. topckgen: clock-controller@10000000 {
  130. compatible = "mediatek,mt8173-topckgen";
  131. reg = <0 0x10000000 0 0x1000>;
  132. #clock-cells = <1>;
  133. };
  134. infracfg: power-controller@10001000 {
  135. compatible = "mediatek,mt8173-infracfg", "syscon";
  136. reg = <0 0x10001000 0 0x1000>;
  137. #clock-cells = <1>;
  138. #reset-cells = <1>;
  139. };
  140. pericfg: power-controller@10003000 {
  141. compatible = "mediatek,mt8173-pericfg", "syscon";
  142. reg = <0 0x10003000 0 0x1000>;
  143. #clock-cells = <1>;
  144. #reset-cells = <1>;
  145. };
  146. syscfg_pctl_a: syscfg_pctl_a@10005000 {
  147. compatible = "mediatek,mt8173-pctl-a-syscfg", "syscon";
  148. reg = <0 0x10005000 0 0x1000>;
  149. };
  150. pio: pinctrl@0x10005000 {
  151. compatible = "mediatek,mt8173-pinctrl";
  152. reg = <0 0x1000b000 0 0x1000>;
  153. mediatek,pctl-regmap = <&syscfg_pctl_a>;
  154. pins-are-numbered;
  155. gpio-controller;
  156. #gpio-cells = <2>;
  157. interrupt-controller;
  158. #interrupt-cells = <2>;
  159. interrupts = <GIC_SPI 145 IRQ_TYPE_LEVEL_HIGH>,
  160. <GIC_SPI 146 IRQ_TYPE_LEVEL_HIGH>,
  161. <GIC_SPI 147 IRQ_TYPE_LEVEL_HIGH>;
  162. i2c0_pins_a: i2c0 {
  163. pins1 {
  164. pinmux = <MT8173_PIN_45_SDA0__FUNC_SDA0>,
  165. <MT8173_PIN_46_SCL0__FUNC_SCL0>;
  166. bias-disable;
  167. };
  168. };
  169. i2c1_pins_a: i2c1 {
  170. pins1 {
  171. pinmux = <MT8173_PIN_125_SDA1__FUNC_SDA1>,
  172. <MT8173_PIN_126_SCL1__FUNC_SCL1>;
  173. bias-disable;
  174. };
  175. };
  176. i2c2_pins_a: i2c2 {
  177. pins1 {
  178. pinmux = <MT8173_PIN_43_SDA2__FUNC_SDA2>,
  179. <MT8173_PIN_44_SCL2__FUNC_SCL2>;
  180. bias-disable;
  181. };
  182. };
  183. i2c3_pins_a: i2c3 {
  184. pins1 {
  185. pinmux = <MT8173_PIN_106_SDA3__FUNC_SDA3>,
  186. <MT8173_PIN_107_SCL3__FUNC_SCL3>;
  187. bias-disable;
  188. };
  189. };
  190. i2c4_pins_a: i2c4 {
  191. pins1 {
  192. pinmux = <MT8173_PIN_133_SDA4__FUNC_SDA4>,
  193. <MT8173_PIN_134_SCL4__FUNC_SCL4>;
  194. bias-disable;
  195. };
  196. };
  197. i2c6_pins_a: i2c6 {
  198. pins1 {
  199. pinmux = <MT8173_PIN_100_MSDC2_DAT0__FUNC_SDA5>,
  200. <MT8173_PIN_101_MSDC2_DAT1__FUNC_SCL5>;
  201. bias-disable;
  202. };
  203. };
  204. };
  205. scpsys: scpsys@10006000 {
  206. compatible = "mediatek,mt8173-scpsys";
  207. #power-domain-cells = <1>;
  208. reg = <0 0x10006000 0 0x1000>;
  209. clocks = <&clk26m>,
  210. <&topckgen CLK_TOP_MM_SEL>,
  211. <&topckgen CLK_TOP_VENC_SEL>,
  212. <&topckgen CLK_TOP_VENC_LT_SEL>;
  213. clock-names = "mfg", "mm", "venc", "venc_lt";
  214. infracfg = <&infracfg>;
  215. };
  216. watchdog: watchdog@10007000 {
  217. compatible = "mediatek,mt8173-wdt",
  218. "mediatek,mt6589-wdt";
  219. reg = <0 0x10007000 0 0x100>;
  220. };
  221. pwrap: pwrap@1000d000 {
  222. compatible = "mediatek,mt8173-pwrap";
  223. reg = <0 0x1000d000 0 0x1000>;
  224. reg-names = "pwrap";
  225. interrupts = <GIC_SPI 153 IRQ_TYPE_LEVEL_HIGH>;
  226. resets = <&infracfg MT8173_INFRA_PMIC_WRAP_RST>;
  227. reset-names = "pwrap";
  228. clocks = <&infracfg CLK_INFRA_PMICSPI>, <&infracfg CLK_INFRA_PMICWRAP>;
  229. clock-names = "spi", "wrap";
  230. };
  231. sysirq: intpol-controller@10200620 {
  232. compatible = "mediatek,mt8173-sysirq",
  233. "mediatek,mt6577-sysirq";
  234. interrupt-controller;
  235. #interrupt-cells = <3>;
  236. interrupt-parent = <&gic>;
  237. reg = <0 0x10200620 0 0x20>;
  238. };
  239. apmixedsys: clock-controller@10209000 {
  240. compatible = "mediatek,mt8173-apmixedsys";
  241. reg = <0 0x10209000 0 0x1000>;
  242. #clock-cells = <1>;
  243. };
  244. gic: interrupt-controller@10220000 {
  245. compatible = "arm,gic-400";
  246. #interrupt-cells = <3>;
  247. interrupt-parent = <&gic>;
  248. interrupt-controller;
  249. reg = <0 0x10221000 0 0x1000>,
  250. <0 0x10222000 0 0x2000>,
  251. <0 0x10224000 0 0x2000>,
  252. <0 0x10226000 0 0x2000>;
  253. interrupts = <GIC_PPI 9
  254. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  255. };
  256. uart0: serial@11002000 {
  257. compatible = "mediatek,mt8173-uart",
  258. "mediatek,mt6577-uart";
  259. reg = <0 0x11002000 0 0x400>;
  260. interrupts = <GIC_SPI 83 IRQ_TYPE_LEVEL_LOW>;
  261. clocks = <&pericfg CLK_PERI_UART0_SEL>, <&pericfg CLK_PERI_UART0>;
  262. clock-names = "baud", "bus";
  263. status = "disabled";
  264. };
  265. uart1: serial@11003000 {
  266. compatible = "mediatek,mt8173-uart",
  267. "mediatek,mt6577-uart";
  268. reg = <0 0x11003000 0 0x400>;
  269. interrupts = <GIC_SPI 84 IRQ_TYPE_LEVEL_LOW>;
  270. clocks = <&pericfg CLK_PERI_UART1_SEL>, <&pericfg CLK_PERI_UART1>;
  271. clock-names = "baud", "bus";
  272. status = "disabled";
  273. };
  274. uart2: serial@11004000 {
  275. compatible = "mediatek,mt8173-uart",
  276. "mediatek,mt6577-uart";
  277. reg = <0 0x11004000 0 0x400>;
  278. interrupts = <GIC_SPI 85 IRQ_TYPE_LEVEL_LOW>;
  279. clocks = <&pericfg CLK_PERI_UART2_SEL>, <&pericfg CLK_PERI_UART2>;
  280. clock-names = "baud", "bus";
  281. status = "disabled";
  282. };
  283. uart3: serial@11005000 {
  284. compatible = "mediatek,mt8173-uart",
  285. "mediatek,mt6577-uart";
  286. reg = <0 0x11005000 0 0x400>;
  287. interrupts = <GIC_SPI 86 IRQ_TYPE_LEVEL_LOW>;
  288. clocks = <&pericfg CLK_PERI_UART3_SEL>, <&pericfg CLK_PERI_UART3>;
  289. clock-names = "baud", "bus";
  290. status = "disabled";
  291. };
  292. i2c0: i2c@11007000 {
  293. compatible = "mediatek,mt8173-i2c";
  294. reg = <0 0x11007000 0 0x70>,
  295. <0 0x11000100 0 0x80>;
  296. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_LOW>;
  297. clock-div = <16>;
  298. clocks = <&pericfg CLK_PERI_I2C0>,
  299. <&pericfg CLK_PERI_AP_DMA>;
  300. clock-names = "main", "dma";
  301. pinctrl-names = "default";
  302. pinctrl-0 = <&i2c0_pins_a>;
  303. #address-cells = <1>;
  304. #size-cells = <0>;
  305. status = "disabled";
  306. };
  307. i2c1: i2c@11008000 {
  308. compatible = "mediatek,mt8173-i2c";
  309. reg = <0 0x11008000 0 0x70>,
  310. <0 0x11000180 0 0x80>;
  311. interrupts = <GIC_SPI 77 IRQ_TYPE_LEVEL_LOW>;
  312. clock-div = <16>;
  313. clocks = <&pericfg CLK_PERI_I2C1>,
  314. <&pericfg CLK_PERI_AP_DMA>;
  315. clock-names = "main", "dma";
  316. pinctrl-names = "default";
  317. pinctrl-0 = <&i2c1_pins_a>;
  318. #address-cells = <1>;
  319. #size-cells = <0>;
  320. status = "disabled";
  321. };
  322. i2c2: i2c@11009000 {
  323. compatible = "mediatek,mt8173-i2c";
  324. reg = <0 0x11009000 0 0x70>,
  325. <0 0x11000200 0 0x80>;
  326. interrupts = <GIC_SPI 78 IRQ_TYPE_LEVEL_LOW>;
  327. clock-div = <16>;
  328. clocks = <&pericfg CLK_PERI_I2C2>,
  329. <&pericfg CLK_PERI_AP_DMA>;
  330. clock-names = "main", "dma";
  331. pinctrl-names = "default";
  332. pinctrl-0 = <&i2c2_pins_a>;
  333. #address-cells = <1>;
  334. #size-cells = <0>;
  335. status = "disabled";
  336. };
  337. spi: spi@1100a000 {
  338. compatible = "mediatek,mt8173-spi";
  339. #address-cells = <1>;
  340. #size-cells = <0>;
  341. reg = <0 0x1100a000 0 0x1000>;
  342. interrupts = <GIC_SPI 110 IRQ_TYPE_LEVEL_LOW>;
  343. clocks = <&topckgen CLK_TOP_SYSPLL3_D2>,
  344. <&topckgen CLK_TOP_SPI_SEL>,
  345. <&pericfg CLK_PERI_SPI0>;
  346. clock-names = "parent-clk", "sel-clk", "spi-clk";
  347. status = "disabled";
  348. };
  349. i2c3: i2c@11010000 {
  350. compatible = "mediatek,mt8173-i2c";
  351. reg = <0 0x11010000 0 0x70>,
  352. <0 0x11000280 0 0x80>;
  353. interrupts = <GIC_SPI 79 IRQ_TYPE_LEVEL_LOW>;
  354. clock-div = <16>;
  355. clocks = <&pericfg CLK_PERI_I2C3>,
  356. <&pericfg CLK_PERI_AP_DMA>;
  357. clock-names = "main", "dma";
  358. pinctrl-names = "default";
  359. pinctrl-0 = <&i2c3_pins_a>;
  360. #address-cells = <1>;
  361. #size-cells = <0>;
  362. status = "disabled";
  363. };
  364. i2c4: i2c@11011000 {
  365. compatible = "mediatek,mt8173-i2c";
  366. reg = <0 0x11011000 0 0x70>,
  367. <0 0x11000300 0 0x80>;
  368. interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_LOW>;
  369. clock-div = <16>;
  370. clocks = <&pericfg CLK_PERI_I2C4>,
  371. <&pericfg CLK_PERI_AP_DMA>;
  372. clock-names = "main", "dma";
  373. pinctrl-names = "default";
  374. pinctrl-0 = <&i2c4_pins_a>;
  375. #address-cells = <1>;
  376. #size-cells = <0>;
  377. status = "disabled";
  378. };
  379. i2c6: i2c@11013000 {
  380. compatible = "mediatek,mt8173-i2c";
  381. reg = <0 0x11013000 0 0x70>,
  382. <0 0x11000080 0 0x80>;
  383. interrupts = <GIC_SPI 82 IRQ_TYPE_LEVEL_LOW>;
  384. clock-div = <16>;
  385. clocks = <&pericfg CLK_PERI_I2C6>,
  386. <&pericfg CLK_PERI_AP_DMA>;
  387. clock-names = "main", "dma";
  388. pinctrl-names = "default";
  389. pinctrl-0 = <&i2c6_pins_a>;
  390. #address-cells = <1>;
  391. #size-cells = <0>;
  392. status = "disabled";
  393. };
  394. afe: audio-controller@11220000 {
  395. compatible = "mediatek,mt8173-afe-pcm";
  396. reg = <0 0x11220000 0 0x1000>;
  397. interrupts = <GIC_SPI 134 IRQ_TYPE_EDGE_FALLING>;
  398. power-domains = <&scpsys MT8173_POWER_DOMAIN_AUDIO>;
  399. clocks = <&infracfg CLK_INFRA_AUDIO>,
  400. <&topckgen CLK_TOP_AUDIO_SEL>,
  401. <&topckgen CLK_TOP_AUD_INTBUS_SEL>,
  402. <&topckgen CLK_TOP_APLL1_DIV0>,
  403. <&topckgen CLK_TOP_APLL2_DIV0>,
  404. <&topckgen CLK_TOP_I2S0_M_SEL>,
  405. <&topckgen CLK_TOP_I2S1_M_SEL>,
  406. <&topckgen CLK_TOP_I2S2_M_SEL>,
  407. <&topckgen CLK_TOP_I2S3_M_SEL>,
  408. <&topckgen CLK_TOP_I2S3_B_SEL>;
  409. clock-names = "infra_sys_audio_clk",
  410. "top_pdn_audio",
  411. "top_pdn_aud_intbus",
  412. "bck0",
  413. "bck1",
  414. "i2s0_m",
  415. "i2s1_m",
  416. "i2s2_m",
  417. "i2s3_m",
  418. "i2s3_b";
  419. assigned-clocks = <&topckgen CLK_TOP_AUD_1_SEL>,
  420. <&topckgen CLK_TOP_AUD_2_SEL>;
  421. assigned-clock-parents = <&topckgen CLK_TOP_APLL1>,
  422. <&topckgen CLK_TOP_APLL2>;
  423. };
  424. mmc0: mmc@11230000 {
  425. compatible = "mediatek,mt8173-mmc",
  426. "mediatek,mt8135-mmc";
  427. reg = <0 0x11230000 0 0x1000>;
  428. interrupts = <GIC_SPI 71 IRQ_TYPE_LEVEL_LOW>;
  429. clocks = <&pericfg CLK_PERI_MSDC30_0>,
  430. <&topckgen CLK_TOP_MSDC50_0_H_SEL>;
  431. clock-names = "source", "hclk";
  432. status = "disabled";
  433. };
  434. mmc1: mmc@11240000 {
  435. compatible = "mediatek,mt8173-mmc",
  436. "mediatek,mt8135-mmc";
  437. reg = <0 0x11240000 0 0x1000>;
  438. interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_LOW>;
  439. clocks = <&pericfg CLK_PERI_MSDC30_1>,
  440. <&topckgen CLK_TOP_AXI_SEL>;
  441. clock-names = "source", "hclk";
  442. status = "disabled";
  443. };
  444. mmc2: mmc@11250000 {
  445. compatible = "mediatek,mt8173-mmc",
  446. "mediatek,mt8135-mmc";
  447. reg = <0 0x11250000 0 0x1000>;
  448. interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_LOW>;
  449. clocks = <&pericfg CLK_PERI_MSDC30_2>,
  450. <&topckgen CLK_TOP_AXI_SEL>;
  451. clock-names = "source", "hclk";
  452. status = "disabled";
  453. };
  454. mmc3: mmc@11260000 {
  455. compatible = "mediatek,mt8173-mmc",
  456. "mediatek,mt8135-mmc";
  457. reg = <0 0x11260000 0 0x1000>;
  458. interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_LOW>;
  459. clocks = <&pericfg CLK_PERI_MSDC30_3>,
  460. <&topckgen CLK_TOP_MSDC50_2_H_SEL>;
  461. clock-names = "source", "hclk";
  462. status = "disabled";
  463. };
  464. mmsys: clock-controller@14000000 {
  465. compatible = "mediatek,mt8173-mmsys", "syscon";
  466. reg = <0 0x14000000 0 0x1000>;
  467. #clock-cells = <1>;
  468. };
  469. imgsys: clock-controller@15000000 {
  470. compatible = "mediatek,mt8173-imgsys", "syscon";
  471. reg = <0 0x15000000 0 0x1000>;
  472. #clock-cells = <1>;
  473. };
  474. vdecsys: clock-controller@16000000 {
  475. compatible = "mediatek,mt8173-vdecsys", "syscon";
  476. reg = <0 0x16000000 0 0x1000>;
  477. #clock-cells = <1>;
  478. };
  479. vencsys: clock-controller@18000000 {
  480. compatible = "mediatek,mt8173-vencsys", "syscon";
  481. reg = <0 0x18000000 0 0x1000>;
  482. #clock-cells = <1>;
  483. };
  484. vencltsys: clock-controller@19000000 {
  485. compatible = "mediatek,mt8173-vencltsys", "syscon";
  486. reg = <0 0x19000000 0 0x1000>;
  487. #clock-cells = <1>;
  488. };
  489. };
  490. };