sun5i.dtsi 15 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609
  1. /*
  2. * Copyright 2012-2015 Maxime Ripard
  3. *
  4. * Maxime Ripard <maxime.ripard@free-electrons.com>
  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. * Or, alternatively,
  22. *
  23. * b) Permission is hereby granted, free of charge, to any person
  24. * obtaining a copy of this software and associated documentation
  25. * files (the "Software"), to deal in the Software without
  26. * restriction, including without limitation the rights to use,
  27. * copy, modify, merge, publish, distribute, sublicense, and/or
  28. * sell copies of the Software, and to permit persons to whom the
  29. * Software is furnished to do so, subject to the following
  30. * conditions:
  31. *
  32. * The above copyright notice and this permission notice shall be
  33. * included in all copies or substantial portions of the Software.
  34. *
  35. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  36. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  37. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  38. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  39. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  40. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  41. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  42. * OTHER DEALINGS IN THE SOFTWARE.
  43. */
  44. #include "skeleton.dtsi"
  45. #include <dt-bindings/dma/sun4i-a10.h>
  46. #include <dt-bindings/pinctrl/sun4i-a10.h>
  47. / {
  48. interrupt-parent = <&intc>;
  49. cpus {
  50. #address-cells = <1>;
  51. #size-cells = <0>;
  52. cpu0: cpu@0 {
  53. device_type = "cpu";
  54. compatible = "arm,cortex-a8";
  55. reg = <0x0>;
  56. clocks = <&cpu>;
  57. };
  58. };
  59. clocks {
  60. #address-cells = <1>;
  61. #size-cells = <1>;
  62. ranges;
  63. /*
  64. * This is a dummy clock, to be used as placeholder on
  65. * other mux clocks when a specific parent clock is not
  66. * yet implemented. It should be dropped when the driver
  67. * is complete.
  68. */
  69. dummy: dummy {
  70. #clock-cells = <0>;
  71. compatible = "fixed-clock";
  72. clock-frequency = <0>;
  73. };
  74. osc24M: clk@01c20050 {
  75. #clock-cells = <0>;
  76. compatible = "allwinner,sun4i-a10-osc-clk";
  77. reg = <0x01c20050 0x4>;
  78. clock-frequency = <24000000>;
  79. clock-output-names = "osc24M";
  80. };
  81. osc32k: clk@0 {
  82. #clock-cells = <0>;
  83. compatible = "fixed-clock";
  84. clock-frequency = <32768>;
  85. clock-output-names = "osc32k";
  86. };
  87. pll1: clk@01c20000 {
  88. #clock-cells = <0>;
  89. compatible = "allwinner,sun4i-a10-pll1-clk";
  90. reg = <0x01c20000 0x4>;
  91. clocks = <&osc24M>;
  92. clock-output-names = "pll1";
  93. };
  94. pll4: clk@01c20018 {
  95. #clock-cells = <0>;
  96. compatible = "allwinner,sun4i-a10-pll1-clk";
  97. reg = <0x01c20018 0x4>;
  98. clocks = <&osc24M>;
  99. clock-output-names = "pll4";
  100. };
  101. pll5: clk@01c20020 {
  102. #clock-cells = <1>;
  103. compatible = "allwinner,sun4i-a10-pll5-clk";
  104. reg = <0x01c20020 0x4>;
  105. clocks = <&osc24M>;
  106. clock-output-names = "pll5_ddr", "pll5_other";
  107. };
  108. pll6: clk@01c20028 {
  109. #clock-cells = <1>;
  110. compatible = "allwinner,sun4i-a10-pll6-clk";
  111. reg = <0x01c20028 0x4>;
  112. clocks = <&osc24M>;
  113. clock-output-names = "pll6_sata", "pll6_other", "pll6";
  114. };
  115. /* dummy is 200M */
  116. cpu: cpu@01c20054 {
  117. #clock-cells = <0>;
  118. compatible = "allwinner,sun4i-a10-cpu-clk";
  119. reg = <0x01c20054 0x4>;
  120. clocks = <&osc32k>, <&osc24M>, <&pll1>, <&dummy>;
  121. clock-output-names = "cpu";
  122. };
  123. axi: axi@01c20054 {
  124. #clock-cells = <0>;
  125. compatible = "allwinner,sun4i-a10-axi-clk";
  126. reg = <0x01c20054 0x4>;
  127. clocks = <&cpu>;
  128. clock-output-names = "axi";
  129. };
  130. ahb: ahb@01c20054 {
  131. #clock-cells = <0>;
  132. compatible = "allwinner,sun5i-a13-ahb-clk";
  133. reg = <0x01c20054 0x4>;
  134. clocks = <&axi>, <&cpu>, <&pll6 1>;
  135. clock-output-names = "ahb";
  136. /*
  137. * Use PLL6 as parent, instead of CPU/AXI
  138. * which has rate changes due to cpufreq
  139. */
  140. assigned-clocks = <&ahb>;
  141. assigned-clock-parents = <&pll6 1>;
  142. };
  143. apb0: apb0@01c20054 {
  144. #clock-cells = <0>;
  145. compatible = "allwinner,sun4i-a10-apb0-clk";
  146. reg = <0x01c20054 0x4>;
  147. clocks = <&ahb>;
  148. clock-output-names = "apb0";
  149. };
  150. apb1: clk@01c20058 {
  151. #clock-cells = <0>;
  152. compatible = "allwinner,sun4i-a10-apb1-clk";
  153. reg = <0x01c20058 0x4>;
  154. clocks = <&osc24M>, <&pll6 1>, <&osc32k>;
  155. clock-output-names = "apb1";
  156. };
  157. axi_gates: clk@01c2005c {
  158. #clock-cells = <1>;
  159. compatible = "allwinner,sun4i-a10-axi-gates-clk";
  160. reg = <0x01c2005c 0x4>;
  161. clocks = <&axi>;
  162. clock-output-names = "axi_dram";
  163. };
  164. nand_clk: clk@01c20080 {
  165. #clock-cells = <0>;
  166. compatible = "allwinner,sun4i-a10-mod0-clk";
  167. reg = <0x01c20080 0x4>;
  168. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  169. clock-output-names = "nand";
  170. };
  171. ms_clk: clk@01c20084 {
  172. #clock-cells = <0>;
  173. compatible = "allwinner,sun4i-a10-mod0-clk";
  174. reg = <0x01c20084 0x4>;
  175. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  176. clock-output-names = "ms";
  177. };
  178. mmc0_clk: clk@01c20088 {
  179. #clock-cells = <1>;
  180. compatible = "allwinner,sun4i-a10-mmc-clk";
  181. reg = <0x01c20088 0x4>;
  182. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  183. clock-output-names = "mmc0",
  184. "mmc0_output",
  185. "mmc0_sample";
  186. };
  187. mmc1_clk: clk@01c2008c {
  188. #clock-cells = <1>;
  189. compatible = "allwinner,sun4i-a10-mmc-clk";
  190. reg = <0x01c2008c 0x4>;
  191. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  192. clock-output-names = "mmc1",
  193. "mmc1_output",
  194. "mmc1_sample";
  195. };
  196. mmc2_clk: clk@01c20090 {
  197. #clock-cells = <1>;
  198. compatible = "allwinner,sun4i-a10-mmc-clk";
  199. reg = <0x01c20090 0x4>;
  200. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  201. clock-output-names = "mmc2",
  202. "mmc2_output",
  203. "mmc2_sample";
  204. };
  205. ts_clk: clk@01c20098 {
  206. #clock-cells = <0>;
  207. compatible = "allwinner,sun4i-a10-mod0-clk";
  208. reg = <0x01c20098 0x4>;
  209. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  210. clock-output-names = "ts";
  211. };
  212. ss_clk: clk@01c2009c {
  213. #clock-cells = <0>;
  214. compatible = "allwinner,sun4i-a10-mod0-clk";
  215. reg = <0x01c2009c 0x4>;
  216. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  217. clock-output-names = "ss";
  218. };
  219. spi0_clk: clk@01c200a0 {
  220. #clock-cells = <0>;
  221. compatible = "allwinner,sun4i-a10-mod0-clk";
  222. reg = <0x01c200a0 0x4>;
  223. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  224. clock-output-names = "spi0";
  225. };
  226. spi1_clk: clk@01c200a4 {
  227. #clock-cells = <0>;
  228. compatible = "allwinner,sun4i-a10-mod0-clk";
  229. reg = <0x01c200a4 0x4>;
  230. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  231. clock-output-names = "spi1";
  232. };
  233. spi2_clk: clk@01c200a8 {
  234. #clock-cells = <0>;
  235. compatible = "allwinner,sun4i-a10-mod0-clk";
  236. reg = <0x01c200a8 0x4>;
  237. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  238. clock-output-names = "spi2";
  239. };
  240. ir0_clk: clk@01c200b0 {
  241. #clock-cells = <0>;
  242. compatible = "allwinner,sun4i-a10-mod0-clk";
  243. reg = <0x01c200b0 0x4>;
  244. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  245. clock-output-names = "ir0";
  246. };
  247. usb_clk: clk@01c200cc {
  248. #clock-cells = <1>;
  249. #reset-cells = <1>;
  250. compatible = "allwinner,sun5i-a13-usb-clk";
  251. reg = <0x01c200cc 0x4>;
  252. clocks = <&pll6 1>;
  253. clock-output-names = "usb_ohci0", "usb_phy";
  254. };
  255. mbus_clk: clk@01c2015c {
  256. #clock-cells = <0>;
  257. compatible = "allwinner,sun5i-a13-mbus-clk";
  258. reg = <0x01c2015c 0x4>;
  259. clocks = <&osc24M>, <&pll6 1>, <&pll5 1>;
  260. clock-output-names = "mbus";
  261. };
  262. };
  263. soc@01c00000 {
  264. compatible = "simple-bus";
  265. #address-cells = <1>;
  266. #size-cells = <1>;
  267. ranges;
  268. sram-controller@01c00000 {
  269. compatible = "allwinner,sun4i-a10-sram-controller";
  270. reg = <0x01c00000 0x30>;
  271. #address-cells = <1>;
  272. #size-cells = <1>;
  273. ranges;
  274. sram_a: sram@00000000 {
  275. compatible = "mmio-sram";
  276. reg = <0x00000000 0xc000>;
  277. #address-cells = <1>;
  278. #size-cells = <1>;
  279. ranges = <0 0x00000000 0xc000>;
  280. };
  281. sram_d: sram@00010000 {
  282. compatible = "mmio-sram";
  283. reg = <0x00010000 0x1000>;
  284. #address-cells = <1>;
  285. #size-cells = <1>;
  286. ranges = <0 0x00010000 0x1000>;
  287. otg_sram: sram-section@0000 {
  288. compatible = "allwinner,sun4i-a10-sram-d";
  289. reg = <0x0000 0x1000>;
  290. status = "disabled";
  291. };
  292. };
  293. };
  294. dma: dma-controller@01c02000 {
  295. compatible = "allwinner,sun4i-a10-dma";
  296. reg = <0x01c02000 0x1000>;
  297. interrupts = <27>;
  298. clocks = <&ahb_gates 6>;
  299. #dma-cells = <2>;
  300. };
  301. spi0: spi@01c05000 {
  302. compatible = "allwinner,sun4i-a10-spi";
  303. reg = <0x01c05000 0x1000>;
  304. interrupts = <10>;
  305. clocks = <&ahb_gates 20>, <&spi0_clk>;
  306. clock-names = "ahb", "mod";
  307. dmas = <&dma SUN4I_DMA_DEDICATED 27>,
  308. <&dma SUN4I_DMA_DEDICATED 26>;
  309. dma-names = "rx", "tx";
  310. status = "disabled";
  311. #address-cells = <1>;
  312. #size-cells = <0>;
  313. };
  314. spi1: spi@01c06000 {
  315. compatible = "allwinner,sun4i-a10-spi";
  316. reg = <0x01c06000 0x1000>;
  317. interrupts = <11>;
  318. clocks = <&ahb_gates 21>, <&spi1_clk>;
  319. clock-names = "ahb", "mod";
  320. dmas = <&dma SUN4I_DMA_DEDICATED 9>,
  321. <&dma SUN4I_DMA_DEDICATED 8>;
  322. dma-names = "rx", "tx";
  323. status = "disabled";
  324. #address-cells = <1>;
  325. #size-cells = <0>;
  326. };
  327. mmc0: mmc@01c0f000 {
  328. compatible = "allwinner,sun5i-a13-mmc";
  329. reg = <0x01c0f000 0x1000>;
  330. clocks = <&ahb_gates 8>,
  331. <&mmc0_clk 0>,
  332. <&mmc0_clk 1>,
  333. <&mmc0_clk 2>;
  334. clock-names = "ahb",
  335. "mmc",
  336. "output",
  337. "sample";
  338. interrupts = <32>;
  339. status = "disabled";
  340. #address-cells = <1>;
  341. #size-cells = <0>;
  342. };
  343. mmc1: mmc@01c10000 {
  344. compatible = "allwinner,sun5i-a13-mmc";
  345. reg = <0x01c10000 0x1000>;
  346. clocks = <&ahb_gates 9>,
  347. <&mmc1_clk 0>,
  348. <&mmc1_clk 1>,
  349. <&mmc1_clk 2>;
  350. clock-names = "ahb",
  351. "mmc",
  352. "output",
  353. "sample";
  354. interrupts = <33>;
  355. status = "disabled";
  356. #address-cells = <1>;
  357. #size-cells = <0>;
  358. };
  359. mmc2: mmc@01c11000 {
  360. compatible = "allwinner,sun5i-a13-mmc";
  361. reg = <0x01c11000 0x1000>;
  362. clocks = <&ahb_gates 10>,
  363. <&mmc2_clk 0>,
  364. <&mmc2_clk 1>,
  365. <&mmc2_clk 2>;
  366. clock-names = "ahb",
  367. "mmc",
  368. "output",
  369. "sample";
  370. interrupts = <34>;
  371. status = "disabled";
  372. #address-cells = <1>;
  373. #size-cells = <0>;
  374. };
  375. usbphy: phy@01c13400 {
  376. #phy-cells = <1>;
  377. compatible = "allwinner,sun5i-a13-usb-phy";
  378. reg = <0x01c13400 0x10 0x01c14800 0x4>;
  379. reg-names = "phy_ctrl", "pmu1";
  380. clocks = <&usb_clk 8>;
  381. clock-names = "usb_phy";
  382. resets = <&usb_clk 0>, <&usb_clk 1>;
  383. reset-names = "usb0_reset", "usb1_reset";
  384. status = "disabled";
  385. };
  386. ehci0: usb@01c14000 {
  387. compatible = "allwinner,sun5i-a13-ehci", "generic-ehci";
  388. reg = <0x01c14000 0x100>;
  389. interrupts = <39>;
  390. clocks = <&ahb_gates 1>;
  391. phys = <&usbphy 1>;
  392. phy-names = "usb";
  393. status = "disabled";
  394. };
  395. ohci0: usb@01c14400 {
  396. compatible = "allwinner,sun5i-a13-ohci", "generic-ohci";
  397. reg = <0x01c14400 0x100>;
  398. interrupts = <40>;
  399. clocks = <&usb_clk 6>, <&ahb_gates 2>;
  400. phys = <&usbphy 1>;
  401. phy-names = "usb";
  402. status = "disabled";
  403. };
  404. spi2: spi@01c17000 {
  405. compatible = "allwinner,sun4i-a10-spi";
  406. reg = <0x01c17000 0x1000>;
  407. interrupts = <12>;
  408. clocks = <&ahb_gates 22>, <&spi2_clk>;
  409. clock-names = "ahb", "mod";
  410. dmas = <&dma SUN4I_DMA_DEDICATED 29>,
  411. <&dma SUN4I_DMA_DEDICATED 28>;
  412. dma-names = "rx", "tx";
  413. status = "disabled";
  414. #address-cells = <1>;
  415. #size-cells = <0>;
  416. };
  417. intc: interrupt-controller@01c20400 {
  418. compatible = "allwinner,sun4i-a10-ic";
  419. reg = <0x01c20400 0x400>;
  420. interrupt-controller;
  421. #interrupt-cells = <1>;
  422. };
  423. pio: pinctrl@01c20800 {
  424. reg = <0x01c20800 0x400>;
  425. interrupts = <28>;
  426. clocks = <&apb0_gates 5>;
  427. gpio-controller;
  428. interrupt-controller;
  429. #interrupt-cells = <2>;
  430. #size-cells = <0>;
  431. #gpio-cells = <3>;
  432. i2c0_pins_a: i2c0@0 {
  433. allwinner,pins = "PB0", "PB1";
  434. allwinner,function = "i2c0";
  435. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  436. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  437. };
  438. i2c1_pins_a: i2c1@0 {
  439. allwinner,pins = "PB15", "PB16";
  440. allwinner,function = "i2c1";
  441. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  442. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  443. };
  444. i2c2_pins_a: i2c2@0 {
  445. allwinner,pins = "PB17", "PB18";
  446. allwinner,function = "i2c2";
  447. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  448. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  449. };
  450. mmc0_pins_a: mmc0@0 {
  451. allwinner,pins = "PF0", "PF1", "PF2", "PF3",
  452. "PF4", "PF5";
  453. allwinner,function = "mmc0";
  454. allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  455. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  456. };
  457. mmc2_pins_a: mmc2@0 {
  458. allwinner,pins = "PC6", "PC7", "PC8", "PC9",
  459. "PC10", "PC11", "PC12", "PC13",
  460. "PC14", "PC15";
  461. allwinner,function = "mmc2";
  462. allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  463. allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  464. };
  465. };
  466. timer@01c20c00 {
  467. compatible = "allwinner,sun4i-a10-timer";
  468. reg = <0x01c20c00 0x90>;
  469. interrupts = <22>;
  470. clocks = <&osc24M>;
  471. };
  472. wdt: watchdog@01c20c90 {
  473. compatible = "allwinner,sun4i-a10-wdt";
  474. reg = <0x01c20c90 0x10>;
  475. };
  476. lradc: lradc@01c22800 {
  477. compatible = "allwinner,sun4i-a10-lradc-keys";
  478. reg = <0x01c22800 0x100>;
  479. interrupts = <31>;
  480. status = "disabled";
  481. };
  482. sid: eeprom@01c23800 {
  483. compatible = "allwinner,sun4i-a10-sid";
  484. reg = <0x01c23800 0x10>;
  485. };
  486. rtp: rtp@01c25000 {
  487. compatible = "allwinner,sun5i-a13-ts";
  488. reg = <0x01c25000 0x100>;
  489. interrupts = <29>;
  490. #thermal-sensor-cells = <0>;
  491. };
  492. uart1: serial@01c28400 {
  493. compatible = "snps,dw-apb-uart";
  494. reg = <0x01c28400 0x400>;
  495. interrupts = <2>;
  496. reg-shift = <2>;
  497. reg-io-width = <4>;
  498. clocks = <&apb1_gates 17>;
  499. status = "disabled";
  500. };
  501. uart3: serial@01c28c00 {
  502. compatible = "snps,dw-apb-uart";
  503. reg = <0x01c28c00 0x400>;
  504. interrupts = <4>;
  505. reg-shift = <2>;
  506. reg-io-width = <4>;
  507. clocks = <&apb1_gates 19>;
  508. status = "disabled";
  509. };
  510. i2c0: i2c@01c2ac00 {
  511. compatible = "allwinner,sun4i-a10-i2c";
  512. reg = <0x01c2ac00 0x400>;
  513. interrupts = <7>;
  514. clocks = <&apb1_gates 0>;
  515. status = "disabled";
  516. #address-cells = <1>;
  517. #size-cells = <0>;
  518. };
  519. i2c1: i2c@01c2b000 {
  520. compatible = "allwinner,sun4i-a10-i2c";
  521. reg = <0x01c2b000 0x400>;
  522. interrupts = <8>;
  523. clocks = <&apb1_gates 1>;
  524. status = "disabled";
  525. #address-cells = <1>;
  526. #size-cells = <0>;
  527. };
  528. i2c2: i2c@01c2b400 {
  529. compatible = "allwinner,sun4i-a10-i2c";
  530. reg = <0x01c2b400 0x400>;
  531. interrupts = <9>;
  532. clocks = <&apb1_gates 2>;
  533. status = "disabled";
  534. #address-cells = <1>;
  535. #size-cells = <0>;
  536. };
  537. timer@01c60000 {
  538. compatible = "allwinner,sun5i-a13-hstimer";
  539. reg = <0x01c60000 0x1000>;
  540. interrupts = <82>, <83>;
  541. clocks = <&ahb_gates 28>;
  542. };
  543. };
  544. };