rk3066a.dtsi 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498
  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/rk3066a-cru.h>
  18. #include "rk3xxx.dtsi"
  19. / {
  20. compatible = "rockchip,rk3066a";
  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. };
  38. sram: sram@10080000 {
  39. compatible = "mmio-sram";
  40. reg = <0x10080000 0x10000>;
  41. #address-cells = <1>;
  42. #size-cells = <1>;
  43. ranges = <0 0x10080000 0x10000>;
  44. smp-sram@0 {
  45. compatible = "rockchip,rk3066-smp-sram";
  46. reg = <0x0 0x50>;
  47. };
  48. };
  49. cru: clock-controller@20000000 {
  50. compatible = "rockchip,rk3066a-cru";
  51. reg = <0x20000000 0x1000>;
  52. rockchip,grf = <&grf>;
  53. #clock-cells = <1>;
  54. #reset-cells = <1>;
  55. };
  56. timer@2000e000 {
  57. compatible = "snps,dw-apb-timer-osc";
  58. reg = <0x2000e000 0x100>;
  59. interrupts = <GIC_SPI 46 IRQ_TYPE_LEVEL_HIGH>;
  60. clocks = <&cru SCLK_TIMER2>, <&cru PCLK_TIMER2>;
  61. clock-names = "timer", "pclk";
  62. };
  63. timer@20038000 {
  64. compatible = "snps,dw-apb-timer-osc";
  65. reg = <0x20038000 0x100>;
  66. interrupts = <GIC_SPI 44 IRQ_TYPE_LEVEL_HIGH>;
  67. clocks = <&cru SCLK_TIMER0>, <&cru PCLK_TIMER0>;
  68. clock-names = "timer", "pclk";
  69. };
  70. timer@2003a000 {
  71. compatible = "snps,dw-apb-timer-osc";
  72. reg = <0x2003a000 0x100>;
  73. interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
  74. clocks = <&cru SCLK_TIMER1>, <&cru PCLK_TIMER1>;
  75. clock-names = "timer", "pclk";
  76. };
  77. pinctrl: pinctrl {
  78. compatible = "rockchip,rk3066a-pinctrl";
  79. rockchip,grf = <&grf>;
  80. #address-cells = <1>;
  81. #size-cells = <1>;
  82. ranges;
  83. gpio0: gpio0@20034000 {
  84. compatible = "rockchip,gpio-bank";
  85. reg = <0x20034000 0x100>;
  86. interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>;
  87. clocks = <&cru PCLK_GPIO0>;
  88. gpio-controller;
  89. #gpio-cells = <2>;
  90. interrupt-controller;
  91. #interrupt-cells = <2>;
  92. };
  93. gpio1: gpio1@2003c000 {
  94. compatible = "rockchip,gpio-bank";
  95. reg = <0x2003c000 0x100>;
  96. interrupts = <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>;
  97. clocks = <&cru PCLK_GPIO1>;
  98. gpio-controller;
  99. #gpio-cells = <2>;
  100. interrupt-controller;
  101. #interrupt-cells = <2>;
  102. };
  103. gpio2: gpio2@2003e000 {
  104. compatible = "rockchip,gpio-bank";
  105. reg = <0x2003e000 0x100>;
  106. interrupts = <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>;
  107. clocks = <&cru PCLK_GPIO2>;
  108. gpio-controller;
  109. #gpio-cells = <2>;
  110. interrupt-controller;
  111. #interrupt-cells = <2>;
  112. };
  113. gpio3: gpio3@20080000 {
  114. compatible = "rockchip,gpio-bank";
  115. reg = <0x20080000 0x100>;
  116. interrupts = <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>;
  117. clocks = <&cru PCLK_GPIO3>;
  118. gpio-controller;
  119. #gpio-cells = <2>;
  120. interrupt-controller;
  121. #interrupt-cells = <2>;
  122. };
  123. gpio4: gpio4@20084000 {
  124. compatible = "rockchip,gpio-bank";
  125. reg = <0x20084000 0x100>;
  126. interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
  127. clocks = <&cru PCLK_GPIO4>;
  128. gpio-controller;
  129. #gpio-cells = <2>;
  130. interrupt-controller;
  131. #interrupt-cells = <2>;
  132. };
  133. gpio6: gpio6@2000a000 {
  134. compatible = "rockchip,gpio-bank";
  135. reg = <0x2000a000 0x100>;
  136. interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
  137. clocks = <&cru PCLK_GPIO6>;
  138. gpio-controller;
  139. #gpio-cells = <2>;
  140. interrupt-controller;
  141. #interrupt-cells = <2>;
  142. };
  143. pcfg_pull_default: pcfg_pull_default {
  144. bias-pull-pin-default;
  145. };
  146. pcfg_pull_none: pcfg_pull_none {
  147. bias-disable;
  148. };
  149. emmc {
  150. emmc_clk: emmc-clk {
  151. rockchip,pins = <RK_GPIO3 31 RK_FUNC_2 &pcfg_pull_default>;
  152. };
  153. emmc_cmd: emmc-cmd {
  154. rockchip,pins = <RK_GPIO4 9 RK_FUNC_2 &pcfg_pull_default>;
  155. };
  156. emmc_rst: emmc-rst {
  157. rockchip,pins = <RK_GPIO4 10 RK_FUNC_2 &pcfg_pull_default>;
  158. };
  159. /*
  160. * The data pins are shared between nandc and emmc and
  161. * not accessible through pinctrl. Also they should've
  162. * been already set correctly by firmware, as
  163. * flash/emmc is the boot-device.
  164. */
  165. };
  166. i2c0 {
  167. i2c0_xfer: i2c0-xfer {
  168. rockchip,pins = <RK_GPIO2 28 RK_FUNC_1 &pcfg_pull_none>,
  169. <RK_GPIO2 29 RK_FUNC_1 &pcfg_pull_none>;
  170. };
  171. };
  172. i2c1 {
  173. i2c1_xfer: i2c1-xfer {
  174. rockchip,pins = <RK_GPIO2 30 RK_FUNC_1 &pcfg_pull_none>,
  175. <RK_GPIO2 31 RK_FUNC_1 &pcfg_pull_none>;
  176. };
  177. };
  178. i2c2 {
  179. i2c2_xfer: i2c2-xfer {
  180. rockchip,pins = <RK_GPIO3 0 RK_FUNC_1 &pcfg_pull_none>,
  181. <RK_GPIO3 1 RK_FUNC_1 &pcfg_pull_none>;
  182. };
  183. };
  184. i2c3 {
  185. i2c3_xfer: i2c3-xfer {
  186. rockchip,pins = <RK_GPIO3 2 RK_FUNC_2 &pcfg_pull_none>,
  187. <RK_GPIO3 3 RK_FUNC_2 &pcfg_pull_none>;
  188. };
  189. };
  190. i2c4 {
  191. i2c4_xfer: i2c4-xfer {
  192. rockchip,pins = <RK_GPIO3 4 RK_FUNC_1 &pcfg_pull_none>,
  193. <RK_GPIO3 5 RK_FUNC_1 &pcfg_pull_none>;
  194. };
  195. };
  196. pwm0 {
  197. pwm0_out: pwm0-out {
  198. rockchip,pins = <RK_GPIO0 3 RK_FUNC_1 &pcfg_pull_none>;
  199. };
  200. };
  201. pwm1 {
  202. pwm1_out: pwm1-out {
  203. rockchip,pins = <RK_GPIO0 4 RK_FUNC_1 &pcfg_pull_none>;
  204. };
  205. };
  206. pwm2 {
  207. pwm2_out: pwm2-out {
  208. rockchip,pins = <RK_GPIO0 30 RK_FUNC_1 &pcfg_pull_none>;
  209. };
  210. };
  211. pwm3 {
  212. pwm3_out: pwm3-out {
  213. rockchip,pins = <RK_GPIO0 31 RK_FUNC_1 &pcfg_pull_none>;
  214. };
  215. };
  216. spi0 {
  217. spi0_clk: spi0-clk {
  218. rockchip,pins = <RK_GPIO1 5 RK_FUNC_2 &pcfg_pull_default>;
  219. };
  220. spi0_cs0: spi0-cs0 {
  221. rockchip,pins = <RK_GPIO1 4 RK_FUNC_2 &pcfg_pull_default>;
  222. };
  223. spi0_tx: spi0-tx {
  224. rockchip,pins = <RK_GPIO1 7 RK_FUNC_2 &pcfg_pull_default>;
  225. };
  226. spi0_rx: spi0-rx {
  227. rockchip,pins = <RK_GPIO1 6 RK_FUNC_2 &pcfg_pull_default>;
  228. };
  229. spi0_cs1: spi0-cs1 {
  230. rockchip,pins = <RK_GPIO4 15 RK_FUNC_1 &pcfg_pull_default>;
  231. };
  232. };
  233. spi1 {
  234. spi1_clk: spi1-clk {
  235. rockchip,pins = <RK_GPIO2 19 RK_FUNC_2 &pcfg_pull_default>;
  236. };
  237. spi1_cs0: spi1-cs0 {
  238. rockchip,pins = <RK_GPIO2 20 RK_FUNC_2 &pcfg_pull_default>;
  239. };
  240. spi1_rx: spi1-rx {
  241. rockchip,pins = <RK_GPIO2 22 RK_FUNC_2 &pcfg_pull_default>;
  242. };
  243. spi1_tx: spi1-tx {
  244. rockchip,pins = <RK_GPIO2 21 RK_FUNC_2 &pcfg_pull_default>;
  245. };
  246. spi1_cs1: spi1-cs1 {
  247. rockchip,pins = <RK_GPIO2 23 RK_FUNC_2 &pcfg_pull_default>;
  248. };
  249. };
  250. uart0 {
  251. uart0_xfer: uart0-xfer {
  252. rockchip,pins = <RK_GPIO1 0 RK_FUNC_1 &pcfg_pull_default>,
  253. <RK_GPIO1 1 RK_FUNC_1 &pcfg_pull_default>;
  254. };
  255. uart0_cts: uart0-cts {
  256. rockchip,pins = <RK_GPIO1 2 RK_FUNC_1 &pcfg_pull_default>;
  257. };
  258. uart0_rts: uart0-rts {
  259. rockchip,pins = <RK_GPIO1 3 RK_FUNC_1 &pcfg_pull_default>;
  260. };
  261. };
  262. uart1 {
  263. uart1_xfer: uart1-xfer {
  264. rockchip,pins = <RK_GPIO1 4 RK_FUNC_1 &pcfg_pull_default>,
  265. <RK_GPIO1 5 RK_FUNC_1 &pcfg_pull_default>;
  266. };
  267. uart1_cts: uart1-cts {
  268. rockchip,pins = <RK_GPIO1 6 RK_FUNC_1 &pcfg_pull_default>;
  269. };
  270. uart1_rts: uart1-rts {
  271. rockchip,pins = <RK_GPIO1 7 RK_FUNC_1 &pcfg_pull_default>;
  272. };
  273. };
  274. uart2 {
  275. uart2_xfer: uart2-xfer {
  276. rockchip,pins = <RK_GPIO1 8 RK_FUNC_1 &pcfg_pull_default>,
  277. <RK_GPIO1 9 RK_FUNC_1 &pcfg_pull_default>;
  278. };
  279. /* no rts / cts for uart2 */
  280. };
  281. uart3 {
  282. uart3_xfer: uart3-xfer {
  283. rockchip,pins = <RK_GPIO3 27 RK_FUNC_1 &pcfg_pull_default>,
  284. <RK_GPIO3 28 RK_FUNC_1 &pcfg_pull_default>;
  285. };
  286. uart3_cts: uart3-cts {
  287. rockchip,pins = <RK_GPIO3 29 RK_FUNC_1 &pcfg_pull_default>;
  288. };
  289. uart3_rts: uart3-rts {
  290. rockchip,pins = <RK_GPIO3 30 RK_FUNC_1 &pcfg_pull_default>;
  291. };
  292. };
  293. sd0 {
  294. sd0_clk: sd0-clk {
  295. rockchip,pins = <RK_GPIO3 8 RK_FUNC_1 &pcfg_pull_default>;
  296. };
  297. sd0_cmd: sd0-cmd {
  298. rockchip,pins = <RK_GPIO3 9 RK_FUNC_1 &pcfg_pull_default>;
  299. };
  300. sd0_cd: sd0-cd {
  301. rockchip,pins = <RK_GPIO3 14 RK_FUNC_1 &pcfg_pull_default>;
  302. };
  303. sd0_wp: sd0-wp {
  304. rockchip,pins = <RK_GPIO3 15 RK_FUNC_1 &pcfg_pull_default>;
  305. };
  306. sd0_bus1: sd0-bus-width1 {
  307. rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>;
  308. };
  309. sd0_bus4: sd0-bus-width4 {
  310. rockchip,pins = <RK_GPIO3 10 RK_FUNC_1 &pcfg_pull_default>,
  311. <RK_GPIO3 11 RK_FUNC_1 &pcfg_pull_default>,
  312. <RK_GPIO3 12 RK_FUNC_1 &pcfg_pull_default>,
  313. <RK_GPIO3 13 RK_FUNC_1 &pcfg_pull_default>;
  314. };
  315. };
  316. sd1 {
  317. sd1_clk: sd1-clk {
  318. rockchip,pins = <RK_GPIO3 21 RK_FUNC_1 &pcfg_pull_default>;
  319. };
  320. sd1_cmd: sd1-cmd {
  321. rockchip,pins = <RK_GPIO3 16 RK_FUNC_1 &pcfg_pull_default>;
  322. };
  323. sd1_cd: sd1-cd {
  324. rockchip,pins = <RK_GPIO3 22 RK_FUNC_1 &pcfg_pull_default>;
  325. };
  326. sd1_wp: sd1-wp {
  327. rockchip,pins = <RK_GPIO3 23 RK_FUNC_1 &pcfg_pull_default>;
  328. };
  329. sd1_bus1: sd1-bus-width1 {
  330. rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>;
  331. };
  332. sd1_bus4: sd1-bus-width4 {
  333. rockchip,pins = <RK_GPIO3 17 RK_FUNC_1 &pcfg_pull_default>,
  334. <RK_GPIO3 18 RK_FUNC_1 &pcfg_pull_default>,
  335. <RK_GPIO3 19 RK_FUNC_1 &pcfg_pull_default>,
  336. <RK_GPIO3 20 RK_FUNC_1 &pcfg_pull_default>;
  337. };
  338. };
  339. };
  340. };
  341. &i2c0 {
  342. pinctrl-names = "default";
  343. pinctrl-0 = <&i2c0_xfer>;
  344. };
  345. &i2c1 {
  346. pinctrl-names = "default";
  347. pinctrl-0 = <&i2c1_xfer>;
  348. };
  349. &i2c2 {
  350. pinctrl-names = "default";
  351. pinctrl-0 = <&i2c2_xfer>;
  352. };
  353. &i2c3 {
  354. pinctrl-names = "default";
  355. pinctrl-0 = <&i2c3_xfer>;
  356. };
  357. &i2c4 {
  358. pinctrl-names = "default";
  359. pinctrl-0 = <&i2c4_xfer>;
  360. };
  361. &mmc0 {
  362. pinctrl-names = "default";
  363. pinctrl-0 = <&sd0_clk &sd0_cmd &sd0_cd &sd0_bus4>;
  364. };
  365. &mmc1 {
  366. pinctrl-names = "default";
  367. pinctrl-0 = <&sd1_clk &sd1_cmd &sd1_cd &sd1_bus4>;
  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. pinctrl-names = "default";
  387. pinctrl-0 = <&spi0_clk &spi0_tx &spi0_rx &spi0_cs0>;
  388. };
  389. &spi1 {
  390. pinctrl-names = "default";
  391. pinctrl-0 = <&spi1_clk &spi1_tx &spi1_rx &spi1_cs0>;
  392. };
  393. &uart0 {
  394. pinctrl-names = "default";
  395. pinctrl-0 = <&uart0_xfer>;
  396. };
  397. &uart1 {
  398. pinctrl-names = "default";
  399. pinctrl-0 = <&uart1_xfer>;
  400. };
  401. &uart2 {
  402. pinctrl-names = "default";
  403. pinctrl-0 = <&uart2_xfer>;
  404. };
  405. &uart3 {
  406. pinctrl-names = "default";
  407. pinctrl-0 = <&uart3_xfer>;
  408. };
  409. &wdt {
  410. compatible = "rockchip,rk3066-wdt", "snps,dw-wdt";
  411. };