sun8i-h3.dtsi 8.6 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335
  1. /*
  2. * Copyright (C) 2015 Jens Kuske <[email protected]>
  3. *
  4. * This file is dual-licensed: you can use it either under the terms
  5. * of the GPL or the X11 license, at your option. Note that this dual
  6. * licensing only applies to this file, and not this project as a
  7. * whole.
  8. *
  9. * a) This file is free software; you can redistribute it and/or
  10. * modify it under the terms of the GNU General Public License as
  11. * published by the Free Software Foundation; either version 2 of the
  12. * License, or (at your option) any later version.
  13. *
  14. * This file is distributed in the hope that it will be useful,
  15. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  16. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  17. * GNU General Public License for more details.
  18. *
  19. * Or, alternatively,
  20. *
  21. * b) Permission is hereby granted, free of charge, to any person
  22. * obtaining a copy of this software and associated documentation
  23. * files (the "Software"), to deal in the Software without
  24. * restriction, including without limitation the rights to use,
  25. * copy, modify, merge, publish, distribute, sublicense, and/or
  26. * sell copies of the Software, and to permit persons to whom the
  27. * Software is furnished to do so, subject to the following
  28. * conditions:
  29. *
  30. * The above copyright notice and this permission notice shall be
  31. * included in all copies or substantial portions of the Software.
  32. *
  33. * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  34. * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  35. * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  36. * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  37. * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  38. * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  39. * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  40. * OTHER DEALINGS IN THE SOFTWARE.
  41. */
  42. #include "sunxi-h3-h5.dtsi"
  43. #include <dt-bindings/thermal/thermal.h>
  44. / {
  45. cpu0_opp_table: opp-table-cpu {
  46. compatible = "operating-points-v2";
  47. opp-shared;
  48. opp-648000000 {
  49. opp-hz = /bits/ 64 <648000000>;
  50. opp-microvolt = <1040000 1040000 1300000>;
  51. clock-latency-ns = <244144>; /* 8 32k periods */
  52. };
  53. opp-816000000 {
  54. opp-hz = /bits/ 64 <816000000>;
  55. opp-microvolt = <1100000 1100000 1300000>;
  56. clock-latency-ns = <244144>; /* 8 32k periods */
  57. };
  58. opp-1008000000 {
  59. opp-hz = /bits/ 64 <1008000000>;
  60. opp-microvolt = <1200000 1200000 1300000>;
  61. clock-latency-ns = <244144>; /* 8 32k periods */
  62. };
  63. };
  64. cpus {
  65. #address-cells = <1>;
  66. #size-cells = <0>;
  67. cpu0: cpu@0 {
  68. compatible = "arm,cortex-a7";
  69. device_type = "cpu";
  70. reg = <0>;
  71. clocks = <&ccu CLK_CPUX>;
  72. clock-names = "cpu";
  73. operating-points-v2 = <&cpu0_opp_table>;
  74. #cooling-cells = <2>;
  75. };
  76. cpu1: cpu@1 {
  77. compatible = "arm,cortex-a7";
  78. device_type = "cpu";
  79. reg = <1>;
  80. clocks = <&ccu CLK_CPUX>;
  81. clock-names = "cpu";
  82. operating-points-v2 = <&cpu0_opp_table>;
  83. #cooling-cells = <2>;
  84. };
  85. cpu2: cpu@2 {
  86. compatible = "arm,cortex-a7";
  87. device_type = "cpu";
  88. reg = <2>;
  89. clocks = <&ccu CLK_CPUX>;
  90. clock-names = "cpu";
  91. operating-points-v2 = <&cpu0_opp_table>;
  92. #cooling-cells = <2>;
  93. };
  94. cpu3: cpu@3 {
  95. compatible = "arm,cortex-a7";
  96. device_type = "cpu";
  97. reg = <3>;
  98. clocks = <&ccu CLK_CPUX>;
  99. clock-names = "cpu";
  100. operating-points-v2 = <&cpu0_opp_table>;
  101. #cooling-cells = <2>;
  102. };
  103. };
  104. gpu_opp_table: opp-table-gpu {
  105. compatible = "operating-points-v2";
  106. opp-120000000 {
  107. opp-hz = /bits/ 64 <120000000>;
  108. };
  109. opp-312000000 {
  110. opp-hz = /bits/ 64 <312000000>;
  111. };
  112. opp-432000000 {
  113. opp-hz = /bits/ 64 <432000000>;
  114. };
  115. opp-576000000 {
  116. opp-hz = /bits/ 64 <576000000>;
  117. };
  118. };
  119. pmu {
  120. compatible = "arm,cortex-a7-pmu";
  121. interrupts = <GIC_SPI 120 IRQ_TYPE_LEVEL_HIGH>,
  122. <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>,
  123. <GIC_SPI 122 IRQ_TYPE_LEVEL_HIGH>,
  124. <GIC_SPI 123 IRQ_TYPE_LEVEL_HIGH>;
  125. interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
  126. };
  127. timer {
  128. compatible = "arm,armv7-timer";
  129. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  130. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  131. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  132. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  133. };
  134. soc {
  135. deinterlace: deinterlace@1400000 {
  136. compatible = "allwinner,sun8i-h3-deinterlace";
  137. reg = <0x01400000 0x20000>;
  138. clocks = <&ccu CLK_BUS_DEINTERLACE>,
  139. <&ccu CLK_DEINTERLACE>,
  140. <&ccu CLK_DRAM_DEINTERLACE>;
  141. clock-names = "bus", "mod", "ram";
  142. resets = <&ccu RST_BUS_DEINTERLACE>;
  143. interrupts = <GIC_SPI 93 IRQ_TYPE_LEVEL_HIGH>;
  144. interconnects = <&mbus 9>;
  145. interconnect-names = "dma-mem";
  146. };
  147. syscon: system-control@1c00000 {
  148. compatible = "allwinner,sun8i-h3-system-control";
  149. reg = <0x01c00000 0x1000>;
  150. #address-cells = <1>;
  151. #size-cells = <1>;
  152. ranges;
  153. sram_c: sram@1d00000 {
  154. compatible = "mmio-sram";
  155. reg = <0x01d00000 0x80000>;
  156. #address-cells = <1>;
  157. #size-cells = <1>;
  158. ranges = <0 0x01d00000 0x80000>;
  159. ve_sram: sram-section@0 {
  160. compatible = "allwinner,sun8i-h3-sram-c1",
  161. "allwinner,sun4i-a10-sram-c1";
  162. reg = <0x000000 0x80000>;
  163. };
  164. };
  165. };
  166. video-codec@1c0e000 {
  167. compatible = "allwinner,sun8i-h3-video-engine";
  168. reg = <0x01c0e000 0x1000>;
  169. clocks = <&ccu CLK_BUS_VE>, <&ccu CLK_VE>,
  170. <&ccu CLK_DRAM_VE>;
  171. clock-names = "ahb", "mod", "ram";
  172. resets = <&ccu RST_BUS_VE>;
  173. interrupts = <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>;
  174. allwinner,sram = <&ve_sram 1>;
  175. };
  176. crypto: crypto@1c15000 {
  177. compatible = "allwinner,sun8i-h3-crypto";
  178. reg = <0x01c15000 0x1000>;
  179. interrupts = <GIC_SPI 94 IRQ_TYPE_LEVEL_HIGH>;
  180. clocks = <&ccu CLK_BUS_CE>, <&ccu CLK_CE>;
  181. clock-names = "bus", "mod";
  182. resets = <&ccu RST_BUS_CE>;
  183. };
  184. mali: gpu@1c40000 {
  185. compatible = "allwinner,sun8i-h3-mali", "arm,mali-400";
  186. reg = <0x01c40000 0x10000>;
  187. interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
  188. <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
  189. <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
  190. <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
  191. <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
  192. <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
  193. <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
  194. interrupt-names = "gp",
  195. "gpmmu",
  196. "pp0",
  197. "ppmmu0",
  198. "pp1",
  199. "ppmmu1",
  200. "pmu";
  201. clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
  202. clock-names = "bus", "core";
  203. resets = <&ccu RST_BUS_GPU>;
  204. operating-points-v2 = <&gpu_opp_table>;
  205. };
  206. ths: thermal-sensor@1c25000 {
  207. compatible = "allwinner,sun8i-h3-ths";
  208. reg = <0x01c25000 0x400>;
  209. interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
  210. resets = <&ccu RST_BUS_THS>;
  211. clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
  212. clock-names = "bus", "mod";
  213. nvmem-cells = <&ths_calibration>;
  214. nvmem-cell-names = "calibration";
  215. #thermal-sensor-cells = <0>;
  216. };
  217. };
  218. thermal-zones {
  219. cpu_thermal: cpu-thermal {
  220. polling-delay-passive = <0>;
  221. polling-delay = <0>;
  222. thermal-sensors = <&ths>;
  223. trips {
  224. cpu_hot_trip: cpu-hot {
  225. temperature = <80000>;
  226. hysteresis = <2000>;
  227. type = "passive";
  228. };
  229. cpu_very_hot_trip: cpu-very-hot {
  230. temperature = <100000>;
  231. hysteresis = <0>;
  232. type = "critical";
  233. };
  234. };
  235. cooling-maps {
  236. cpu-hot-limit {
  237. trip = <&cpu_hot_trip>;
  238. cooling-device = <&cpu0 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  239. <&cpu1 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  240. <&cpu2 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>,
  241. <&cpu3 THERMAL_NO_LIMIT THERMAL_NO_LIMIT>;
  242. };
  243. };
  244. };
  245. };
  246. };
  247. &ccu {
  248. compatible = "allwinner,sun8i-h3-ccu";
  249. };
  250. &display_clocks {
  251. compatible = "allwinner,sun8i-h3-de2-clk";
  252. };
  253. &mbus {
  254. compatible = "allwinner,sun8i-h3-mbus";
  255. };
  256. &mmc0 {
  257. compatible = "allwinner,sun7i-a20-mmc";
  258. clocks = <&ccu CLK_BUS_MMC0>,
  259. <&ccu CLK_MMC0>,
  260. <&ccu CLK_MMC0_OUTPUT>,
  261. <&ccu CLK_MMC0_SAMPLE>;
  262. clock-names = "ahb",
  263. "mmc",
  264. "output",
  265. "sample";
  266. };
  267. &mmc1 {
  268. compatible = "allwinner,sun7i-a20-mmc";
  269. clocks = <&ccu CLK_BUS_MMC1>,
  270. <&ccu CLK_MMC1>,
  271. <&ccu CLK_MMC1_OUTPUT>,
  272. <&ccu CLK_MMC1_SAMPLE>;
  273. clock-names = "ahb",
  274. "mmc",
  275. "output",
  276. "sample";
  277. };
  278. &mmc2 {
  279. compatible = "allwinner,sun7i-a20-mmc";
  280. clocks = <&ccu CLK_BUS_MMC2>,
  281. <&ccu CLK_MMC2>,
  282. <&ccu CLK_MMC2_OUTPUT>,
  283. <&ccu CLK_MMC2_SAMPLE>;
  284. clock-names = "ahb",
  285. "mmc",
  286. "output",
  287. "sample";
  288. };
  289. &pio {
  290. compatible = "allwinner,sun8i-h3-pinctrl";
  291. };
  292. &rtc {
  293. compatible = "allwinner,sun8i-h3-rtc";
  294. };
  295. &sid {
  296. compatible = "allwinner,sun8i-h3-sid";
  297. };