sun50i-a100.dtsi 9.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394
  1. // SPDX-License-Identifier: (GPL-2.0+ or MIT)
  2. /*
  3. * Copyright (c) 2020 Yangtao Li <[email protected]>
  4. */
  5. #include <dt-bindings/interrupt-controller/arm-gic.h>
  6. #include <dt-bindings/clock/sun50i-a100-ccu.h>
  7. #include <dt-bindings/clock/sun50i-a100-r-ccu.h>
  8. #include <dt-bindings/reset/sun50i-a100-ccu.h>
  9. #include <dt-bindings/reset/sun50i-a100-r-ccu.h>
  10. / {
  11. interrupt-parent = <&gic>;
  12. #address-cells = <2>;
  13. #size-cells = <2>;
  14. cpus {
  15. #address-cells = <1>;
  16. #size-cells = <0>;
  17. cpu0: cpu@0 {
  18. compatible = "arm,cortex-a53";
  19. device_type = "cpu";
  20. reg = <0x0>;
  21. enable-method = "psci";
  22. };
  23. cpu@1 {
  24. compatible = "arm,cortex-a53";
  25. device_type = "cpu";
  26. reg = <0x1>;
  27. enable-method = "psci";
  28. };
  29. cpu@2 {
  30. compatible = "arm,cortex-a53";
  31. device_type = "cpu";
  32. reg = <0x2>;
  33. enable-method = "psci";
  34. };
  35. cpu@3 {
  36. compatible = "arm,cortex-a53";
  37. device_type = "cpu";
  38. reg = <0x3>;
  39. enable-method = "psci";
  40. };
  41. };
  42. psci {
  43. compatible = "arm,psci-1.0";
  44. method = "smc";
  45. };
  46. dcxo24M: dcxo24M-clk {
  47. compatible = "fixed-clock";
  48. clock-frequency = <24000000>;
  49. clock-output-names = "dcxo24M";
  50. #clock-cells = <0>;
  51. };
  52. iosc: internal-osc-clk {
  53. compatible = "fixed-clock";
  54. clock-frequency = <16000000>;
  55. clock-accuracy = <300000000>;
  56. clock-output-names = "iosc";
  57. #clock-cells = <0>;
  58. };
  59. osc32k: osc32k-clk {
  60. compatible = "fixed-clock";
  61. clock-frequency = <32768>;
  62. clock-output-names = "osc32k";
  63. #clock-cells = <0>;
  64. };
  65. timer {
  66. compatible = "arm,armv8-timer";
  67. interrupts = <GIC_PPI 13
  68. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  69. <GIC_PPI 14
  70. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  71. <GIC_PPI 11
  72. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>,
  73. <GIC_PPI 10
  74. (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
  75. };
  76. soc {
  77. compatible = "simple-bus";
  78. #address-cells = <1>;
  79. #size-cells = <1>;
  80. ranges = <0 0 0 0x3fffffff>;
  81. ccu: clock@3001000 {
  82. compatible = "allwinner,sun50i-a100-ccu";
  83. reg = <0x03001000 0x1000>;
  84. clocks = <&dcxo24M>, <&osc32k>, <&iosc>;
  85. clock-names = "hosc", "losc", "iosc";
  86. #clock-cells = <1>;
  87. #reset-cells = <1>;
  88. };
  89. dma: dma-controller@3002000 {
  90. compatible = "allwinner,sun50i-a100-dma";
  91. reg = <0x03002000 0x1000>;
  92. interrupts = <GIC_SPI 45 IRQ_TYPE_LEVEL_HIGH>;
  93. clocks = <&ccu CLK_BUS_DMA>, <&ccu CLK_MBUS_DMA>;
  94. clock-names = "bus", "mbus";
  95. resets = <&ccu RST_BUS_DMA>;
  96. dma-channels = <8>;
  97. dma-requests = <52>;
  98. #dma-cells = <1>;
  99. };
  100. gic: interrupt-controller@3021000 {
  101. compatible = "arm,gic-400";
  102. reg = <0x03021000 0x1000>, <0x03022000 0x2000>,
  103. <0x03024000 0x2000>, <0x03026000 0x2000>;
  104. interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) |
  105. IRQ_TYPE_LEVEL_HIGH)>;
  106. interrupt-controller;
  107. #interrupt-cells = <3>;
  108. };
  109. efuse@3006000 {
  110. compatible = "allwinner,sun50i-a100-sid",
  111. "allwinner,sun50i-a64-sid";
  112. reg = <0x03006000 0x1000>;
  113. #address-cells = <1>;
  114. #size-cells = <1>;
  115. ths_calibration: calib@14 {
  116. reg = <0x14 8>;
  117. };
  118. };
  119. pio: pinctrl@300b000 {
  120. compatible = "allwinner,sun50i-a100-pinctrl";
  121. reg = <0x0300b000 0x400>;
  122. interrupts = <GIC_SPI 54 IRQ_TYPE_LEVEL_HIGH>,
  123. <GIC_SPI 55 IRQ_TYPE_LEVEL_HIGH>,
  124. <GIC_SPI 56 IRQ_TYPE_LEVEL_HIGH>,
  125. <GIC_SPI 57 IRQ_TYPE_LEVEL_HIGH>,
  126. <GIC_SPI 58 IRQ_TYPE_LEVEL_HIGH>,
  127. <GIC_SPI 59 IRQ_TYPE_LEVEL_HIGH>,
  128. <GIC_SPI 60 IRQ_TYPE_LEVEL_HIGH>;
  129. clocks = <&ccu CLK_APB1>, <&dcxo24M>, <&osc32k>;
  130. clock-names = "apb", "hosc", "losc";
  131. gpio-controller;
  132. #gpio-cells = <3>;
  133. interrupt-controller;
  134. #interrupt-cells = <3>;
  135. uart0_pb_pins: uart0-pb-pins {
  136. pins = "PB9", "PB10";
  137. function = "uart0";
  138. };
  139. };
  140. uart0: serial@5000000 {
  141. compatible = "snps,dw-apb-uart";
  142. reg = <0x05000000 0x400>;
  143. interrupts = <GIC_SPI 0 IRQ_TYPE_LEVEL_HIGH>;
  144. reg-shift = <2>;
  145. reg-io-width = <4>;
  146. clocks = <&ccu CLK_BUS_UART0>;
  147. resets = <&ccu RST_BUS_UART0>;
  148. status = "disabled";
  149. };
  150. uart1: serial@5000400 {
  151. compatible = "snps,dw-apb-uart";
  152. reg = <0x05000400 0x400>;
  153. interrupts = <GIC_SPI 1 IRQ_TYPE_LEVEL_HIGH>;
  154. reg-shift = <2>;
  155. reg-io-width = <4>;
  156. clocks = <&ccu CLK_BUS_UART1>;
  157. resets = <&ccu RST_BUS_UART1>;
  158. status = "disabled";
  159. };
  160. uart2: serial@5000800 {
  161. compatible = "snps,dw-apb-uart";
  162. reg = <0x05000800 0x400>;
  163. interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
  164. reg-shift = <2>;
  165. reg-io-width = <4>;
  166. clocks = <&ccu CLK_BUS_UART2>;
  167. resets = <&ccu RST_BUS_UART2>;
  168. status = "disabled";
  169. };
  170. uart3: serial@5000c00 {
  171. compatible = "snps,dw-apb-uart";
  172. reg = <0x05000c00 0x400>;
  173. interrupts = <GIC_SPI 3 IRQ_TYPE_LEVEL_HIGH>;
  174. reg-shift = <2>;
  175. reg-io-width = <4>;
  176. clocks = <&ccu CLK_BUS_UART3>;
  177. resets = <&ccu RST_BUS_UART3>;
  178. status = "disabled";
  179. };
  180. uart4: serial@5001000 {
  181. compatible = "snps,dw-apb-uart";
  182. reg = <0x05001000 0x400>;
  183. interrupts = <GIC_SPI 4 IRQ_TYPE_LEVEL_HIGH>;
  184. reg-shift = <2>;
  185. reg-io-width = <4>;
  186. clocks = <&ccu CLK_BUS_UART4>;
  187. resets = <&ccu RST_BUS_UART4>;
  188. status = "disabled";
  189. };
  190. i2c0: i2c@5002000 {
  191. compatible = "allwinner,sun50i-a100-i2c",
  192. "allwinner,sun8i-v536-i2c",
  193. "allwinner,sun6i-a31-i2c";
  194. reg = <0x05002000 0x400>;
  195. interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>;
  196. clocks = <&ccu CLK_BUS_I2C0>;
  197. resets = <&ccu RST_BUS_I2C0>;
  198. dmas = <&dma 43>, <&dma 43>;
  199. dma-names = "rx", "tx";
  200. status = "disabled";
  201. #address-cells = <1>;
  202. #size-cells = <0>;
  203. };
  204. i2c1: i2c@5002400 {
  205. compatible = "allwinner,sun50i-a100-i2c",
  206. "allwinner,sun8i-v536-i2c",
  207. "allwinner,sun6i-a31-i2c";
  208. reg = <0x05002400 0x400>;
  209. interrupts = <GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
  210. clocks = <&ccu CLK_BUS_I2C1>;
  211. resets = <&ccu RST_BUS_I2C1>;
  212. dmas = <&dma 44>, <&dma 44>;
  213. dma-names = "rx", "tx";
  214. status = "disabled";
  215. #address-cells = <1>;
  216. #size-cells = <0>;
  217. };
  218. i2c2: i2c@5002800 {
  219. compatible = "allwinner,sun50i-a100-i2c",
  220. "allwinner,sun8i-v536-i2c",
  221. "allwinner,sun6i-a31-i2c";
  222. reg = <0x05002800 0x400>;
  223. interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>;
  224. clocks = <&ccu CLK_BUS_I2C2>;
  225. resets = <&ccu RST_BUS_I2C2>;
  226. dmas = <&dma 45>, <&dma 45>;
  227. dma-names = "rx", "tx";
  228. status = "disabled";
  229. #address-cells = <1>;
  230. #size-cells = <0>;
  231. };
  232. i2c3: i2c@5002c00 {
  233. compatible = "allwinner,sun50i-a100-i2c",
  234. "allwinner,sun8i-v536-i2c",
  235. "allwinner,sun6i-a31-i2c";
  236. reg = <0x05002c00 0x400>;
  237. interrupts = <GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
  238. clocks = <&ccu CLK_BUS_I2C3>;
  239. resets = <&ccu RST_BUS_I2C3>;
  240. dmas = <&dma 46>, <&dma 46>;
  241. dma-names = "rx", "tx";
  242. status = "disabled";
  243. #address-cells = <1>;
  244. #size-cells = <0>;
  245. };
  246. ths: thermal-sensor@5070400 {
  247. compatible = "allwinner,sun50i-a100-ths";
  248. reg = <0x05070400 0x100>;
  249. interrupts = <GIC_SPI 21 IRQ_TYPE_LEVEL_HIGH>;
  250. clocks = <&ccu CLK_BUS_THS>;
  251. clock-names = "bus";
  252. resets = <&ccu RST_BUS_THS>;
  253. nvmem-cells = <&ths_calibration>;
  254. nvmem-cell-names = "calibration";
  255. #thermal-sensor-cells = <1>;
  256. };
  257. r_ccu: clock@7010000 {
  258. compatible = "allwinner,sun50i-a100-r-ccu";
  259. reg = <0x07010000 0x300>;
  260. clocks = <&dcxo24M>, <&osc32k>, <&iosc>,
  261. <&ccu CLK_PLL_PERIPH0>;
  262. clock-names = "hosc", "losc", "iosc", "pll-periph";
  263. #clock-cells = <1>;
  264. #reset-cells = <1>;
  265. };
  266. r_intc: interrupt-controller@7010320 {
  267. compatible = "allwinner,sun50i-a100-nmi",
  268. "allwinner,sun9i-a80-nmi";
  269. interrupt-controller;
  270. #interrupt-cells = <2>;
  271. reg = <0x07010320 0xc>;
  272. interrupts = <GIC_SPI 103 IRQ_TYPE_LEVEL_HIGH>;
  273. };
  274. r_pio: pinctrl@7022000 {
  275. compatible = "allwinner,sun50i-a100-r-pinctrl";
  276. reg = <0x07022000 0x400>;
  277. interrupts = <GIC_SPI 111 IRQ_TYPE_LEVEL_HIGH>;
  278. clocks = <&r_ccu CLK_R_APB1>, <&dcxo24M>, <&osc32k>;
  279. clock-names = "apb", "hosc", "losc";
  280. gpio-controller;
  281. #gpio-cells = <3>;
  282. interrupt-controller;
  283. #interrupt-cells = <3>;
  284. r_i2c0_pins: r-i2c0-pins {
  285. pins = "PL0", "PL1";
  286. function = "s_i2c0";
  287. };
  288. r_i2c1_pins: r-i2c1-pins {
  289. pins = "PL8", "PL9";
  290. function = "s_i2c1";
  291. };
  292. };
  293. r_uart: serial@7080000 {
  294. compatible = "snps,dw-apb-uart";
  295. reg = <0x07080000 0x400>;
  296. interrupts = <GIC_SPI 112 IRQ_TYPE_LEVEL_HIGH>;
  297. reg-shift = <2>;
  298. reg-io-width = <4>;
  299. clocks = <&r_ccu CLK_R_APB2_UART>;
  300. resets = <&r_ccu RST_R_APB2_UART>;
  301. status = "disabled";
  302. };
  303. r_i2c0: i2c@7081400 {
  304. compatible = "allwinner,sun50i-a100-i2c",
  305. "allwinner,sun8i-v536-i2c",
  306. "allwinner,sun6i-a31-i2c";
  307. reg = <0x07081400 0x400>;
  308. interrupts = <GIC_SPI 113 IRQ_TYPE_LEVEL_HIGH>;
  309. clocks = <&r_ccu CLK_R_APB2_I2C0>;
  310. resets = <&r_ccu RST_R_APB2_I2C0>;
  311. dmas = <&dma 50>, <&dma 50>;
  312. dma-names = "rx", "tx";
  313. pinctrl-names = "default";
  314. pinctrl-0 = <&r_i2c0_pins>;
  315. status = "disabled";
  316. #address-cells = <1>;
  317. #size-cells = <0>;
  318. };
  319. r_i2c1: i2c@7081800 {
  320. compatible = "allwinner,sun50i-a100-i2c",
  321. "allwinner,sun8i-v536-i2c",
  322. "allwinner,sun6i-a31-i2c";
  323. reg = <0x07081800 0x400>;
  324. interrupts = <GIC_SPI 114 IRQ_TYPE_LEVEL_HIGH>;
  325. clocks = <&r_ccu CLK_R_APB2_I2C1>;
  326. resets = <&r_ccu RST_R_APB2_I2C1>;
  327. dmas = <&dma 51>, <&dma 51>;
  328. dma-names = "rx", "tx";
  329. pinctrl-names = "default";
  330. pinctrl-0 = <&r_i2c1_pins>;
  331. status = "disabled";
  332. #address-cells = <1>;
  333. #size-cells = <0>;
  334. };
  335. };
  336. thermal-zones {
  337. cpu-thermal {
  338. polling-delay-passive = <0>;
  339. polling-delay = <0>;
  340. thermal-sensors = <&ths 0>;
  341. };
  342. ddr-thermal {
  343. polling-delay-passive = <0>;
  344. polling-delay = <0>;
  345. thermal-sensors = <&ths 2>;
  346. };
  347. gpu-thermal {
  348. polling-delay-passive = <0>;
  349. polling-delay = <0>;
  350. thermal-sensors = <&ths 1>;
  351. };
  352. };
  353. };