sun5i-a13.dtsi 9.2 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375
  1. /*
  2. * Copyright 2012 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 "sun5i.dtsi"
  46. #include <dt-bindings/pinctrl/sun4i-a10.h>
  47. #include <dt-bindings/thermal/thermal.h>
  48. / {
  49. interrupt-parent = <&intc>;
  50. chosen {
  51. #address-cells = <1>;
  52. #size-cells = <1>;
  53. ranges;
  54. framebuffer@0 {
  55. compatible = "allwinner,simple-framebuffer",
  56. "simple-framebuffer";
  57. allwinner,pipeline = "de_be0-lcd0";
  58. clocks = <&ahb_gates 36>, <&ahb_gates 44>, <&de_be_clk>,
  59. <&tcon_ch0_clk>, <&dram_gates 26>;
  60. status = "disabled";
  61. };
  62. };
  63. thermal-zones {
  64. cpu_thermal {
  65. /* milliseconds */
  66. polling-delay-passive = <250>;
  67. polling-delay = <1000>;
  68. thermal-sensors = <&rtp>;
  69. cooling-maps {
  70. map0 {
  71. trip = <&cpu_alert0>;
  72. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  73. };
  74. };
  75. trips {
  76. cpu_alert0: cpu_alert0 {
  77. /* milliCelsius */
  78. temperature = <850000>;
  79. hysteresis = <2000>;
  80. type = "passive";
  81. };
  82. cpu_crit: cpu_crit {
  83. /* milliCelsius */
  84. temperature = <100000>;
  85. hysteresis = <2000>;
  86. type = "critical";
  87. };
  88. };
  89. };
  90. };
  91. clocks {
  92. ahb_gates: clk@01c20060 {
  93. #clock-cells = <1>;
  94. compatible = "allwinner,sun5i-a13-ahb-gates-clk";
  95. reg = <0x01c20060 0x8>;
  96. clocks = <&ahb>;
  97. clock-indices = <0>, <1>,
  98. <2>, <5>, <6>,
  99. <7>, <8>, <9>,
  100. <10>, <13>,
  101. <14>, <20>,
  102. <21>, <22>,
  103. <28>, <32>, <34>,
  104. <36>, <40>, <44>,
  105. <46>, <51>,
  106. <52>;
  107. clock-output-names = "ahb_usbotg", "ahb_ehci",
  108. "ahb_ohci", "ahb_ss", "ahb_dma",
  109. "ahb_bist", "ahb_mmc0", "ahb_mmc1",
  110. "ahb_mmc2", "ahb_nand",
  111. "ahb_sdram", "ahb_spi0",
  112. "ahb_spi1", "ahb_spi2",
  113. "ahb_stimer", "ahb_ve", "ahb_tve",
  114. "ahb_lcd", "ahb_csi", "ahb_de_be",
  115. "ahb_de_fe", "ahb_iep",
  116. "ahb_mali400";
  117. };
  118. apb0_gates: clk@01c20068 {
  119. #clock-cells = <1>;
  120. compatible = "allwinner,sun5i-a13-apb0-gates-clk";
  121. reg = <0x01c20068 0x4>;
  122. clocks = <&apb0>;
  123. clock-indices = <0>, <5>,
  124. <6>;
  125. clock-output-names = "apb0_codec", "apb0_pio",
  126. "apb0_ir";
  127. };
  128. apb1_gates: clk@01c2006c {
  129. #clock-cells = <1>;
  130. compatible = "allwinner,sun5i-a13-apb1-gates-clk";
  131. reg = <0x01c2006c 0x4>;
  132. clocks = <&apb1>;
  133. clock-indices = <0>, <1>,
  134. <2>, <17>,
  135. <19>;
  136. clock-output-names = "apb1_i2c0", "apb1_i2c1",
  137. "apb1_i2c2", "apb1_uart1",
  138. "apb1_uart3";
  139. };
  140. dram_gates: clk@01c20100 {
  141. #clock-cells = <1>;
  142. compatible = "allwinner,sun5i-a13-dram-gates-clk",
  143. "allwinner,sun4i-a10-gates-clk";
  144. reg = <0x01c20100 0x4>;
  145. clocks = <&pll5 0>;
  146. clock-indices = <0>,
  147. <1>,
  148. <25>,
  149. <26>,
  150. <29>,
  151. <31>;
  152. clock-output-names = "dram_ve",
  153. "dram_csi",
  154. "dram_de_fe",
  155. "dram_de_be",
  156. "dram_ace",
  157. "dram_iep";
  158. };
  159. de_be_clk: clk@01c20104 {
  160. #clock-cells = <0>;
  161. #reset-cells = <0>;
  162. compatible = "allwinner,sun4i-a10-display-clk";
  163. reg = <0x01c20104 0x4>;
  164. clocks = <&pll3>, <&pll7>, <&pll5 1>;
  165. clock-output-names = "de-be";
  166. };
  167. de_fe_clk: clk@01c2010c {
  168. #clock-cells = <0>;
  169. #reset-cells = <0>;
  170. compatible = "allwinner,sun4i-a10-display-clk";
  171. reg = <0x01c2010c 0x4>;
  172. clocks = <&pll3>, <&pll7>, <&pll5 1>;
  173. clock-output-names = "de-fe";
  174. };
  175. tcon_ch0_clk: clk@01c20118 {
  176. #clock-cells = <0>;
  177. #reset-cells = <1>;
  178. compatible = "allwinner,sun4i-a10-tcon-ch0-clk";
  179. reg = <0x01c20118 0x4>;
  180. clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>;
  181. clock-output-names = "tcon-ch0-sclk";
  182. };
  183. tcon_ch1_clk: clk@01c2012c {
  184. #clock-cells = <0>;
  185. compatible = "allwinner,sun4i-a10-tcon-ch1-clk";
  186. reg = <0x01c2012c 0x4>;
  187. clocks = <&pll3>, <&pll7>, <&pll3x2>, <&pll7x2>;
  188. clock-output-names = "tcon-ch1-sclk";
  189. };
  190. };
  191. display-engine {
  192. compatible = "allwinner,sun5i-a13-display-engine";
  193. allwinner,pipelines = <&fe0>;
  194. };
  195. soc@01c00000 {
  196. tcon0: lcd-controller@01c0c000 {
  197. compatible = "allwinner,sun5i-a13-tcon";
  198. reg = <0x01c0c000 0x1000>;
  199. interrupts = <44>;
  200. resets = <&tcon_ch0_clk 1>;
  201. reset-names = "lcd";
  202. clocks = <&ahb_gates 36>,
  203. <&tcon_ch0_clk>,
  204. <&tcon_ch1_clk>;
  205. clock-names = "ahb",
  206. "tcon-ch0",
  207. "tcon-ch1";
  208. clock-output-names = "tcon-pixel-clock";
  209. status = "disabled";
  210. ports {
  211. #address-cells = <1>;
  212. #size-cells = <0>;
  213. tcon0_in: port@0 {
  214. #address-cells = <1>;
  215. #size-cells = <0>;
  216. reg = <0>;
  217. tcon0_in_be0: endpoint@0 {
  218. reg = <0>;
  219. remote-endpoint = <&be0_out_tcon0>;
  220. };
  221. };
  222. tcon0_out: port@1 {
  223. #address-cells = <1>;
  224. #size-cells = <0>;
  225. reg = <1>;
  226. };
  227. };
  228. };
  229. pwm: pwm@01c20e00 {
  230. compatible = "allwinner,sun5i-a13-pwm";
  231. reg = <0x01c20e00 0xc>;
  232. clocks = <&osc24M>;
  233. #pwm-cells = <3>;
  234. status = "disabled";
  235. };
  236. fe0: display-frontend@01e00000 {
  237. compatible = "allwinner,sun5i-a13-display-frontend";
  238. reg = <0x01e00000 0x20000>;
  239. interrupts = <47>;
  240. clocks = <&ahb_gates 46>, <&de_fe_clk>,
  241. <&dram_gates 25>;
  242. clock-names = "ahb", "mod",
  243. "ram";
  244. resets = <&de_fe_clk>;
  245. status = "disabled";
  246. ports {
  247. #address-cells = <1>;
  248. #size-cells = <0>;
  249. fe0_out: port@1 {
  250. #address-cells = <1>;
  251. #size-cells = <0>;
  252. reg = <1>;
  253. fe0_out_be0: endpoint@0 {
  254. reg = <0>;
  255. remote-endpoint = <&be0_in_fe0>;
  256. };
  257. };
  258. };
  259. };
  260. be0: display-backend@01e60000 {
  261. compatible = "allwinner,sun5i-a13-display-backend";
  262. reg = <0x01e60000 0x10000>;
  263. clocks = <&ahb_gates 44>, <&de_be_clk>,
  264. <&dram_gates 26>;
  265. clock-names = "ahb", "mod",
  266. "ram";
  267. resets = <&de_be_clk>;
  268. status = "disabled";
  269. assigned-clocks = <&de_be_clk>;
  270. assigned-clock-rates = <300000000>;
  271. ports {
  272. #address-cells = <1>;
  273. #size-cells = <0>;
  274. be0_in: port@0 {
  275. #address-cells = <1>;
  276. #size-cells = <0>;
  277. reg = <0>;
  278. be0_in_fe0: endpoint@0 {
  279. reg = <0>;
  280. remote-endpoint = <&fe0_out_be0>;
  281. };
  282. };
  283. be0_out: port@1 {
  284. #address-cells = <1>;
  285. #size-cells = <0>;
  286. reg = <1>;
  287. be0_out_tcon0: endpoint@0 {
  288. reg = <0>;
  289. remote-endpoint = <&tcon0_in_be0>;
  290. };
  291. };
  292. };
  293. };
  294. };
  295. };
  296. &cpu0 {
  297. clock-latency = <244144>; /* 8 32k periods */
  298. operating-points = <
  299. /* kHz uV */
  300. 1008000 1400000
  301. 912000 1350000
  302. 864000 1300000
  303. 624000 1200000
  304. 576000 1200000
  305. 432000 1200000
  306. >;
  307. #cooling-cells = <2>;
  308. cooling-min-level = <0>;
  309. cooling-max-level = <5>;
  310. };
  311. &pio {
  312. compatible = "allwinner,sun5i-a13-pinctrl";
  313. lcd_rgb666_pins: lcd_rgb666@0 {
  314. allwinner,pins = "PD2", "PD3", "PD4", "PD5", "PD6", "PD7",
  315. "PD10", "PD11", "PD12", "PD13", "PD14", "PD15",
  316. "PD18", "PD19", "PD20", "PD21", "PD22", "PD23",
  317. "PD24", "PD25", "PD26", "PD27";
  318. allwinner,function = "lcd0";
  319. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  320. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  321. };
  322. uart1_pins_a: uart1@0 {
  323. allwinner,pins = "PE10", "PE11";
  324. allwinner,function = "uart1";
  325. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  326. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  327. };
  328. uart1_pins_b: uart1@1 {
  329. allwinner,pins = "PG3", "PG4";
  330. allwinner,function = "uart1";
  331. allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  332. allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  333. };
  334. };