sun50i-h6.dtsi 7.3 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299
  1. // SPDX-License-Identifier: (GPL-2.0+ or MIT)
  2. /*
  3. * Copyright (C) 2017 Icenowy Zheng <icenowy@aosc.io>
  4. */
  5. #include <dt-bindings/interrupt-controller/arm-gic.h>
  6. #include <dt-bindings/clock/sun50i-h6-ccu.h>
  7. #include <dt-bindings/clock/sun50i-h6-r-ccu.h>
  8. #include <dt-bindings/reset/sun50i-h6-ccu.h>
  9. #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
  10. / {
  11. interrupt-parent = <&gic>;
  12. #address-cells = <1>;
  13. #size-cells = <1>;
  14. cpus {
  15. #address-cells = <1>;
  16. #size-cells = <0>;
  17. cpu0: cpu@0 {
  18. compatible = "arm,cortex-a53", "arm,armv8";
  19. device_type = "cpu";
  20. reg = <0>;
  21. enable-method = "psci";
  22. };
  23. cpu1: cpu@1 {
  24. compatible = "arm,cortex-a53", "arm,armv8";
  25. device_type = "cpu";
  26. reg = <1>;
  27. enable-method = "psci";
  28. };
  29. cpu2: cpu@2 {
  30. compatible = "arm,cortex-a53", "arm,armv8";
  31. device_type = "cpu";
  32. reg = <2>;
  33. enable-method = "psci";
  34. };
  35. cpu3: cpu@3 {
  36. compatible = "arm,cortex-a53", "arm,armv8";
  37. device_type = "cpu";
  38. reg = <3>;
  39. enable-method = "psci";
  40. };
  41. };
  42. iosc: internal-osc-clk {
  43. #clock-cells = <0>;
  44. compatible = "fixed-clock";
  45. clock-frequency = <16000000>;
  46. clock-accuracy = <300000000>;
  47. clock-output-names = "iosc";
  48. };
  49. osc24M: osc24M_clk {
  50. #clock-cells = <0>;
  51. compatible = "fixed-clock";
  52. clock-frequency = <24000000>;
  53. clock-output-names = "osc24M";
  54. };
  55. osc32k: osc32k_clk {
  56. #clock-cells = <0>;
  57. compatible = "fixed-clock";
  58. clock-frequency = <32768>;
  59. clock-output-names = "osc32k";
  60. };
  61. pmu {
  62. compatible = "arm,cortex-a53-pmu",
  63. "arm,armv8-pmuv3";
  64. interrupts = <GIC_SPI 140 IRQ_TYPE_LEVEL_HIGH>,
  65. <GIC_SPI 141 IRQ_TYPE_LEVEL_HIGH>,
  66. <GIC_SPI 142 IRQ_TYPE_LEVEL_HIGH>,
  67. <GIC_SPI 143 IRQ_TYPE_LEVEL_HIGH>;
  68. interrupt-affinity = <&cpu0>, <&cpu1>, <&cpu2>, <&cpu3>;
  69. };
  70. psci {
  71. compatible = "arm,psci-0.2";
  72. method = "smc";
  73. };
  74. timer {
  75. compatible = "arm,armv8-timer";
  76. interrupts = <GIC_PPI 13
  77. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  78. <GIC_PPI 14
  79. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  80. <GIC_PPI 11
  81. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  82. <GIC_PPI 10
  83. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  84. };
  85. soc {
  86. compatible = "simple-bus";
  87. #address-cells = <1>;
  88. #size-cells = <1>;
  89. ranges;
  90. ccu: clock@3001000 {
  91. compatible = "allwinner,sun50i-h6-ccu";
  92. reg = <0x03001000 0x1000>;
  93. clocks = <&osc24M>, <&osc32k>, <&iosc>;
  94. clock-names = "hosc", "losc", "iosc";
  95. #clock-cells = <1>;
  96. #reset-cells = <1>;
  97. };
  98. pio: pinctrl@300b000 {
  99. compatible = "allwinner,sun50i-h6-pinctrl";
  100. reg = <0x0300b000 0x400>;
  101. interrupts = <GIC_SPI 51 IRQ_TYPE_LEVEL_HIGH>,
  102. <GIC_SPI 53 IRQ_TYPE_LEVEL_HIGH>,
  103. <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
  104. <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>;
  105. clocks = <&ccu CLK_APB1>, <&osc24M>, <&osc32k>;
  106. clock-names = "apb", "hosc", "losc";
  107. gpio-controller;
  108. #gpio-cells = <3>;
  109. interrupt-controller;
  110. #interrupt-cells = <3>;
  111. mmc0_pins: mmc0-pins {
  112. pins = "PF0", "PF1", "PF2", "PF3",
  113. "PF4", "PF5";
  114. function = "mmc0";
  115. drive-strength = <30>;
  116. bias-pull-up;
  117. };
  118. mmc2_pins: mmc2-pins {
  119. pins = "PC1", "PC4", "PC5", "PC6",
  120. "PC7", "PC8", "PC9", "PC10",
  121. "PC11", "PC12", "PC13", "PC14";
  122. function = "mmc2";
  123. drive-strength = <30>;
  124. bias-pull-up;
  125. };
  126. uart0_ph_pins: uart0-ph {
  127. pins = "PH0", "PH1";
  128. function = "uart0";
  129. };
  130. };
  131. gic: interrupt-controller@3021000 {
  132. compatible = "arm,gic-400";
  133. reg = <0x03021000 0x1000>,
  134. <0x03022000 0x2000>,
  135. <0x03024000 0x2000>,
  136. <0x03026000 0x2000>;
  137. interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  138. interrupt-controller;
  139. #interrupt-cells = <3>;
  140. };
  141. mmc0: mmc@4020000 {
  142. compatible = "allwinner,sun50i-h6-mmc",
  143. "allwinner,sun50i-a64-mmc";
  144. reg = <0x04020000 0x1000>;
  145. clocks = <&ccu CLK_BUS_MMC0>, <&ccu CLK_MMC0>;
  146. clock-names = "ahb", "mmc";
  147. resets = <&ccu RST_BUS_MMC0>;
  148. reset-names = "ahb";
  149. interrupts = <GIC_SPI 35 IRQ_TYPE_LEVEL_HIGH>;
  150. status = "disabled";
  151. #address-cells = <1>;
  152. #size-cells = <0>;
  153. };
  154. mmc1: mmc@4021000 {
  155. compatible = "allwinner,sun50i-h6-mmc",
  156. "allwinner,sun50i-a64-mmc";
  157. reg = <0x04021000 0x1000>;
  158. clocks = <&ccu CLK_BUS_MMC1>, <&ccu CLK_MMC1>;
  159. clock-names = "ahb", "mmc";
  160. resets = <&ccu RST_BUS_MMC1>;
  161. reset-names = "ahb";
  162. interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
  163. status = "disabled";
  164. #address-cells = <1>;
  165. #size-cells = <0>;
  166. };
  167. mmc2: mmc@4022000 {
  168. compatible = "allwinner,sun50i-h6-emmc",
  169. "allwinner,sun50i-a64-emmc";
  170. reg = <0x04022000 0x1000>;
  171. clocks = <&ccu CLK_BUS_MMC2>, <&ccu CLK_MMC2>;
  172. clock-names = "ahb", "mmc";
  173. resets = <&ccu RST_BUS_MMC2>;
  174. reset-names = "ahb";
  175. interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  176. status = "disabled";
  177. #address-cells = <1>;
  178. #size-cells = <0>;
  179. };
  180. uart0: serial@5000000 {
  181. compatible = "snps,dw-apb-uart";
  182. reg = <0x05000000 0x400>;
  183. interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
  184. reg-shift = <2>;
  185. reg-io-width = <4>;
  186. clocks = <&ccu CLK_BUS_UART0>;
  187. resets = <&ccu RST_BUS_UART0>;
  188. status = "disabled";
  189. };
  190. uart1: serial@5000400 {
  191. compatible = "snps,dw-apb-uart";
  192. reg = <0x05000400 0x400>;
  193. interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  194. reg-shift = <2>;
  195. reg-io-width = <4>;
  196. clocks = <&ccu CLK_BUS_UART1>;
  197. resets = <&ccu RST_BUS_UART1>;
  198. status = "disabled";
  199. };
  200. uart2: serial@5000800 {
  201. compatible = "snps,dw-apb-uart";
  202. reg = <0x05000800 0x400>;
  203. interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
  204. reg-shift = <2>;
  205. reg-io-width = <4>;
  206. clocks = <&ccu CLK_BUS_UART2>;
  207. resets = <&ccu RST_BUS_UART2>;
  208. status = "disabled";
  209. };
  210. uart3: serial@5000c00 {
  211. compatible = "snps,dw-apb-uart";
  212. reg = <0x05000c00 0x400>;
  213. interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
  214. reg-shift = <2>;
  215. reg-io-width = <4>;
  216. clocks = <&ccu CLK_BUS_UART3>;
  217. resets = <&ccu RST_BUS_UART3>;
  218. status = "disabled";
  219. };
  220. r_ccu: clock@7010000 {
  221. compatible = "allwinner,sun50i-h6-r-ccu";
  222. reg = <0x07010000 0x400>;
  223. clocks = <&osc24M>, <&osc32k>, <&iosc>,
  224. <&ccu CLK_PLL_PERIPH0>;
  225. clock-names = "hosc", "losc", "iosc", "pll-periph";
  226. #clock-cells = <1>;
  227. #reset-cells = <1>;
  228. };
  229. r_intc: interrupt-controller@7021000 {
  230. compatible = "allwinner,sun50i-h6-r-intc",
  231. "allwinner,sun6i-a31-r-intc";
  232. interrupt-controller;
  233. #interrupt-cells = <2>;
  234. reg = <0x07021000 0x400>;
  235. interrupts = <GIC_SPI 96 IRQ_TYPE_LEVEL_HIGH>;
  236. };
  237. r_pio: pinctrl@7022000 {
  238. compatible = "allwinner,sun50i-h6-r-pinctrl";
  239. reg = <0x07022000 0x400>;
  240. interrupts = <GIC_SPI 105 IRQ_TYPE_LEVEL_HIGH>,
  241. <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
  242. clocks = <&r_ccu CLK_R_APB1>, <&osc24M>, <&osc32k>;
  243. clock-names = "apb", "hosc", "losc";
  244. gpio-controller;
  245. #gpio-cells = <3>;
  246. interrupt-controller;
  247. #interrupt-cells = <3>;
  248. r_i2c_pins: r-i2c {
  249. pins = "PL0", "PL1";
  250. function = "s_i2c";
  251. };
  252. };
  253. r_i2c: i2c@7081400 {
  254. compatible = "allwinner,sun6i-a31-i2c";
  255. reg = <0x07081400 0x400>;
  256. interrupts = <GIC_SPI 107 IRQ_TYPE_LEVEL_HIGH>;
  257. clocks = <&r_ccu CLK_R_APB2_I2C>;
  258. resets = <&r_ccu RST_R_APB2_I2C>;
  259. pinctrl-names = "default";
  260. pinctrl-0 = <&r_i2c_pins>;
  261. status = "disabled";
  262. #address-cells = <1>;
  263. #size-cells = <0>;
  264. };
  265. };
  266. };