104-1-dt-sunxi-add-h3-dtsi.patch 14 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515
  1. From 318d93bc41823e86967c8251eef0444a72e4d687 Mon Sep 17 00:00:00 2001
  2. From: Jens Kuske <jenskuske@gmail.com>
  3. Date: Fri, 4 Dec 2015 22:24:42 +0100
  4. Subject: [PATCH] ARM: dts: sunxi: Add Allwinner H3 DTSI
  5. The Allwinner H3 is a home entertainment system oriented SoC with
  6. four Cortex-A7 cores and a Mali-400MP2 GPU.
  7. Signed-off-by: Jens Kuske <jenskuske@gmail.com>
  8. Signed-off-by: Maxime Ripard <maxime.ripard@free-electrons.com>
  9. ---
  10. arch/arm/boot/dts/sun8i-h3.dtsi | 497 ++++++++++++++++++++++++++++++++++++++++
  11. 1 file changed, 497 insertions(+)
  12. create mode 100644 arch/arm/boot/dts/sun8i-h3.dtsi
  13. --- /dev/null
  14. +++ b/arch/arm/boot/dts/sun8i-h3.dtsi
  15. @@ -0,0 +1,497 @@
  16. +/*
  17. + * Copyright (C) 2015 Jens Kuske <jenskuske@gmail.com>
  18. + *
  19. + * This file is dual-licensed: you can use it either under the terms
  20. + * of the GPL or the X11 license, at your option. Note that this dual
  21. + * licensing only applies to this file, and not this project as a
  22. + * whole.
  23. + *
  24. + * a) This file is free software; you can redistribute it and/or
  25. + * modify it under the terms of the GNU General Public License as
  26. + * published by the Free Software Foundation; either version 2 of the
  27. + * License, or (at your option) any later version.
  28. + *
  29. + * This file is distributed in the hope that it will be useful,
  30. + * but WITHOUT ANY WARRANTY; without even the implied warranty of
  31. + * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  32. + * GNU General Public License for more details.
  33. + *
  34. + * Or, alternatively,
  35. + *
  36. + * b) Permission is hereby granted, free of charge, to any person
  37. + * obtaining a copy of this software and associated documentation
  38. + * files (the "Software"), to deal in the Software without
  39. + * restriction, including without limitation the rights to use,
  40. + * copy, modify, merge, publish, distribute, sublicense, and/or
  41. + * sell copies of the Software, and to permit persons to whom the
  42. + * Software is furnished to do so, subject to the following
  43. + * conditions:
  44. + *
  45. + * The above copyright notice and this permission notice shall be
  46. + * included in all copies or substantial portions of the Software.
  47. + *
  48. + * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
  49. + * EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES
  50. + * OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
  51. + * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT
  52. + * HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY,
  53. + * WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
  54. + * FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
  55. + * OTHER DEALINGS IN THE SOFTWARE.
  56. + */
  57. +
  58. +#include "skeleton.dtsi"
  59. +
  60. +#include <dt-bindings/interrupt-controller/arm-gic.h>
  61. +#include <dt-bindings/pinctrl/sun4i-a10.h>
  62. +
  63. +/ {
  64. + interrupt-parent = <&gic>;
  65. +
  66. + cpus {
  67. + #address-cells = <1>;
  68. + #size-cells = <0>;
  69. +
  70. + cpu@0 {
  71. + compatible = "arm,cortex-a7";
  72. + device_type = "cpu";
  73. + reg = <0>;
  74. + };
  75. +
  76. + cpu@1 {
  77. + compatible = "arm,cortex-a7";
  78. + device_type = "cpu";
  79. + reg = <1>;
  80. + };
  81. +
  82. + cpu@2 {
  83. + compatible = "arm,cortex-a7";
  84. + device_type = "cpu";
  85. + reg = <2>;
  86. + };
  87. +
  88. + cpu@3 {
  89. + compatible = "arm,cortex-a7";
  90. + device_type = "cpu";
  91. + reg = <3>;
  92. + };
  93. + };
  94. +
  95. + timer {
  96. + compatible = "arm,armv7-timer";
  97. + interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  98. + <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  99. + <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
  100. + <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
  101. + };
  102. +
  103. + clocks {
  104. + #address-cells = <1>;
  105. + #size-cells = <1>;
  106. + ranges;
  107. +
  108. + osc24M: osc24M_clk {
  109. + #clock-cells = <0>;
  110. + compatible = "fixed-clock";
  111. + clock-frequency = <24000000>;
  112. + clock-output-names = "osc24M";
  113. + };
  114. +
  115. + osc32k: osc32k_clk {
  116. + #clock-cells = <0>;
  117. + compatible = "fixed-clock";
  118. + clock-frequency = <32768>;
  119. + clock-output-names = "osc32k";
  120. + };
  121. +
  122. + pll1: clk@01c20000 {
  123. + #clock-cells = <0>;
  124. + compatible = "allwinner,sun8i-a23-pll1-clk";
  125. + reg = <0x01c20000 0x4>;
  126. + clocks = <&osc24M>;
  127. + clock-output-names = "pll1";
  128. + };
  129. +
  130. + /* dummy clock until actually implemented */
  131. + pll5: pll5_clk {
  132. + #clock-cells = <0>;
  133. + compatible = "fixed-clock";
  134. + clock-frequency = <0>;
  135. + clock-output-names = "pll5";
  136. + };
  137. +
  138. + pll6: clk@01c20028 {
  139. + #clock-cells = <1>;
  140. + compatible = "allwinner,sun6i-a31-pll6-clk";
  141. + reg = <0x01c20028 0x4>;
  142. + clocks = <&osc24M>;
  143. + clock-output-names = "pll6", "pll6x2";
  144. + };
  145. +
  146. + pll6d2: pll6d2_clk {
  147. + #clock-cells = <0>;
  148. + compatible = "fixed-factor-clock";
  149. + clock-div = <2>;
  150. + clock-mult = <1>;
  151. + clocks = <&pll6 0>;
  152. + clock-output-names = "pll6d2";
  153. + };
  154. +
  155. + /* dummy clock until pll6 can be reused */
  156. + pll8: pll8_clk {
  157. + #clock-cells = <0>;
  158. + compatible = "fixed-clock";
  159. + clock-frequency = <1>;
  160. + clock-output-names = "pll8";
  161. + };
  162. +
  163. + cpu: cpu_clk@01c20050 {
  164. + #clock-cells = <0>;
  165. + compatible = "allwinner,sun4i-a10-cpu-clk";
  166. + reg = <0x01c20050 0x4>;
  167. + clocks = <&osc32k>, <&osc24M>, <&pll1>, <&pll1>;
  168. + clock-output-names = "cpu";
  169. + };
  170. +
  171. + axi: axi_clk@01c20050 {
  172. + #clock-cells = <0>;
  173. + compatible = "allwinner,sun4i-a10-axi-clk";
  174. + reg = <0x01c20050 0x4>;
  175. + clocks = <&cpu>;
  176. + clock-output-names = "axi";
  177. + };
  178. +
  179. + ahb1: ahb1_clk@01c20054 {
  180. + #clock-cells = <0>;
  181. + compatible = "allwinner,sun6i-a31-ahb1-clk";
  182. + reg = <0x01c20054 0x4>;
  183. + clocks = <&osc32k>, <&osc24M>, <&axi>, <&pll6 0>;
  184. + clock-output-names = "ahb1";
  185. + };
  186. +
  187. + ahb2: ahb2_clk@01c2005c {
  188. + #clock-cells = <0>;
  189. + compatible = "allwinner,sun8i-h3-ahb2-clk";
  190. + reg = <0x01c2005c 0x4>;
  191. + clocks = <&ahb1>, <&pll6d2>;
  192. + clock-output-names = "ahb2";
  193. + };
  194. +
  195. + apb1: apb1_clk@01c20054 {
  196. + #clock-cells = <0>;
  197. + compatible = "allwinner,sun4i-a10-apb0-clk";
  198. + reg = <0x01c20054 0x4>;
  199. + clocks = <&ahb1>;
  200. + clock-output-names = "apb1";
  201. + };
  202. +
  203. + apb2: apb2_clk@01c20058 {
  204. + #clock-cells = <0>;
  205. + compatible = "allwinner,sun4i-a10-apb1-clk";
  206. + reg = <0x01c20058 0x4>;
  207. + clocks = <&osc32k>, <&osc24M>, <&pll6 0>, <&pll6 0>;
  208. + clock-output-names = "apb2";
  209. + };
  210. +
  211. + bus_gates: clk@01c20060 {
  212. + #clock-cells = <1>;
  213. + compatible = "allwinner,sun8i-h3-bus-gates-clk";
  214. + reg = <0x01c20060 0x14>;
  215. + clocks = <&ahb1>, <&ahb2>, <&apb1>, <&apb2>;
  216. + clock-names = "ahb1", "ahb2", "apb1", "apb2";
  217. + clock-indices = <5>, <6>, <8>,
  218. + <9>, <10>, <13>,
  219. + <14>, <17>, <18>,
  220. + <19>, <20>,
  221. + <21>, <23>,
  222. + <24>, <25>,
  223. + <26>, <27>,
  224. + <28>, <29>,
  225. + <30>, <31>, <32>,
  226. + <35>, <36>, <37>,
  227. + <40>, <41>, <43>,
  228. + <44>, <52>, <53>,
  229. + <54>, <64>,
  230. + <65>, <69>, <72>,
  231. + <76>, <77>, <78>,
  232. + <96>, <97>, <98>,
  233. + <112>, <113>,
  234. + <114>, <115>,
  235. + <116>, <128>, <135>;
  236. + clock-output-names = "bus_ce", "bus_dma", "bus_mmc0",
  237. + "bus_mmc1", "bus_mmc2", "bus_nand",
  238. + "bus_sdram", "bus_gmac", "bus_ts",
  239. + "bus_hstimer", "bus_spi0",
  240. + "bus_spi1", "bus_otg",
  241. + "bus_otg_ehci0", "bus_ehci1",
  242. + "bus_ehci2", "bus_ehci3",
  243. + "bus_otg_ohci0", "bus_ohci1",
  244. + "bus_ohci2", "bus_ohci3", "bus_ve",
  245. + "bus_lcd0", "bus_lcd1", "bus_deint",
  246. + "bus_csi", "bus_tve", "bus_hdmi",
  247. + "bus_de", "bus_gpu", "bus_msgbox",
  248. + "bus_spinlock", "bus_codec",
  249. + "bus_spdif", "bus_pio", "bus_ths",
  250. + "bus_i2s0", "bus_i2s1", "bus_i2s2",
  251. + "bus_i2c0", "bus_i2c1", "bus_i2c2",
  252. + "bus_uart0", "bus_uart1",
  253. + "bus_uart2", "bus_uart3",
  254. + "bus_scr", "bus_ephy", "bus_dbg";
  255. + };
  256. +
  257. + mmc0_clk: clk@01c20088 {
  258. + #clock-cells = <1>;
  259. + compatible = "allwinner,sun4i-a10-mmc-clk";
  260. + reg = <0x01c20088 0x4>;
  261. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  262. + clock-output-names = "mmc0",
  263. + "mmc0_output",
  264. + "mmc0_sample";
  265. + };
  266. +
  267. + mmc1_clk: clk@01c2008c {
  268. + #clock-cells = <1>;
  269. + compatible = "allwinner,sun4i-a10-mmc-clk";
  270. + reg = <0x01c2008c 0x4>;
  271. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  272. + clock-output-names = "mmc1",
  273. + "mmc1_output",
  274. + "mmc1_sample";
  275. + };
  276. +
  277. + mmc2_clk: clk@01c20090 {
  278. + #clock-cells = <1>;
  279. + compatible = "allwinner,sun4i-a10-mmc-clk";
  280. + reg = <0x01c20090 0x4>;
  281. + clocks = <&osc24M>, <&pll6 0>, <&pll8>;
  282. + clock-output-names = "mmc2",
  283. + "mmc2_output",
  284. + "mmc2_sample";
  285. + };
  286. +
  287. + mbus_clk: clk@01c2015c {
  288. + #clock-cells = <0>;
  289. + compatible = "allwinner,sun8i-a23-mbus-clk";
  290. + reg = <0x01c2015c 0x4>;
  291. + clocks = <&osc24M>, <&pll6 1>, <&pll5>;
  292. + clock-output-names = "mbus";
  293. + };
  294. + };
  295. +
  296. + soc {
  297. + compatible = "simple-bus";
  298. + #address-cells = <1>;
  299. + #size-cells = <1>;
  300. + ranges;
  301. +
  302. + dma: dma-controller@01c02000 {
  303. + compatible = "allwinner,sun8i-h3-dma";
  304. + reg = <0x01c02000 0x1000>;
  305. + interrupts = <GIC_SPI 50 IRQ_TYPE_LEVEL_HIGH>;
  306. + clocks = <&bus_gates 6>;
  307. + resets = <&ahb_rst 6>;
  308. + #dma-cells = <1>;
  309. + };
  310. +
  311. + mmc0: mmc@01c0f000 {
  312. + compatible = "allwinner,sun5i-a13-mmc";
  313. + reg = <0x01c0f000 0x1000>;
  314. + clocks = <&bus_gates 8>,
  315. + <&mmc0_clk 0>,
  316. + <&mmc0_clk 1>,
  317. + <&mmc0_clk 2>;
  318. + clock-names = "ahb",
  319. + "mmc",
  320. + "output",
  321. + "sample";
  322. + resets = <&ahb_rst 8>;
  323. + reset-names = "ahb";
  324. + interrupts = <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
  325. + status = "disabled";
  326. + #address-cells = <1>;
  327. + #size-cells = <0>;
  328. + };
  329. +
  330. + mmc1: mmc@01c10000 {
  331. + compatible = "allwinner,sun5i-a13-mmc";
  332. + reg = <0x01c10000 0x1000>;
  333. + clocks = <&bus_gates 9>,
  334. + <&mmc1_clk 0>,
  335. + <&mmc1_clk 1>,
  336. + <&mmc1_clk 2>;
  337. + clock-names = "ahb",
  338. + "mmc",
  339. + "output",
  340. + "sample";
  341. + resets = <&ahb_rst 9>;
  342. + reset-names = "ahb";
  343. + interrupts = <GIC_SPI 61 IRQ_TYPE_LEVEL_HIGH>;
  344. + status = "disabled";
  345. + #address-cells = <1>;
  346. + #size-cells = <0>;
  347. + };
  348. +
  349. + mmc2: mmc@01c11000 {
  350. + compatible = "allwinner,sun5i-a13-mmc";
  351. + reg = <0x01c11000 0x1000>;
  352. + clocks = <&bus_gates 10>,
  353. + <&mmc2_clk 0>,
  354. + <&mmc2_clk 1>,
  355. + <&mmc2_clk 2>;
  356. + clock-names = "ahb",
  357. + "mmc",
  358. + "output",
  359. + "sample";
  360. + resets = <&ahb_rst 10>;
  361. + reset-names = "ahb";
  362. + interrupts = <GIC_SPI 62 IRQ_TYPE_LEVEL_HIGH>;
  363. + status = "disabled";
  364. + #address-cells = <1>;
  365. + #size-cells = <0>;
  366. + };
  367. +
  368. + pio: pinctrl@01c20800 {
  369. + compatible = "allwinner,sun8i-h3-pinctrl";
  370. + reg = <0x01c20800 0x400>;
  371. + interrupts = <GIC_SPI 11 IRQ_TYPE_LEVEL_HIGH>,
  372. + <GIC_SPI 17 IRQ_TYPE_LEVEL_HIGH>;
  373. + clocks = <&bus_gates 69>;
  374. + gpio-controller;
  375. + #gpio-cells = <3>;
  376. + interrupt-controller;
  377. + #interrupt-cells = <2>;
  378. +
  379. + uart0_pins_a: uart0@0 {
  380. + allwinner,pins = "PA4", "PA5";
  381. + allwinner,function = "uart0";
  382. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  383. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  384. + };
  385. +
  386. + mmc0_pins_a: mmc0@0 {
  387. + allwinner,pins = "PF0", "PF1", "PF2", "PF3",
  388. + "PF4", "PF5";
  389. + allwinner,function = "mmc0";
  390. + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  391. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  392. + };
  393. +
  394. + mmc0_cd_pin: mmc0_cd_pin@0 {
  395. + allwinner,pins = "PF6";
  396. + allwinner,function = "gpio_in";
  397. + allwinner,drive = <SUN4I_PINCTRL_10_MA>;
  398. + allwinner,pull = <SUN4I_PINCTRL_PULL_UP>;
  399. + };
  400. +
  401. + mmc1_pins_a: mmc1@0 {
  402. + allwinner,pins = "PG0", "PG1", "PG2", "PG3",
  403. + "PG4", "PG5";
  404. + allwinner,function = "mmc1";
  405. + allwinner,drive = <SUN4I_PINCTRL_30_MA>;
  406. + allwinner,pull = <SUN4I_PINCTRL_NO_PULL>;
  407. + };
  408. + };
  409. +
  410. + ahb_rst: reset@01c202c0 {
  411. + #reset-cells = <1>;
  412. + compatible = "allwinner,sun6i-a31-ahb1-reset";
  413. + reg = <0x01c202c0 0xc>;
  414. + };
  415. +
  416. + apb1_rst: reset@01c202d0 {
  417. + #reset-cells = <1>;
  418. + compatible = "allwinner,sun6i-a31-clock-reset";
  419. + reg = <0x01c202d0 0x4>;
  420. + };
  421. +
  422. + apb2_rst: reset@01c202d8 {
  423. + #reset-cells = <1>;
  424. + compatible = "allwinner,sun6i-a31-clock-reset";
  425. + reg = <0x01c202d8 0x4>;
  426. + };
  427. +
  428. + timer@01c20c00 {
  429. + compatible = "allwinner,sun4i-a10-timer";
  430. + reg = <0x01c20c00 0xa0>;
  431. + interrupts = <GIC_SPI 18 IRQ_TYPE_LEVEL_HIGH>,
  432. + <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
  433. + clocks = <&osc24M>;
  434. + };
  435. +
  436. + wdt0: watchdog@01c20ca0 {
  437. + compatible = "allwinner,sun6i-a31-wdt";
  438. + reg = <0x01c20ca0 0x20>;
  439. + interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
  440. + };
  441. +
  442. + uart0: serial@01c28000 {
  443. + compatible = "snps,dw-apb-uart";
  444. + reg = <0x01c28000 0x400>;
  445. + interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
  446. + reg-shift = <2>;
  447. + reg-io-width = <4>;
  448. + clocks = <&bus_gates 112>;
  449. + resets = <&apb2_rst 16>;
  450. + dmas = <&dma 6>, <&dma 6>;
  451. + dma-names = "rx", "tx";
  452. + status = "disabled";
  453. + };
  454. +
  455. + uart1: serial@01c28400 {
  456. + compatible = "snps,dw-apb-uart";
  457. + reg = <0x01c28400 0x400>;
  458. + interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  459. + reg-shift = <2>;
  460. + reg-io-width = <4>;
  461. + clocks = <&bus_gates 113>;
  462. + resets = <&apb2_rst 17>;
  463. + dmas = <&dma 7>, <&dma 7>;
  464. + dma-names = "rx", "tx";
  465. + status = "disabled";
  466. + };
  467. +
  468. + uart2: serial@01c28800 {
  469. + compatible = "snps,dw-apb-uart";
  470. + reg = <0x01c28800 0x400>;
  471. + interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
  472. + reg-shift = <2>;
  473. + reg-io-width = <4>;
  474. + clocks = <&bus_gates 114>;
  475. + resets = <&apb2_rst 18>;
  476. + dmas = <&dma 8>, <&dma 8>;
  477. + dma-names = "rx", "tx";
  478. + status = "disabled";
  479. + };
  480. +
  481. + uart3: serial@01c28c00 {
  482. + compatible = "snps,dw-apb-uart";
  483. + reg = <0x01c28c00 0x400>;
  484. + interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
  485. + reg-shift = <2>;
  486. + reg-io-width = <4>;
  487. + clocks = <&bus_gates 115>;
  488. + resets = <&apb2_rst 19>;
  489. + dmas = <&dma 9>, <&dma 9>;
  490. + dma-names = "rx", "tx";
  491. + status = "disabled";
  492. + };
  493. +
  494. + gic: interrupt-controller@01c81000 {
  495. + compatible = "arm,cortex-a7-gic", "arm,cortex-a15-gic";
  496. + reg = <0x01c81000 0x1000>,
  497. + <0x01c82000 0x1000>,
  498. + <0x01c84000 0x2000>,
  499. + <0x01c86000 0x2000>;
  500. + interrupt-controller;
  501. + #interrupt-cells = <3>;
  502. + interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  503. + };
  504. +
  505. + rtc: rtc@01f00000 {
  506. + compatible = "allwinner,sun6i-a31-rtc";
  507. + reg = <0x01f00000 0x54>;
  508. + interrupts = <GIC_SPI 40 IRQ_TYPE_LEVEL_HIGH>,
  509. + <GIC_SPI 41 IRQ_TYPE_LEVEL_HIGH>;
  510. + };
  511. + };
  512. +};