sun8i-a33.dtsi 10 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431
  1. /*
  2. * Copyright 2014 Chen-Yu Tsai
  3. *
  4. * Chen-Yu Tsai <[email protected]>
  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 file 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 file 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 "sun8i-a23-a33.dtsi"
  45. #include <dt-bindings/thermal/thermal.h>
  46. / {
  47. cpu0_opp_table: opp-table-cpu {
  48. compatible = "operating-points-v2";
  49. opp-shared;
  50. opp-120000000 {
  51. opp-hz = /bits/ 64 <120000000>;
  52. opp-microvolt = <1040000>;
  53. clock-latency-ns = <244144>; /* 8 32k periods */
  54. };
  55. opp-240000000 {
  56. opp-hz = /bits/ 64 <240000000>;
  57. opp-microvolt = <1040000>;
  58. clock-latency-ns = <244144>; /* 8 32k periods */
  59. };
  60. opp-312000000 {
  61. opp-hz = /bits/ 64 <312000000>;
  62. opp-microvolt = <1040000>;
  63. clock-latency-ns = <244144>; /* 8 32k periods */
  64. };
  65. opp-408000000 {
  66. opp-hz = /bits/ 64 <408000000>;
  67. opp-microvolt = <1040000>;
  68. clock-latency-ns = <244144>; /* 8 32k periods */
  69. };
  70. opp-480000000 {
  71. opp-hz = /bits/ 64 <480000000>;
  72. opp-microvolt = <1040000>;
  73. clock-latency-ns = <244144>; /* 8 32k periods */
  74. };
  75. opp-504000000 {
  76. opp-hz = /bits/ 64 <504000000>;
  77. opp-microvolt = <1040000>;
  78. clock-latency-ns = <244144>; /* 8 32k periods */
  79. };
  80. opp-600000000 {
  81. opp-hz = /bits/ 64 <600000000>;
  82. opp-microvolt = <1040000>;
  83. clock-latency-ns = <244144>; /* 8 32k periods */
  84. };
  85. opp-648000000 {
  86. opp-hz = /bits/ 64 <648000000>;
  87. opp-microvolt = <1040000>;
  88. clock-latency-ns = <244144>; /* 8 32k periods */
  89. };
  90. opp-720000000 {
  91. opp-hz = /bits/ 64 <720000000>;
  92. opp-microvolt = <1100000>;
  93. clock-latency-ns = <244144>; /* 8 32k periods */
  94. };
  95. opp-816000000 {
  96. opp-hz = /bits/ 64 <816000000>;
  97. opp-microvolt = <1100000>;
  98. clock-latency-ns = <244144>; /* 8 32k periods */
  99. };
  100. opp-912000000 {
  101. opp-hz = /bits/ 64 <912000000>;
  102. opp-microvolt = <1200000>;
  103. clock-latency-ns = <244144>; /* 8 32k periods */
  104. };
  105. opp-1008000000 {
  106. opp-hz = /bits/ 64 <1008000000>;
  107. opp-microvolt = <1200000>;
  108. clock-latency-ns = <244144>; /* 8 32k periods */
  109. };
  110. };
  111. cpus {
  112. cpu@0 {
  113. clocks = <&ccu CLK_CPUX>;
  114. clock-names = "cpu";
  115. operating-points-v2 = <&cpu0_opp_table>;
  116. #cooling-cells = <2>;
  117. };
  118. cpu1: cpu@1 {
  119. clocks = <&ccu CLK_CPUX>;
  120. clock-names = "cpu";
  121. operating-points-v2 = <&cpu0_opp_table>;
  122. #cooling-cells = <2>;
  123. };
  124. cpu2: cpu@2 {
  125. compatible = "arm,cortex-a7";
  126. device_type = "cpu";
  127. reg = <2>;
  128. clocks = <&ccu CLK_CPUX>;
  129. clock-names = "cpu";
  130. operating-points-v2 = <&cpu0_opp_table>;
  131. #cooling-cells = <2>;
  132. };
  133. cpu3: cpu@3 {
  134. compatible = "arm,cortex-a7";
  135. device_type = "cpu";
  136. reg = <3>;
  137. clocks = <&ccu CLK_CPUX>;
  138. clock-names = "cpu";
  139. operating-points-v2 = <&cpu0_opp_table>;
  140. #cooling-cells = <2>;
  141. };
  142. };
  143. iio-hwmon {
  144. compatible = "iio-hwmon";
  145. io-channels = <&ths>;
  146. };
  147. mali_opp_table: opp-table-gpu {
  148. compatible = "operating-points-v2";
  149. opp-144000000 {
  150. opp-hz = /bits/ 64 <144000000>;
  151. };
  152. opp-240000000 {
  153. opp-hz = /bits/ 64 <240000000>;
  154. };
  155. opp-384000000 {
  156. opp-hz = /bits/ 64 <384000000>;
  157. };
  158. };
  159. sound: sound {
  160. compatible = "simple-audio-card";
  161. simple-audio-card,name = "sun8i-a33-audio";
  162. simple-audio-card,format = "i2s";
  163. simple-audio-card,frame-master = <&link_codec>;
  164. simple-audio-card,bitclock-master = <&link_codec>;
  165. simple-audio-card,mclk-fs = <128>;
  166. simple-audio-card,aux-devs = <&codec_analog>;
  167. simple-audio-card,routing =
  168. "Left DAC", "DACL",
  169. "Right DAC", "DACR";
  170. status = "disabled";
  171. simple-audio-card,cpu {
  172. sound-dai = <&dai>;
  173. };
  174. link_codec: simple-audio-card,codec {
  175. sound-dai = <&codec 0>;
  176. };
  177. };
  178. soc {
  179. video-codec@1c0e000 {
  180. compatible = "allwinner,sun8i-a33-video-engine";
  181. reg = <0x01c0e000 0x1000>;
  182. clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
  183. <&ccu CLK_DRAM_VE>;
  184. clock-names = "ahb", "mod", "ram";
  185. resets = <&ccu RST_BUS_VE>;
  186. interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
  187. allwinner,sram = <&ve_sram 1>;
  188. };
  189. crypto: crypto-engine@1c15000 {
  190. compatible = "allwinner,sun8i-a33-crypto";
  191. reg = <0x01c15000 0x1000>;
  192. interrupts = <GIC_SPI 80 IRQ_TYPE_LEVEL_HIGH>;
  193. clocks = <&ccu CLK_BUS_SS>, <&ccu CLK_SS>;
  194. clock-names = "ahb", "mod";
  195. resets = <&ccu RST_BUS_SS>;
  196. reset-names = "ahb";
  197. };
  198. dai: dai@1c22c00 {
  199. #sound-dai-cells = <0>;
  200. compatible = "allwinner,sun6i-a31-i2s";
  201. reg = <0x01c22c00 0x200>;
  202. interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  203. clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
  204. clock-names = "apb", "mod";
  205. resets = <&ccu RST_BUS_CODEC>;
  206. dmas = <&dma 15>, <&dma 15>;
  207. dma-names = "rx", "tx";
  208. status = "disabled";
  209. };
  210. codec: codec@1c22e00 {
  211. #sound-dai-cells = <1>;
  212. compatible = "allwinner,sun8i-a33-codec";
  213. reg = <0x01c22e00 0x400>;
  214. interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
  215. clocks = <&ccu CLK_BUS_CODEC>, <&ccu CLK_AC_DIG>;
  216. clock-names = "bus", "mod";
  217. status = "disabled";
  218. };
  219. ths: ths@1c25000 {
  220. compatible = "allwinner,sun8i-a33-ths";
  221. reg = <0x01c25000 0x100>;
  222. #thermal-sensor-cells = <0>;
  223. #io-channel-cells = <0>;
  224. };
  225. dsi: dsi@1ca0000 {
  226. compatible = "allwinner,sun6i-a31-mipi-dsi";
  227. reg = <0x01ca0000 0x1000>;
  228. interrupts = <GIC_SPI 89 IRQ_TYPE_LEVEL_HIGH>;
  229. clocks = <&ccu CLK_BUS_MIPI_DSI>,
  230. <&ccu CLK_DSI_SCLK>;
  231. clock-names = "bus", "mod";
  232. resets = <&ccu RST_BUS_MIPI_DSI>;
  233. phys = <&dphy>;
  234. phy-names = "dphy";
  235. status = "disabled";
  236. #address-cells = <1>;
  237. #size-cells = <0>;
  238. port {
  239. dsi_in_tcon0: endpoint {
  240. remote-endpoint = <&tcon0_out_dsi>;
  241. };
  242. };
  243. };
  244. dphy: d-phy@1ca1000 {
  245. compatible = "allwinner,sun6i-a31-mipi-dphy";
  246. reg = <0x01ca1000 0x1000>;
  247. clocks = <&ccu CLK_BUS_MIPI_DSI>,
  248. <&ccu CLK_DSI_DPHY>;
  249. clock-names = "bus", "mod";
  250. resets = <&ccu RST_BUS_MIPI_DSI>;
  251. status = "disabled";
  252. #phy-cells = <0>;
  253. };
  254. };
  255. thermal-zones {
  256. cpu-thermal {
  257. /* milliseconds */
  258. polling-delay-passive = <250>;
  259. polling-delay = <1000>;
  260. thermal-sensors = <&ths>;
  261. cooling-maps {
  262. map0 {
  263. trip = <&cpu_alert0>;
  264. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  265. <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  266. <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  267. <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  268. };
  269. map1 {
  270. trip = <&cpu_alert1>;
  271. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  272. <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  273. <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  274. <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  275. };
  276. map2 {
  277. trip = <&gpu_alert0>;
  278. cooling-device = <&mali 1 THERMAL_NO_LIMIT>;
  279. };
  280. map3 {
  281. trip = <&gpu_alert1>;
  282. cooling-device = <&mali 2 THERMAL_NO_LIMIT>;
  283. };
  284. };
  285. trips {
  286. cpu_alert0: cpu_alert0 {
  287. /* milliCelsius */
  288. temperature = <75000>;
  289. hysteresis = <2000>;
  290. type = "passive";
  291. };
  292. gpu_alert0: gpu_alert0 {
  293. /* milliCelsius */
  294. temperature = <85000>;
  295. hysteresis = <2000>;
  296. type = "passive";
  297. };
  298. cpu_alert1: cpu_alert1 {
  299. /* milliCelsius */
  300. temperature = <90000>;
  301. hysteresis = <2000>;
  302. type = "hot";
  303. };
  304. gpu_alert1: gpu_alert1 {
  305. /* milliCelsius */
  306. temperature = <95000>;
  307. hysteresis = <2000>;
  308. type = "hot";
  309. };
  310. cpu_crit: cpu_crit {
  311. /* milliCelsius */
  312. temperature = <110000>;
  313. hysteresis = <2000>;
  314. type = "critical";
  315. };
  316. };
  317. };
  318. };
  319. };
  320. &be0 {
  321. compatible = "allwinner,sun8i-a33-display-backend";
  322. /* A33 has an extra "SAT" module packed inside the display backend */
  323. reg = <0x01e60000 0x10000>, <0x01e80000 0x1000>;
  324. reg-names = "be", "sat";
  325. clocks = <&ccu CLK_BUS_DE_BE>, <&ccu CLK_DE_BE>,
  326. <&ccu CLK_DRAM_DE_BE>, <&ccu CLK_BUS_SAT>;
  327. clock-names = "ahb", "mod",
  328. "ram", "sat";
  329. resets = <&ccu RST_BUS_DE_BE>, <&ccu RST_BUS_SAT>;
  330. reset-names = "be", "sat";
  331. };
  332. &ccu {
  333. compatible = "allwinner,sun8i-a33-ccu";
  334. };
  335. &de {
  336. compatible = "allwinner,sun8i-a33-display-engine";
  337. };
  338. &drc0 {
  339. compatible = "allwinner,sun8i-a33-drc";
  340. };
  341. &fe0 {
  342. compatible = "allwinner,sun8i-a33-display-frontend";
  343. };
  344. &mali {
  345. operating-points-v2 = <&mali_opp_table>;
  346. };
  347. &pio {
  348. compatible = "allwinner,sun8i-a33-pinctrl";
  349. interrupts = <GIC_SPI 15 IRQ_TYPE_LEVEL_HIGH>,
  350. <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
  351. uart0_pb_pins: uart0-pb-pins {
  352. pins = "PB0", "PB1";
  353. function = "uart0";
  354. };
  355. };
  356. &tcon0 {
  357. compatible = "allwinner,sun8i-a33-tcon";
  358. };
  359. &tcon0_out {
  360. #address-cells = <1>;
  361. #size-cells = <0>;
  362. tcon0_out_dsi: endpoint@1 {
  363. reg = <1>;
  364. remote-endpoint = <&dsi_in_tcon0>;
  365. };
  366. };
  367. &usb_otg {
  368. compatible = "allwinner,sun8i-a33-musb";
  369. };
  370. &usbphy {
  371. compatible = "allwinner,sun8i-a33-usb-phy";
  372. reg = <0x01c19400 0x14>, <0x01c1a800 0x4>;
  373. reg-names = "phy_ctrl", "pmu1";
  374. };