Advertisement
hanni76

sun8i-h3.dtsi

Dec 13th, 2017
438
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 8.80 KB | None | 0 0
  1. /*
  2. * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
  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.  
  43. #include "sunxi-h3-h5.dtsi"
  44. #include <dt-bindings/thermal/thermal.h>
  45.  
  46. / {
  47. cpu_opp_table: opp_table {
  48. compatible = "operating-points-v2";
  49. opp-shared;
  50.  
  51. opp@240000000 {
  52. opp-hz = /bits/ 64 <240000000>;
  53. opp-microvolt = <980000 980000 1320000>;
  54. clock-latency-ns = <244144>; /* 8 32k periods */
  55. };
  56.  
  57. opp@480000000 {
  58. opp-hz = /bits/ 64 <480000000>;
  59. opp-microvolt = <980000 980000 1320000>;
  60. clock-latency-ns = <244144>; /* 8 32k periods */
  61. };
  62.  
  63. opp@648000000 {
  64. opp-hz = /bits/ 64 <648000000>;
  65. opp-microvolt = <1000000 1000000 1320000>;
  66. clock-latency-ns = <244144>; /* 8 32k periods */
  67. };
  68.  
  69. opp@816000000 {
  70. opp-hz = /bits/ 64 <816000000>;
  71. opp-microvolt = <1020000 1020000 1320000>;
  72. clock-latency-ns = <244144>; /* 8 32k periods */
  73. };
  74.  
  75. opp@912000000 {
  76. opp-hz = /bits/ 64 <912000000>;
  77. opp-microvolt = <1040000 1040000 1320000>;
  78. clock-latency-ns = <244144>; /* 8 32k periods */
  79. };
  80.  
  81. opp@960000000 {
  82. opp-hz = /bits/ 64 <960000000>;
  83. opp-microvolt = <1080000 1080000 1320000>;
  84. clock-latency-ns = <244144>; /* 8 32k periods */
  85. };
  86.  
  87. opp@1008000000 {
  88. opp-hz = /bits/ 64 <1008000000>;
  89. opp-microvolt = <1140000 1140000 1320000>;
  90. clock-latency-ns = <244144>; /* 8 32k periods */
  91. };
  92.  
  93. opp@1104000000 {
  94. opp-hz = /bits/ 64 <1104000000>;
  95. opp-microvolt = <1180000 1180000 1320000>;
  96. clock-latency-ns = <244144>; /* 8 32k periods */
  97. };
  98.  
  99. opp@1200000000 {
  100. opp-hz = /bits/ 64 <1200000000>;
  101. opp-microvolt = <1240000 1240000 1320000>;
  102. clock-latency-ns = <244144>; /* 8 32k periods */
  103. };
  104.  
  105. opp@1296000000 {
  106. opp-hz = /bits/ 64 <1296000000>;
  107. opp-microvolt = <1320000 1320000 1320000>;
  108. clock-latency-ns = <244144>; /* 8 32k periods */
  109. };
  110. };
  111.  
  112. cpus {
  113. #address-cells = <1>;
  114. #size-cells = <0>;
  115.  
  116. cpu0: cpu@0 {
  117. compatible = "arm,cortex-a7";
  118. device_type = "cpu";
  119. reg = <0>;
  120. clocks = <&ccu CLK_CPUX>;
  121. clock-names = "cpu";
  122. operating-points-v2 = <&cpu_opp_table>;
  123. cpu-supply = <&reg_cpu_fallback>;
  124. #cooling-cells = <2>;
  125. };
  126.  
  127. cpu@1 {
  128. compatible = "arm,cortex-a7";
  129. device_type = "cpu";
  130. reg = <1>;
  131. operating-points-v2 = <&cpu_opp_table>;
  132. };
  133.  
  134. cpu@2 {
  135. compatible = "arm,cortex-a7";
  136. device_type = "cpu";
  137. reg = <2>;
  138. operating-points-v2 = <&cpu_opp_table>;
  139. };
  140.  
  141. cpu@3 {
  142. compatible = "arm,cortex-a7";
  143. device_type = "cpu";
  144. reg = <3>;
  145. operating-points-v2 = <&cpu_opp_table>;
  146. };
  147. };
  148.  
  149. iio-hwmon {
  150. compatible = "iio-hwmon";
  151. io-channels = <&ths>;
  152. };
  153.  
  154. soc {
  155. ths: thermal-sensor@1c25000 {
  156. compatible = "allwinner,sun8i-h3-ths";
  157. reg = <0x01c25000 0x100>;
  158. clocks = <&ccu CLK_BUS_THS>, <&ccu CLK_THS>;
  159. clock-names = "bus", "mod";
  160. resets = <&ccu RST_BUS_THS>;
  161. #thermal-sensor-cells = <0>;
  162. #io-channel-cells = <0>;
  163. };
  164. };
  165.  
  166. thermal-zones {
  167. cpu-thermal {
  168. /* milliseconds */
  169. polling-delay-passive = <250>;
  170. polling-delay = <1000>;
  171. thermal-sensors = <&ths>;
  172.  
  173. trips {
  174. cpu_warm: cpu_warm {
  175. temperature = <65000>;
  176. hysteresis = <2000>;
  177. type = "passive";
  178. };
  179.  
  180. cpu_hot_pre: cpu_hot_pre {
  181. temperature = <70000>;
  182. hysteresis = <2000>;
  183. type = "passive";
  184. };
  185.  
  186. cpu_hot: cpu_hot {
  187. temperature = <75000>;
  188. hysteresis = <2000>;
  189. type = "passive";
  190. };
  191.  
  192. cpu_very_hot_pre: cpu_very_hot_pre {
  193. temperature = <85000>;
  194. hysteresis = <2000>;
  195. type = "passive";
  196. };
  197.  
  198. cpu_very_hot: cpu_very_hot {
  199. temperature = <90000>;
  200. hysteresis = <2000>;
  201. type = "passive";
  202. };
  203.  
  204. cpu_crit: cpu_crit {
  205. temperature = <105000>;
  206. hysteresis = <2000>;
  207. type = "critical";
  208. };
  209. };
  210.  
  211. cooling-maps {
  212. cpu_warm_limit_cpu {
  213. trip = <&cpu_warm>;
  214. cooling-device = <&cpu0 THERMAL_NO_LIMIT 2>;
  215. };
  216.  
  217. cpu_hot_pre_limit_cpu {
  218. trip = <&cpu_hot_pre>;
  219. cooling-device = <&cpu0 2 3>;
  220. };
  221.  
  222. cpu_hot_limit_cpu {
  223. trip = <&cpu_hot>;
  224. cooling-device = <&cpu0 3 4>;
  225. };
  226.  
  227. cpu_very_hot_pre_limit_cpu {
  228. trip = <&cpu_very_hot>;
  229. cooling-device = <&cpu0 5 6>;
  230. };
  231.  
  232. cpu_very_hot_limit_cpu {
  233. trip = <&cpu_very_hot>;
  234. cooling-device = <&cpu0 7 THERMAL_NO_LIMIT>;
  235. };
  236. };
  237. };
  238. };
  239.  
  240. soc {
  241. mali: gpu@1c40000 {
  242. compatible = "allwinner,sun8i-h3-mali",
  243. "allwinner,sun7i-a20-mali", "arm,mali-400";
  244. reg = <0x01c40000 0x10000>;
  245. interrupts = <GIC_SPI 97 IRQ_TYPE_LEVEL_HIGH>,
  246. <GIC_SPI 98 IRQ_TYPE_LEVEL_HIGH>,
  247. <GIC_SPI 99 IRQ_TYPE_LEVEL_HIGH>,
  248. <GIC_SPI 100 IRQ_TYPE_LEVEL_HIGH>,
  249. <GIC_SPI 102 IRQ_TYPE_LEVEL_HIGH>,
  250. <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>,
  251. <GIC_SPI 101 IRQ_TYPE_LEVEL_HIGH>;
  252. interrupt-names = "gp",
  253. "gpmmu",
  254. "pp0",
  255. "ppmmu0",
  256. "pp1",
  257. "ppmmu1",
  258. "pmu";
  259. clocks = <&ccu CLK_BUS_GPU>, <&ccu CLK_GPU>;
  260. clock-names = "bus", "core";
  261. resets = <&ccu RST_BUS_GPU>;
  262. memory-region = <&cma>;
  263.  
  264. assigned-clocks = <&ccu CLK_GPU>;
  265. assigned-clock-rates = <384000000>;
  266. };
  267. };
  268.  
  269. reserved-memory {
  270. #address-cells = <1>;
  271. #size-cells = <1>;
  272. ranges;
  273.  
  274. cma: linux,cma {
  275. compatible = "shared-dma-pool";
  276. reusable;
  277. size = <0x8000000>;
  278. alignment = <0x2000>;
  279. linux,cma-default;
  280. };
  281. };
  282.  
  283. timer {
  284. compatible = "arm,armv7-timer";
  285. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  286. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  287. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  288. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  289. };
  290.  
  291. reg_cpu_fallback: reg_cpu_fallback {
  292. compatible = "regulator-fixed";
  293. regulator-name = "vdd-cpux-dummy";
  294. regulator-min-microvolt = <1200000>;
  295. regulator-max-microvolt = <1200000>;
  296. };
  297. };
  298.  
  299. &ccu {
  300. compatible = "allwinner,sun8i-h3-ccu";
  301. };
  302.  
  303. &display_clocks {
  304. compatible = "allwinner,sun8i-a83t-de2-clk";
  305. };
  306.  
  307. &mixer1 {
  308. resets = <&display_clocks RST_WB>;
  309. };
  310.  
  311. &mmc0 {
  312. compatible = "allwinner,sun7i-a20-mmc";
  313. clocks = <&ccu CLK_BUS_MMC0>,
  314. <&ccu CLK_MMC0>,
  315. <&ccu CLK_MMC0_OUTPUT>,
  316. <&ccu CLK_MMC0_SAMPLE>;
  317. clock-names = "ahb",
  318. "mmc",
  319. "output",
  320. "sample";
  321. };
  322.  
  323. &mmc1 {
  324. compatible = "allwinner,sun7i-a20-mmc";
  325. clocks = <&ccu CLK_BUS_MMC1>,
  326. <&ccu CLK_MMC1>,
  327. <&ccu CLK_MMC1_OUTPUT>,
  328. <&ccu CLK_MMC1_SAMPLE>;
  329. clock-names = "ahb",
  330. "mmc",
  331. "output",
  332. "sample";
  333. };
  334.  
  335. &mmc2 {
  336. compatible = "allwinner,sun7i-a20-mmc";
  337. clocks = <&ccu CLK_BUS_MMC2>,
  338. <&ccu CLK_MMC2>,
  339. <&ccu CLK_MMC2_OUTPUT>,
  340. <&ccu CLK_MMC2_SAMPLE>;
  341. clock-names = "ahb",
  342. "mmc",
  343. "output",
  344. "sample";
  345. };
  346.  
  347. &pio {
  348. compatible = "allwinner,sun8i-h3-pinctrl";
  349. };
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement