sun50i-h6.dtsi 7.3 KB

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