rk3188.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497
  1. /*
  2. * Copyright (c) 2013 MundoReader S.L.
  3. * Author: Heiko Stuebner <heiko@sntech.de>
  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 as published by
  7. * the Free Software Foundation; either version 2 of the License, or
  8. * (at your option) any later version.
  9. *
  10. * This program is distributed in the hope that it will be useful,
  11. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  12. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  13. * GNU General Public License for more details.
  14. */
  15. #include <dt-bindings/gpio/gpio.h>
  16. #include <dt-bindings/pinctrl/rockchip.h>
  17. #include <dt-bindings/clock/rk3188-cru.h>
  18. #include "rk3xxx.dtsi"
  19. / {
  20. compatible = "rockchip,rk3188";
  21. cpus {
  22. #address-cells = <1>;
  23. #size-cells = <0>;
  24. enable-method = "rockchip,rk3066-smp";
  25. cpu@0 {
  26. device_type = "cpu";
  27. compatible = "arm,cortex-a9";
  28. next-level-cache = <&L2>;
  29. reg = <0x0>;
  30. };
  31. cpu@1 {
  32. device_type = "cpu";
  33. compatible = "arm,cortex-a9";
  34. next-level-cache = <&L2>;
  35. reg = <0x1>;
  36. };
  37. cpu@2 {
  38. device_type = "cpu";
  39. compatible = "arm,cortex-a9";
  40. next-level-cache = <&L2>;
  41. reg = <0x2>;
  42. };
  43. cpu@3 {
  44. device_type = "cpu";
  45. compatible = "arm,cortex-a9";
  46. next-level-cache = <&L2>;
  47. reg = <0x3>;
  48. };
  49. };
  50. sram: sram@10080000 {
  51. compatible = "mmio-sram";
  52. reg = <0x10080000 0x8000>;
  53. #address-cells = <1>;
  54. #size-cells = <1>;
  55. ranges = <0 0x10080000 0x8000>;
  56. smp-sram@0 {
  57. compatible = "rockchip,rk3066-smp-sram";
  58. reg = <0x0 0x50>;
  59. };
  60. };
  61. cru: clock-controller@20000000 {
  62. compatible = "rockchip,rk3188-cru";
  63. reg = <0x20000000 0x1000>;
  64. rockchip,grf = <&grf>;
  65. #clock-cells = <1>;
  66. #reset-cells = <1>;
  67. };
  68. pinctrl: pinctrl {
  69. compatible = "rockchip,rk3188-pinctrl";
  70. rockchip,grf = <&grf>;
  71. rockchip,pmu = <&pmu>;
  72. #address-cells = <1>;
  73. #size-cells = <1>;
  74. ranges;
  75. gpio0: gpio0@0x2000a000 {
  76. compatible = "rockchip,rk3188-gpio-bank0";
  77. reg = <0x2000a000 0x100>;
  78. interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
  79. clocks = <&cru PCLK_GPIO0>;
  80. gpio-controller;
  81. #gpio-cells = <2>;
  82. interrupt-controller;
  83. #interrupt-cells = <2>;
  84. };
  85. gpio1: gpio1@0x2003c000 {
  86. compatible = "rockchip,gpio-bank";
  87. reg = <0x2003c000 0x100>;
  88. interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
  89. clocks = <&cru PCLK_GPIO1>;
  90. gpio-controller;
  91. #gpio-cells = <2>;
  92. interrupt-controller;
  93. #interrupt-cells = <2>;
  94. };
  95. gpio2: gpio2@2003e000 {
  96. compatible = "rockchip,gpio-bank";
  97. reg = <0x2003e000 0x100>;
  98. interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
  99. clocks = <&cru PCLK_GPIO2>;
  100. gpio-controller;
  101. #gpio-cells = <2>;
  102. interrupt-controller;
  103. #interrupt-cells = <2>;
  104. };
  105. gpio3: gpio3@20080000 {
  106. compatible = "rockchip,gpio-bank";
  107. reg = <0x20080000 0x100>;
  108. interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
  109. clocks = <&cru PCLK_GPIO3>;
  110. gpio-controller;
  111. #gpio-cells = <2>;
  112. interrupt-controller;
  113. #interrupt-cells = <2>;
  114. };
  115. pcfg_pull_up: pcfg_pull_up {
  116. bias-pull-up;
  117. };
  118. pcfg_pull_down: pcfg_pull_down {
  119. bias-pull-down;
  120. };
  121. pcfg_pull_none: pcfg_pull_none {
  122. bias-disable;
  123. };
  124. emmc {
  125. emmc_clk: emmc-clk {
  126. rockchip,pins = <RK_GPIO0 24 RK_FUNC_2 &pcfg_pull_none>;
  127. };
  128. emmc_cmd: emmc-cmd {
  129. rockchip,pins = <RK_GPIO0 26 RK_FUNC_2 &pcfg_pull_up>;
  130. };
  131. emmc_rst: emmc-rst {
  132. rockchip,pins = <RK_GPIO0 27 RK_FUNC_2 &pcfg_pull_none>;
  133. };
  134. /*
  135. * The data pins are shared between nandc and emmc and
  136. * not accessible through pinctrl. Also they should've
  137. * been already set correctly by firmware, as
  138. * flash/emmc is the boot-device.
  139. */
  140. };
  141. emac {
  142. emac_xfer: emac-xfer {
  143. rockchip,pins = <RK_GPIO3 16 RK_FUNC_2 &pcfg_pull_none>, /* tx_en */
  144. <RK_GPIO3 17 RK_FUNC_2 &pcfg_pull_none>, /* txd1 */
  145. <RK_GPIO3 18 RK_FUNC_2 &pcfg_pull_none>, /* txd0 */
  146. <RK_GPIO3 19 RK_FUNC_2 &pcfg_pull_none>, /* rxd0 */
  147. <RK_GPIO3 20 RK_FUNC_2 &pcfg_pull_none>, /* rxd1 */
  148. <RK_GPIO3 21 RK_FUNC_2 &pcfg_pull_none>, /* mac_clk */
  149. <RK_GPIO3 22 RK_FUNC_2 &pcfg_pull_none>, /* rx_err */
  150. <RK_GPIO3 23 RK_FUNC_2 &pcfg_pull_none>; /* crs_dvalid */
  151. };
  152. emac_mdio: emac-mdio {
  153. rockchip,pins = <RK_GPIO3 24 RK_FUNC_2 &pcfg_pull_none>,
  154. <RK_GPIO3 25 RK_FUNC_2 &pcfg_pull_none>;
  155. };
  156. };
  157. i2c0 {
  158. i2c0_xfer: i2c0-xfer {
  159. rockchip,pins = <RK_GPIO1 24 RK_FUNC_1 &pcfg_pull_none>,
  160. <RK_GPIO1 25 RK_FUNC_1 &pcfg_pull_none>;
  161. };
  162. };
  163. i2c1 {
  164. i2c1_xfer: i2c1-xfer {
  165. rockchip,pins = <RK_GPIO1 26 RK_FUNC_1 &pcfg_pull_none>,
  166. <RK_GPIO1 27 RK_FUNC_1 &pcfg_pull_none>;
  167. };
  168. };
  169. i2c2 {
  170. i2c2_xfer: i2c2-xfer {
  171. rockchip,pins = <RK_GPIO1 28 RK_FUNC_1 &pcfg_pull_none>,
  172. <RK_GPIO1 29 RK_FUNC_1 &pcfg_pull_none>;
  173. };
  174. };
  175. i2c3 {
  176. i2c3_xfer: i2c3-xfer {
  177. rockchip,pins = <RK_GPIO3 14 RK_FUNC_2 &pcfg_pull_none>,
  178. <RK_GPIO3 15 RK_FUNC_2 &pcfg_pull_none>;
  179. };
  180. };
  181. i2c4 {
  182. i2c4_xfer: i2c4-xfer {
  183. rockchip,pins = <RK_GPIO1 30 RK_FUNC_1 &pcfg_pull_none>,
  184. <RK_GPIO1 31 RK_FUNC_1 &pcfg_pull_none>;
  185. };
  186. };
  187. pwm0 {
  188. pwm0_out: pwm0-out {
  189. rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_none>;
  190. };
  191. };
  192. pwm1 {
  193. pwm1_out: pwm1-out {
  194. rockchip,pins = <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_none>;
  195. };
  196. };
  197. pwm2 {
  198. pwm2_out: pwm2-out {
  199. rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_none>;
  200. };
  201. };
  202. pwm3 {
  203. pwm3_out: pwm3-out {
  204. rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_none>;
  205. };
  206. };
  207. spi0 {
  208. spi0_clk: spi0-clk {
  209. rockchip,pins = <RK_GPIO1 6 RK_FUNC_2 &pcfg_pull_up>;
  210. };
  211. spi0_cs0: spi0-cs0 {
  212. rockchip,pins = <RK_GPIO1 7 RK_FUNC_2 &pcfg_pull_up>;
  213. };
  214. spi0_tx: spi0-tx {
  215. rockchip,pins = <RK_GPIO1 5 RK_FUNC_2 &pcfg_pull_up>;
  216. };
  217. spi0_rx: spi0-rx {
  218. rockchip,pins = <RK_GPIO1 4 RK_FUNC_2 &pcfg_pull_up>;
  219. };
  220. spi0_cs1: spi0-cs1 {
  221. rockchip,pins = <RK_GPIO1 15 RK_FUNC_1 &pcfg_pull_up>;
  222. };
  223. };
  224. spi1 {
  225. spi1_clk: spi1-clk {
  226. rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_up>;
  227. };
  228. spi1_cs0: spi1-cs0 {
  229. rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_up>;
  230. };
  231. spi1_rx: spi1-rx {
  232. rockchip,pins = <RK_GPIO0 28 RK_FUNC_1 &pcfg_pull_up>;
  233. };
  234. spi1_tx: spi1-tx {
  235. rockchip,pins = <RK_GPIO0 29 RK_FUNC_1 &pcfg_pull_up>;
  236. };
  237. spi1_cs1: spi1-cs1 {
  238. rockchip,pins = <RK_GPIO1 14 RK_FUNC_2 &pcfg_pull_up>;
  239. };
  240. };
  241. uart0 {
  242. uart0_xfer: uart0-xfer {
  243. rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_up>,
  244. <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_none>;
  245. };
  246. uart0_cts: uart0-cts {
  247. rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_none>;
  248. };
  249. uart0_rts: uart0-rts {
  250. rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_none>;
  251. };
  252. };
  253. uart1 {
  254. uart1_xfer: uart1-xfer {
  255. rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_up>,
  256. <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_none>;
  257. };
  258. uart1_cts: uart1-cts {
  259. rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_none>;
  260. };
  261. uart1_rts: uart1-rts {
  262. rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_none>;
  263. };
  264. };
  265. uart2 {
  266. uart2_xfer: uart2-xfer {
  267. rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_up>,
  268. <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_none>;
  269. };
  270. /* no rts / cts for uart2 */
  271. };
  272. uart3 {
  273. uart3_xfer: uart3-xfer {
  274. rockchip,pins = <RK_GPIO1 10 RK_FUNC_1 &pcfg_pull_up>,
  275. <RK_GPIO1 11 RK_FUNC_1 &pcfg_pull_none>;
  276. };
  277. uart3_cts: uart3-cts {
  278. rockchip,pins = <RK_GPIO1 12 RK_FUNC_1 &pcfg_pull_none>;
  279. };
  280. uart3_rts: uart3-rts {
  281. rockchip,pins = <RK_GPIO1 13 RK_FUNC_1 &pcfg_pull_none>;
  282. };
  283. };
  284. sd0 {
  285. sd0_clk: sd0-clk {
  286. rockchip,pins = <RK_GPIO3 2 RK_FUNC_1 &pcfg_pull_none>;
  287. };
  288. sd0_cmd: sd0-cmd {
  289. rockchip,pins = <RK_GPIO3 3 RK_FUNC_1 &pcfg_pull_none>;
  290. };
  291. sd0_cd: sd0-cd {
  292. rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_none>;
  293. };
  294. sd0_wp: sd0-wp {
  295. rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_none>;
  296. };
  297. sd0_pwr: sd0-pwr {
  298. rockchip,pins = <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
  299. };
  300. sd0_bus1: sd0-bus-width1 {
  301. rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>;
  302. };
  303. sd0_bus4: sd0-bus-width4 {
  304. rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
  305. <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>,
  306. <RK_GPIO3 6 RK_FUNC_1 &pcfg_pull_none>,
  307. <RK_GPIO3 7 RK_FUNC_1 &pcfg_pull_none>;
  308. };
  309. };
  310. sd1 {
  311. sd1_clk: sd1-clk {
  312. rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_none>;
  313. };
  314. sd1_cmd: sd1-cmd {
  315. rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_none>;
  316. };
  317. sd1_cd: sd1-cd {
  318. rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_none>;
  319. };
  320. sd1_wp: sd1-wp {
  321. rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_none>;
  322. };
  323. sd1_bus1: sd1-bus-width1 {
  324. rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>;
  325. };
  326. sd1_bus4: sd1-bus-width4 {
  327. rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_none>,
  328. <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_none>,
  329. <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_none>,
  330. <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_none>;
  331. };
  332. };
  333. };
  334. };
  335. &emac {
  336. compatible = "rockchip,rk3188-emac";
  337. };
  338. &global_timer {
  339. interrupts = <GIC_PPI 11 0xf04>;
  340. };
  341. &local_timer {
  342. interrupts = <GIC_PPI 13 0xf04>;
  343. };
  344. &i2c0 {
  345. compatible = "rockchip,rk3188-i2c";
  346. pinctrl-names = "default";
  347. pinctrl-0 = <&i2c0_xfer>;
  348. };
  349. &i2c1 {
  350. compatible = "rockchip,rk3188-i2c";
  351. pinctrl-names = "default";
  352. pinctrl-0 = <&i2c1_xfer>;
  353. };
  354. &i2c2 {
  355. compatible = "rockchip,rk3188-i2c";
  356. pinctrl-names = "default";
  357. pinctrl-0 = <&i2c2_xfer>;
  358. };
  359. &i2c3 {
  360. compatible = "rockchip,rk3188-i2c";
  361. pinctrl-names = "default";
  362. pinctrl-0 = <&i2c3_xfer>;
  363. };
  364. &i2c4 {
  365. compatible = "rockchip,rk3188-i2c";
  366. pinctrl-names = "default";
  367. pinctrl-0 = <&i2c4_xfer>;
  368. };
  369. &pwm0 {
  370. pinctrl-names = "default";
  371. pinctrl-0 = <&pwm0_out>;
  372. };
  373. &pwm1 {
  374. pinctrl-names = "default";
  375. pinctrl-0 = <&pwm1_out>;
  376. };
  377. &pwm2 {
  378. pinctrl-names = "default";
  379. pinctrl-0 = <&pwm2_out>;
  380. };
  381. &pwm3 {
  382. pinctrl-names = "default";
  383. pinctrl-0 = <&pwm3_out>;
  384. };
  385. &spi0 {
  386. compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
  387. pinctrl-names = "default";
  388. pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
  389. };
  390. &spi1 {
  391. compatible = "rockchip,rk3188-spi", "rockchip,rk3066-spi";
  392. pinctrl-names = "default";
  393. pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
  394. };
  395. &uart0 {
  396. pinctrl-names = "default";
  397. pinctrl-0 = <&uart0_xfer>;
  398. };
  399. &uart1 {
  400. pinctrl-names = "default";
  401. pinctrl-0 = <&uart1_xfer>;
  402. };
  403. &uart2 {
  404. pinctrl-names = "default";
  405. pinctrl-0 = <&uart2_xfer>;
  406. };
  407. &uart3 {
  408. pinctrl-names = "default";
  409. pinctrl-0 = <&uart3_xfer>;
  410. };
  411. &wdt {
  412. compatible = "rockchip,rk3188-wdt", "snps,dw-wdt";
  413. };