rk3036.dtsi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428
  1. /*
  2. * SPDX-License-Identifier: GPL-2.0+
  3. */
  4. #include <dt-bindings/gpio/gpio.h>
  5. #include <dt-bindings/interrupt-controller/irq.h>
  6. #include <dt-bindings/interrupt-controller/arm-gic.h>
  7. #include <dt-bindings/pinctrl/rockchip.h>
  8. #include <dt-bindings/clock/rk3036-cru.h>
  9. #include "skeleton.dtsi"
  10. / {
  11. compatible = "rockchip,rk3036";
  12. interrupt-parent = <&gic>;
  13. aliases {
  14. gpio0 = &gpio0;
  15. gpio1 = &gpio1;
  16. gpio2 = &gpio2;
  17. i2c1 = &i2c1;
  18. serial0 = &uart0;
  19. serial1 = &uart1;
  20. serial2 = &uart2;
  21. mmc0 = &emmc;
  22. };
  23. memory {
  24. device_type = "memory";
  25. reg = <0x60000000 0x40000000>;
  26. };
  27. arm-pmu {
  28. compatible = "arm,cortex-a7-pmu";
  29. interrupts = <GIC_SPI 76 IRQ_TYPE_LEVEL_HIGH>,
  30. <GIC_SPI 77 IRQ_TYPE_LEVEL_HIGH>;
  31. interrupt-affinity = <&cpu0>, <&cpu1>;
  32. };
  33. cpus {
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. enable-method = "rockchip,rk3036-smp";
  37. cpu0: cpu@f00 {
  38. device_type = "cpu";
  39. compatible = "arm,cortex-a7";
  40. reg = <0xf00>;
  41. operating-points = <
  42. /* KHz uV */
  43. 816000 1000000
  44. >;
  45. #cooling-cells = <2>; /* min followed by max */
  46. clock-latency = <40000>;
  47. clocks = <&cru ARMCLK>;
  48. resets = <&cru SRST_CORE0>;
  49. };
  50. cpu1: cpu@f01 {
  51. device_type = "cpu";
  52. compatible = "arm,cortex-a7";
  53. reg = <0xf01>;
  54. resets = <&cru SRST_CORE1>;
  55. };
  56. };
  57. amba {
  58. compatible = "arm,amba-bus";
  59. #address-cells = <1>;
  60. #size-cells = <1>;
  61. ranges;
  62. pdma: pdma@20078000 {
  63. compatible = "arm,pl330", "arm,primecell";
  64. reg = <0x20078000 0x4000>;
  65. arm,pl330-broken-no-flushp;
  66. interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>,
  67. <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  68. #dma-cells = <1>;
  69. clocks = <&cru ACLK_DMAC2>;
  70. clock-names = "apb_pclk";
  71. };
  72. };
  73. xin24m: oscillator {
  74. compatible = "fixed-clock";
  75. clock-frequency = <24000000>;
  76. clock-output-names = "xin24m";
  77. #clock-cells = <0>;
  78. };
  79. timer {
  80. compatible = "arm,armv7-timer";
  81. arm,cpu-registers-not-fw-configured;
  82. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  83. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  84. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  85. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  86. clock-frequency = <24000000>;
  87. };
  88. cru: clock-controller@20000000 {
  89. compatible = "rockchip,rk3036-cru";
  90. reg = <0x20000000 0x1000>;
  91. rockchip,grf = <&grf>;
  92. #clock-cells = <1>;
  93. #reset-cells = <1>;
  94. assigned-clocks = <&cru PLL_GPLL>;
  95. assigned-clock-rates = <594000000>;
  96. };
  97. uart0: serial@20060000 {
  98. compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
  99. reg = <0x20060000 0x100>;
  100. interrupts = <GIC_SPI 20 IRQ_TYPE_LEVEL_HIGH>;
  101. reg-shift = <2>;
  102. reg-io-width = <4>;
  103. clock-frequency = <24000000>;
  104. clocks = <&cru SCLK_UART0>, <&cru PCLK_UART0>;
  105. clock-names = "baudclk", "apb_pclk";
  106. pinctrl-names = "default";
  107. pinctrl-0 = <&uart0_xfer &uart0_cts &uart0_rts>;
  108. };
  109. uart1: serial@20064000 {
  110. compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
  111. reg = <0x20064000 0x100>;
  112. interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
  113. reg-shift = <2>;
  114. reg-io-width = <4>;
  115. clock-frequency = <24000000>;
  116. clocks = <&cru SCLK_UART1>, <&cru PCLK_UART1>;
  117. clock-names = "baudclk", "apb_pclk";
  118. pinctrl-names = "default";
  119. pinctrl-0 = <&uart1_xfer>;
  120. };
  121. uart2: serial@20068000 {
  122. compatible = "rockchip,rk3036-uart", "snps,dw-apb-uart";
  123. reg = <0x20068000 0x100>;
  124. interrupts = <GIC_SPI 22 IRQ_TYPE_LEVEL_HIGH>;
  125. reg-shift = <2>;
  126. reg-io-width = <4>;
  127. clock-frequency = <24000000>;
  128. clocks = <&cru SCLK_UART2>, <&cru PCLK_UART2>;
  129. clock-names = "baudclk", "apb_pclk";
  130. pinctrl-names = "default";
  131. pinctrl-0 = <&uart2_xfer>;
  132. };
  133. pwm0: pwm@20050000 {
  134. compatible = "rockchip,rk2928-pwm";
  135. reg = <0x20050000 0x10>;
  136. #pwm-cells = <3>;
  137. pinctrl-names = "default";
  138. pinctrl-0 = <&pwm0_pin>;
  139. clocks = <&cru PCLK_PWM>;
  140. clock-names = "pwm";
  141. status = "disabled";
  142. };
  143. pwm1: pwm@20050010 {
  144. compatible = "rockchip,rk2928-pwm";
  145. reg = <0x20050010 0x10>;
  146. #pwm-cells = <3>;
  147. pinctrl-names = "default";
  148. pinctrl-0 = <&pwm1_pin>;
  149. clocks = <&cru PCLK_PWM>;
  150. clock-names = "pwm";
  151. status = "disabled";
  152. };
  153. pwm2: pwm@20050020 {
  154. compatible = "rockchip,rk2928-pwm";
  155. reg = <0x20050020 0x10>;
  156. #pwm-cells = <3>;
  157. pinctrl-names = "default";
  158. pinctrl-0 = <&pwm2_pin>;
  159. clocks = <&cru PCLK_PWM>;
  160. clock-names = "pwm";
  161. status = "disabled";
  162. };
  163. pwm3: pwm@20050030 {
  164. compatible = "rockchip,rk2928-pwm";
  165. reg = <0x20050030 0x10>;
  166. #pwm-cells = <2>;
  167. pinctrl-names = "default";
  168. pinctrl-0 = <&pwm3_pin>;
  169. clocks = <&cru PCLK_PWM>;
  170. clock-names = "pwm";
  171. status = "disabled";
  172. };
  173. sram: sram@10080000 {
  174. compatible = "rockchip,rk3036-smp-sram", "mmio-sram";
  175. reg = <0x10080000 0x2000>;
  176. };
  177. gic: interrupt-controller@10139000 {
  178. compatible = "arm,gic-400";
  179. interrupt-controller;
  180. #interrupt-cells = <3>;
  181. #address-cells = <0>;
  182. reg = <0x10139000 0x1000>,
  183. <0x1013a000 0x1000>,
  184. <0x1013c000 0x2000>,
  185. <0x1013e000 0x2000>;
  186. interrupts = <GIC_PPI 9 0xf04>;
  187. };
  188. grf: syscon@20008000 {
  189. compatible = "rockchip,rk3036-grf", "syscon";
  190. reg = <0x20008000 0x1000>;
  191. };
  192. usb_otg: usb@10180000 {
  193. compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",
  194. "snps,dwc2";
  195. reg = <0x10180000 0x40000>;
  196. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  197. clocks = <&cru HCLK_OTG0>;
  198. clock-names = "otg";
  199. dr_mode = "otg";
  200. g-np-tx-fifo-size = <16>;
  201. g-rx-fifo-size = <275>;
  202. g-tx-fifo-size = <256 128 128 64 64 32>;
  203. g-use-dma;
  204. status = "disabled";
  205. };
  206. usb_host: usb@101c0000 {
  207. compatible = "rockchip,rk3288-usb", "rockchip,rk3066-usb",
  208. "snps,dwc2";
  209. reg = <0x101c0000 0x40000>;
  210. interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>;
  211. clocks = <&cru HCLK_OTG1>;
  212. clock-names = "otg";
  213. dr_mode = "host";
  214. status = "disabled";
  215. };
  216. emmc: dwmmc@1021c000 {
  217. compatible = "rockchip,rk3288-dw-mshc";
  218. clock-frequency = <37500000>;
  219. clock-freq-min-max = <400000 37500000>;
  220. clocks = <&cru HCLK_EMMC>, <&cru SCLK_EMMC>,
  221. <&cru SCLK_EMMC_DRV>, <&cru SCLK_EMMC_SAMPLE>;
  222. clock-names = "biu", "ciu", "ciu_drv", "ciu_sample";
  223. dmas = <&pdma 12>;
  224. dma-names = "rx-tx";
  225. fifo-depth = <0x100>;
  226. interrupts = <GIC_SPI 16 IRQ_TYPE_LEVEL_HIGH>;
  227. reg = <0x1021c000 0x4000>;
  228. broken-cd;
  229. bus-width = <8>;
  230. cap-mmc-highspeed;
  231. mmc-ddr-1_8v;
  232. disable-wp;
  233. fifo-mode;
  234. non-removable;
  235. num-slots = <1>;
  236. default-sample-phase = <158>;
  237. pinctrl-names = "default";
  238. pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
  239. };
  240. pinctrl: pinctrl {
  241. compatible = "rockchip,rk3036-pinctrl";
  242. rockchip,grf = <&grf>;
  243. #address-cells = <1>;
  244. #size-cells = <1>;
  245. ranges;
  246. gpio0: gpio0@2007c000 {
  247. compatible = "rockchip,gpio-bank";
  248. reg = <0x2007c000 0x100>;
  249. interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
  250. clocks = <&cru PCLK_GPIO0>;
  251. gpio-controller;
  252. #gpio-cells = <2>;
  253. interrupt-controller;
  254. #interrupt-cells = <2>;
  255. };
  256. gpio1: gpio1@20080000 {
  257. compatible = "rockchip,gpio-bank";
  258. reg = <0x20080000 0x100>;
  259. interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  260. clocks = <&cru PCLK_GPIO1>;
  261. gpio-controller;
  262. #gpio-cells = <2>;
  263. interrupt-controller;
  264. #interrupt-cells = <2>;
  265. };
  266. gpio2: gpio2@20084000 {
  267. compatible = "rockchip,gpio-bank";
  268. reg = <0x20084000 0x100>;
  269. interrupts = <GIC_SPI 38 IRQ_TYPE_LEVEL_HIGH>;
  270. clocks = <&cru PCLK_GPIO2>;
  271. gpio-controller;
  272. #gpio-cells = <2>;
  273. interrupt-controller;
  274. #interrupt-cells = <2>;
  275. };
  276. pcfg_pull_up: pcfg-pull-up {
  277. bias-pull-up;
  278. };
  279. pcfg_pull_down: pcfg-pull-down {
  280. bias-pull-down;
  281. };
  282. pcfg_pull_none: pcfg-pull-none {
  283. bias-disable;
  284. };
  285. emmc {
  286. /*
  287. * We run eMMC at max speed; bump up drive strength.
  288. * We also have external pulls, so disable the internal ones.
  289. */
  290. emmc_clk: emmc-clk {
  291. rockchip,pins = <2 4 RK_FUNC_2 &pcfg_pull_none>;
  292. };
  293. emmc_cmd: emmc-cmd {
  294. rockchip,pins = <2 1 RK_FUNC_2 &pcfg_pull_none>;
  295. };
  296. emmc_bus8: emmc-bus8 {
  297. rockchip,pins = <1 24 RK_FUNC_2 &pcfg_pull_none>,
  298. <1 25 RK_FUNC_2 &pcfg_pull_none>,
  299. <1 26 RK_FUNC_2 &pcfg_pull_none>,
  300. <1 27 RK_FUNC_2 &pcfg_pull_none>;
  301. /*
  302. <1 28 RK_FUNC_2 &pcfg_pull_up>,
  303. <1 29 RK_FUNC_2 &pcfg_pull_up>,
  304. <1 30 RK_FUNC_2 &pcfg_pull_up>,
  305. <1 31 RK_FUNC_2 &pcfg_pull_up>;
  306. */
  307. };
  308. };
  309. uart0 {
  310. uart0_xfer: uart0-xfer {
  311. rockchip,pins = <0 16 RK_FUNC_1 &pcfg_pull_none>,
  312. <0 17 RK_FUNC_1 &pcfg_pull_none>;
  313. };
  314. uart0_cts: uart0-cts {
  315. rockchip,pins = <0 18 RK_FUNC_1 &pcfg_pull_none>;
  316. };
  317. uart0_rts: uart0-rts {
  318. rockchip,pins = <0 19 RK_FUNC_1 &pcfg_pull_none>;
  319. };
  320. };
  321. uart1 {
  322. uart1_xfer: uart1-xfer {
  323. rockchip,pins = <2 22 RK_FUNC_1 &pcfg_pull_none>,
  324. <2 23 RK_FUNC_1 &pcfg_pull_none>;
  325. };
  326. /* no rts / cts for uart1 */
  327. };
  328. uart2 {
  329. uart2_xfer: uart2-xfer {
  330. rockchip,pins = <1 18 RK_FUNC_2 &pcfg_pull_none>,
  331. <1 19 RK_FUNC_2 &pcfg_pull_none>;
  332. };
  333. /* no rts / cts for uart2 */
  334. };
  335. pwm0 {
  336. pwm0_pin: pwm0-pin {
  337. rockchip,pins = <0 0 RK_FUNC_2 &pcfg_pull_none>;
  338. };
  339. };
  340. pwm1 {
  341. pwm1_pin: pwm1-pin {
  342. rockchip,pins = <0 1 RK_FUNC_2 &pcfg_pull_none>;
  343. };
  344. };
  345. pwm2 {
  346. pwm2_pin: pwm2-pin {
  347. rockchip,pins = <0 1 2 &pcfg_pull_none>;
  348. };
  349. };
  350. pwm3 {
  351. pwm3_pin: pwm3-pin {
  352. rockchip,pins = <0 27 1 &pcfg_pull_none>;
  353. };
  354. };
  355. i2c1 {
  356. i2c1_xfer: i2c1-xfer {
  357. rockchip,pins = <0 2 RK_FUNC_1 &pcfg_pull_none>,
  358. <0 3 RK_FUNC_1 &pcfg_pull_none>;
  359. };
  360. };
  361. };
  362. i2c1: i2c@20056000 {
  363. compatible = "rockchip,rk3288-i2c";
  364. reg = <0x20056000 0x1000>;
  365. interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
  366. #address-cells = <1>;
  367. #size-cells = <0>;
  368. clock-names = "i2c";
  369. clocks = <&cru PCLK_I2C1>;
  370. pinctrl-names = "default";
  371. pinctrl-0 = <&i2c1_xfer>;
  372. status = "disabled";
  373. };
  374. };