sun8i-a23.dtsi 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570
  1. /*
  2. * Copyright 2014 Chen-Yu Tsai
  3. *
  4. * Chen-Yu Tsai <wens@csie.org>
  5. *
  6. * This file is dual-licensed: you can use it either under the terms
  7. * of the GPL or the X11 license, at your option. Note that this dual
  8. * licensing only applies to this file, and not this project as a
  9. * whole.
  10. *
  11. * a) This library is free software; you can redistribute it and/or
  12. * modify it under the terms of the GNU General Public License as
  13. * published by the Free Software Foundation; either version 2 of the
  14. * License, or (at your option) any later version.
  15. *
  16. * This library is distributed in the hope that it will be useful,
  17. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  19. * GNU General Public License for more details.
  20. *
  21. * You should have received a copy of the GNU General Public
  22. * License along with this library; if not, write to the Free
  23. * Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston,
  24. * MA 02110-1301 USA
  25. *
  26. * Or, alternatively,
  27. *
  28. * b) Permission is hereby granted, free of charge, to any person
  29. * obtaining a copy of this software and associated documentation
  30. * files (the "Software"), to deal in the Software without
  31. * restriction, including without limitation the rights to use,
  32. * copy, modify, merge, publish, distribute, sublicense, and/or
  33. * sell copies of the Software, and to permit persons to whom the
  34. * Software is furnished to do so, subject to the following
  35. * conditions:
  36. *
  37. * The above copyright notice and this permission notice shall be
  38. * included in all copies or substantial portions of the Software.
  39. *
  40. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  41. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  42. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  43. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  44. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  45. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  46. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  47. * OTHER DEALINGS IN THE SOFTWARE.
  48. */
  49. /include/ "skeleton.dtsi"
  50. / {
  51. interrupt-parent = <&gic>;
  52. aliases {
  53. serial0 = &uart0;
  54. serial1 = &uart1;
  55. serial2 = &uart2;
  56. serial3 = &uart3;
  57. serial4 = &uart4;
  58. serial5 = &r_uart;
  59. };
  60. cpus {
  61. #address-cells = <1>;
  62. #size-cells = <0>;
  63. cpu@0 {
  64. compatible = "arm,cortex-a7";
  65. device_type = "cpu";
  66. reg = <0>;
  67. };
  68. cpu@1 {
  69. compatible = "arm,cortex-a7";
  70. device_type = "cpu";
  71. reg = <1>;
  72. };
  73. };
  74. memory {
  75. reg = <0x40000000 0x40000000>;
  76. };
  77. clocks {
  78. #address-cells = <1>;
  79. #size-cells = <1>;
  80. ranges;
  81. osc24M: osc24M_clk {
  82. #clock-cells = <0>;
  83. compatible = "fixed-clock";
  84. clock-frequency = <24000000>;
  85. clock-output-names = "osc24M";
  86. };
  87. osc32k: osc32k_clk {
  88. #clock-cells = <0>;
  89. compatible = "fixed-clock";
  90. clock-frequency = <32768>;
  91. clock-output-names = "osc32k";
  92. };
  93. pll1: clk@01c20000 {
  94. #clock-cells = <0>;
  95. compatible = "allwinner,sun8i-a23-pll1-clk";
  96. reg = <0x01c20000 0x4>;
  97. clocks = <&osc24M>;
  98. clock-output-names = "pll1";
  99. };
  100. /* dummy clock until actually implemented */
  101. pll6: pll6_clk {
  102. #clock-cells = <0>;
  103. compatible = "fixed-clock";
  104. clock-frequency = <600000000>;
  105. clock-output-names = "pll6";
  106. };
  107. cpu: cpu_clk@01c20050 {
  108. #clock-cells = <0>;
  109. compatible = "allwinner,sun4i-a10-cpu-clk";
  110. reg = <0x01c20050 0x4>;
  111. /*
  112. * PLL1 is listed twice here.
  113. * While it looks suspicious, it's actually documented
  114. * that way both in the datasheet and in the code from
  115. * Allwinner.
  116. */
  117. clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
  118. clock-output-names = "cpu";
  119. };
  120. axi: axi_clk@01c20050 {
  121. #clock-cells = <0>;
  122. compatible = "allwinner,sun8i-a23-axi-clk";
  123. reg = <0x01c20050 0x4>;
  124. clocks = <&cpu>;
  125. clock-output-names = "axi";
  126. };
  127. ahb1_mux: ahb1_mux_clk@01c20054 {
  128. #clock-cells = <0>;
  129. compatible = "allwinner,sun6i-a31-ahb1-mux-clk";
  130. reg = <0x01c20054 0x4>;
  131. clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6>;
  132. clock-output-names = "ahb1_mux";
  133. };
  134. ahb1: ahb1_clk@01c20054 {
  135. #clock-cells = <0>;
  136. compatible = "allwinner,sun4i-a10-ahb-clk";
  137. reg = <0x01c20054 0x4>;
  138. clocks = <&ahb1_mux>;
  139. clock-output-names = "ahb1";
  140. };
  141. apb1: apb1_clk@01c20054 {
  142. #clock-cells = <0>;
  143. compatible = "allwinner,sun4i-a10-apb0-clk";
  144. reg = <0x01c20054 0x4>;
  145. clocks = <&ahb1>;
  146. clock-output-names = "apb1";
  147. };
  148. ahb1_gates: clk@01c20060 {
  149. #clock-cells = <1>;
  150. compatible = "allwinner,sun8i-a23-ahb1-gates-clk";
  151. reg = <0x01c20060 0x8>;
  152. clocks = <&ahb1>;
  153. clock-output-names = "ahb1_mipidsi", "ahb1_dma",
  154. "ahb1_mmc0", "ahb1_mmc1", "ahb1_mmc2",
  155. "ahb1_nand", "ahb1_sdram",
  156. "ahb1_hstimer", "ahb1_spi0",
  157. "ahb1_spi1", "ahb1_otg", "ahb1_ehci",
  158. "ahb1_ohci", "ahb1_ve", "ahb1_lcd",
  159. "ahb1_csi", "ahb1_be", "ahb1_fe",
  160. "ahb1_gpu", "ahb1_spinlock",
  161. "ahb1_drc";
  162. };
  163. apb1_gates: clk@01c20068 {
  164. #clock-cells = <1>;
  165. compatible = "allwinner,sun8i-a23-apb1-gates-clk";
  166. reg = <0x01c20068 0x4>;
  167. clocks = <&apb1>;
  168. clock-output-names = "apb1_codec", "apb1_pio",
  169. "apb1_daudio0", "apb1_daudio1";
  170. };
  171. apb2_mux: apb2_mux_clk@01c20058 {
  172. #clock-cells = <0>;
  173. compatible = "allwinner,sun4i-a10-apb1-mux-clk";
  174. reg = <0x01c20058 0x4>;
  175. clocks = <&osc32k>, <&osc24M>, <&pll6>, <&pll6>;
  176. clock-output-names = "apb2_mux";
  177. };
  178. apb2: apb2_clk@01c20058 {
  179. #clock-cells = <0>;
  180. compatible = "allwinner,sun6i-a31-apb2-div-clk";
  181. reg = <0x01c20058 0x4>;
  182. clocks = <&apb2_mux>;
  183. clock-output-names = "apb2";
  184. };
  185. apb2_gates: clk@01c2006c {
  186. #clock-cells = <1>;
  187. compatible = "allwinner,sun8i-a23-apb2-gates-clk";
  188. reg = <0x01c2006c 0x4>;
  189. clocks = <&apb2>;
  190. clock-output-names = "apb2_i2c0", "apb2_i2c1",
  191. "apb2_i2c2", "apb2_uart0",
  192. "apb2_uart1", "apb2_uart2",
  193. "apb2_uart3", "apb2_uart4";
  194. };
  195. mmc0_clk: clk@01c20088 {
  196. #clock-cells = <0>;
  197. compatible = "allwinner,sun4i-a10-mod0-clk";
  198. reg = <0x01c20088 0x4>;
  199. clocks = <&osc24M>, <&pll6>;
  200. clock-output-names = "mmc0";
  201. };
  202. mmc1_clk: clk@01c2008c {
  203. #clock-cells = <0>;
  204. compatible = "allwinner,sun4i-a10-mod0-clk";
  205. reg = <0x01c2008c 0x4>;
  206. clocks = <&osc24M>, <&pll6>;
  207. clock-output-names = "mmc1";
  208. };
  209. mmc2_clk: clk@01c20090 {
  210. #clock-cells = <0>;
  211. compatible = "allwinner,sun4i-a10-mod0-clk";
  212. reg = <0x01c20090 0x4>;
  213. clocks = <&osc24M>, <&pll6>;
  214. clock-output-names = "mmc2";
  215. };
  216. };
  217. soc@01c00000 {
  218. compatible = "simple-bus";
  219. #address-cells = <1>;
  220. #size-cells = <1>;
  221. ranges;
  222. dma: dma-controller@01c02000 {
  223. compatible = "allwinner,sun8i-a23-dma";
  224. reg = <0x01c02000 0x1000>;
  225. interrupts = <0 50 4>;
  226. clocks = <&ahb1_gates 6>;
  227. resets = <&ahb1_rst 6>;
  228. #dma-cells = <1>;
  229. };
  230. mmc0: mmc@01c0f000 {
  231. compatible = "allwinner,sun5i-a13-mmc";
  232. reg = <0x01c0f000 0x1000>;
  233. clocks = <&ahb1_gates 8>, <&mmc0_clk>;
  234. clock-names = "ahb", "mmc";
  235. resets = <&ahb1_rst 8>;
  236. reset-names = "ahb";
  237. interrupts = <0 60 4>;
  238. status = "disabled";
  239. };
  240. mmc1: mmc@01c10000 {
  241. compatible = "allwinner,sun5i-a13-mmc";
  242. reg = <0x01c10000 0x1000>;
  243. clocks = <&ahb1_gates 9>, <&mmc1_clk>;
  244. clock-names = "ahb", "mmc";
  245. resets = <&ahb1_rst 9>;
  246. reset-names = "ahb";
  247. interrupts = <0 61 4>;
  248. status = "disabled";
  249. };
  250. mmc2: mmc@01c11000 {
  251. compatible = "allwinner,sun5i-a13-mmc";
  252. reg = <0x01c11000 0x1000>;
  253. clocks = <&ahb1_gates 10>, <&mmc2_clk>;
  254. clock-names = "ahb", "mmc";
  255. resets = <&ahb1_rst 10>;
  256. reset-names = "ahb";
  257. interrupts = <0 62 4>;
  258. status = "disabled";
  259. };
  260. pio: pinctrl@01c20800 {
  261. compatible = "allwinner,sun8i-a23-pinctrl";
  262. reg = <0x01c20800 0x400>;
  263. interrupts = <0 11 4>,
  264. <0 15 4>,
  265. <0 17 4>;
  266. clocks = <&apb1_gates 5>;
  267. gpio-controller;
  268. interrupt-controller;
  269. #address-cells = <1>;
  270. #size-cells = <0>;
  271. #gpio-cells = <3>;
  272. uart0_pins_a: uart0@0 {
  273. allwinner,pins = "PF2", "PF4";
  274. allwinner,function = "uart0";
  275. allwinner,drive = <0>;
  276. allwinner,pull = <0>;
  277. };
  278. mmc0_pins_a: mmc0@0 {
  279. allwinner,pins = "PF0","PF1","PF2","PF3","PF4","PF5";
  280. allwinner,function = "mmc0";
  281. allwinner,drive = <2>;
  282. allwinner,pull = <0>;
  283. };
  284. mmc1_pins_a: mmc1@0 {
  285. allwinner,pins = "PG0","PG1","PG2","PG3","PG4","PG5";
  286. allwinner,function = "mmc1";
  287. allwinner,drive = <2>;
  288. allwinner,pull = <0>;
  289. };
  290. i2c0_pins_a: i2c0@0 {
  291. allwinner,pins = "PH2", "PH3";
  292. allwinner,function = "i2c0";
  293. allwinner,drive = <0>;
  294. allwinner,pull = <0>;
  295. };
  296. i2c1_pins_a: i2c1@0 {
  297. allwinner,pins = "PH4", "PH5";
  298. allwinner,function = "i2c1";
  299. allwinner,drive = <0>;
  300. allwinner,pull = <0>;
  301. };
  302. i2c2_pins_a: i2c2@0 {
  303. allwinner,pins = "PE12", "PE13";
  304. allwinner,function = "i2c2";
  305. allwinner,drive = <0>;
  306. allwinner,pull = <0>;
  307. };
  308. };
  309. ahb1_rst: reset@01c202c0 {
  310. #reset-cells = <1>;
  311. compatible = "allwinner,sun6i-a31-clock-reset";
  312. reg = <0x01c202c0 0xc>;
  313. };
  314. apb1_rst: reset@01c202d0 {
  315. #reset-cells = <1>;
  316. compatible = "allwinner,sun6i-a31-clock-reset";
  317. reg = <0x01c202d0 0x4>;
  318. };
  319. apb2_rst: reset@01c202d8 {
  320. #reset-cells = <1>;
  321. compatible = "allwinner,sun6i-a31-clock-reset";
  322. reg = <0x01c202d8 0x4>;
  323. };
  324. timer@01c20c00 {
  325. compatible = "allwinner,sun4i-a10-timer";
  326. reg = <0x01c20c00 0xa0>;
  327. interrupts = <0 18 4>,
  328. <0 19 4>;
  329. clocks = <&osc24M>;
  330. };
  331. wdt0: watchdog@01c20ca0 {
  332. compatible = "allwinner,sun6i-a31-wdt";
  333. reg = <0x01c20ca0 0x20>;
  334. interrupts = <0 25 4>;
  335. };
  336. uart0: serial@01c28000 {
  337. compatible = "snps,dw-apb-uart";
  338. reg = <0x01c28000 0x400>;
  339. interrupts = <0 0 4>;
  340. reg-shift = <2>;
  341. reg-io-width = <4>;
  342. clocks = <&apb2_gates 16>;
  343. resets = <&apb2_rst 16>;
  344. dmas = <&dma 6>, <&dma 6>;
  345. dma-names = "rx", "tx";
  346. status = "disabled";
  347. };
  348. uart1: serial@01c28400 {
  349. compatible = "snps,dw-apb-uart";
  350. reg = <0x01c28400 0x400>;
  351. interrupts = <0 1 4>;
  352. reg-shift = <2>;
  353. reg-io-width = <4>;
  354. clocks = <&apb2_gates 17>;
  355. resets = <&apb2_rst 17>;
  356. dmas = <&dma 7>, <&dma 7>;
  357. dma-names = "rx", "tx";
  358. status = "disabled";
  359. };
  360. uart2: serial@01c28800 {
  361. compatible = "snps,dw-apb-uart";
  362. reg = <0x01c28800 0x400>;
  363. interrupts = <0 2 4>;
  364. reg-shift = <2>;
  365. reg-io-width = <4>;
  366. clocks = <&apb2_gates 18>;
  367. resets = <&apb2_rst 18>;
  368. dmas = <&dma 8>, <&dma 8>;
  369. dma-names = "rx", "tx";
  370. status = "disabled";
  371. };
  372. uart3: serial@01c28c00 {
  373. compatible = "snps,dw-apb-uart";
  374. reg = <0x01c28c00 0x400>;
  375. interrupts = <0 3 4>;
  376. reg-shift = <2>;
  377. reg-io-width = <4>;
  378. clocks = <&apb2_gates 19>;
  379. resets = <&apb2_rst 19>;
  380. dmas = <&dma 9>, <&dma 9>;
  381. dma-names = "rx", "tx";
  382. status = "disabled";
  383. };
  384. uart4: serial@01c29000 {
  385. compatible = "snps,dw-apb-uart";
  386. reg = <0x01c29000 0x400>;
  387. interrupts = <0 4 4>;
  388. reg-shift = <2>;
  389. reg-io-width = <4>;
  390. clocks = <&apb2_gates 20>;
  391. resets = <&apb2_rst 20>;
  392. dmas = <&dma 10>, <&dma 10>;
  393. dma-names = "rx", "tx";
  394. status = "disabled";
  395. };
  396. i2c0: i2c@01c2ac00 {
  397. compatible = "allwinner,sun6i-a31-i2c";
  398. reg = <0x01c2ac00 0x400>;
  399. interrupts = <0 6 4>;
  400. clocks = <&apb2_gates 0>;
  401. resets = <&apb2_rst 0>;
  402. status = "disabled";
  403. #address-cells = <1>;
  404. #size-cells = <0>;
  405. };
  406. i2c1: i2c@01c2b000 {
  407. compatible = "allwinner,sun6i-a31-i2c";
  408. reg = <0x01c2b000 0x400>;
  409. interrupts = <0 7 4>;
  410. clocks = <&apb2_gates 1>;
  411. resets = <&apb2_rst 1>;
  412. status = "disabled";
  413. #address-cells = <1>;
  414. #size-cells = <0>;
  415. };
  416. i2c2: i2c@01c2b400 {
  417. compatible = "allwinner,sun6i-a31-i2c";
  418. reg = <0x01c2b400 0x400>;
  419. interrupts = <0 8 4>;
  420. clocks = <&apb2_gates 2>;
  421. resets = <&apb2_rst 2>;
  422. status = "disabled";
  423. #address-cells = <1>;
  424. #size-cells = <0>;
  425. };
  426. gic: interrupt-controller@01c81000 {
  427. compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
  428. reg = <0x01c81000 0x1000>,
  429. <0x01c82000 0x1000>,
  430. <0x01c84000 0x2000>,
  431. <0x01c86000 0x2000>;
  432. interrupt-controller;
  433. #interrupt-cells = <3>;
  434. interrupts = <1 9 0xf04>;
  435. };
  436. rtc: rtc@01f00000 {
  437. compatible = "allwinner,sun6i-a31-rtc";
  438. reg = <0x01f00000 0x54>;
  439. interrupts = <0 40 4>, <0 41 4>;
  440. };
  441. prcm@01f01400 {
  442. compatible = "allwinner,sun8i-a23-prcm";
  443. reg = <0x01f01400 0x200>;
  444. ar100: ar100_clk {
  445. compatible = "fixed-factor-clock";
  446. #clock-cells = <0>;
  447. clock-div = <1>;
  448. clock-mult = <1>;
  449. clocks = <&osc24M>;
  450. clock-output-names = "ar100";
  451. };
  452. ahb0: ahb0_clk {
  453. compatible = "fixed-factor-clock";
  454. #clock-cells = <0>;
  455. clock-div = <1>;
  456. clock-mult = <1>;
  457. clocks = <&ar100>;
  458. clock-output-names = "ahb0";
  459. };
  460. apb0: apb0_clk {
  461. compatible = "allwinner,sun8i-a23-apb0-clk";
  462. #clock-cells = <0>;
  463. clocks = <&ahb0>;
  464. clock-output-names = "apb0";
  465. };
  466. apb0_gates: apb0_gates_clk {
  467. compatible = "allwinner,sun8i-a23-apb0-gates-clk";
  468. #clock-cells = <1>;
  469. clocks = <&apb0>;
  470. clock-output-names = "apb0_pio", "apb0_timer",
  471. "apb0_rsb", "apb0_uart",
  472. "apb0_i2c";
  473. };
  474. apb0_rst: apb0_rst {
  475. compatible = "allwinner,sun6i-a31-clock-reset";
  476. #reset-cells = <1>;
  477. };
  478. };
  479. r_uart: serial@01f02800 {
  480. compatible = "snps,dw-apb-uart";
  481. reg = <0x01f02800 0x400>;
  482. interrupts = <0 38 4>;
  483. reg-shift = <2>;
  484. reg-io-width = <4>;
  485. clocks = <&apb0_gates 4>;
  486. resets = <&apb0_rst 4>;
  487. status = "disabled";
  488. };
  489. r_pio: pinctrl@01f02c00 {
  490. compatible = "allwinner,sun8i-a23-r-pinctrl";
  491. reg = <0x01f02c00 0x400>;
  492. interrupts = <0 45 4>;
  493. clocks = <&apb0_gates 0>;
  494. resets = <&apb0_rst 0>;
  495. gpio-controller;
  496. interrupt-controller;
  497. #address-cells = <1>;
  498. #size-cells = <0>;
  499. #gpio-cells = <3>;
  500. r_uart_pins_a: r_uart@0 {
  501. allwinner,pins = "PL2", "PL3";
  502. allwinner,function = "s_uart";
  503. allwinner,drive = <0>;
  504. allwinner,pull = <0>;
  505. };
  506. };
  507. };
  508. };