bcm2712.dtsi 7.7 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286
  1. // SPDX-License-Identifier: (GPL-2.0 OR MIT)
  2. #include <dt-bindings/interrupt-controller/arm-gic.h>
  3. / {
  4. compatible = "brcm,bcm2712";
  5. #address-cells = <2>;
  6. #size-cells = <2>;
  7. interrupt-parent = <&gicv2>;
  8. clocks {
  9. /* The oscillator is the root of the clock tree. */
  10. clk_osc: clk-osc {
  11. compatible = "fixed-clock";
  12. #clock-cells = <0>;
  13. clock-output-names = "osc";
  14. clock-frequency = <54000000>;
  15. };
  16. clk_vpu: clk-vpu {
  17. compatible = "fixed-clock";
  18. #clock-cells = <0>;
  19. clock-frequency = <750000000>;
  20. clock-output-names = "vpu-clock";
  21. };
  22. clk_uart: clk-uart {
  23. compatible = "fixed-clock";
  24. #clock-cells = <0>;
  25. clock-frequency = <9216000>;
  26. clock-output-names = "uart-clock";
  27. };
  28. clk_emmc2: clk-emmc2 {
  29. compatible = "fixed-clock";
  30. #clock-cells = <0>;
  31. clock-frequency = <200000000>;
  32. clock-output-names = "emmc2-clock";
  33. };
  34. };
  35. cpus: cpus {
  36. #address-cells = <1>;
  37. #size-cells = <0>;
  38. /* Source for L1 d/i cache-line-size, cache-sets, cache-size
  39. * https://developer.arm.com/documentation/100798/0401/L1-memory-system/About-the-L1-memory-system?lang=en
  40. * Source for L2 cache-line-size and cache-sets:
  41. * https://developer.arm.com/documentation/100798/0401/L2-memory-system/About-the-L2-memory-system?lang=en
  42. * and for cache-size:
  43. * https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712
  44. */
  45. cpu0: cpu@0 {
  46. device_type = "cpu";
  47. compatible = "arm,cortex-a76";
  48. reg = <0x000>;
  49. enable-method = "psci";
  50. d-cache-size = <0x10000>;
  51. d-cache-line-size = <64>;
  52. d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  53. i-cache-size = <0x10000>;
  54. i-cache-line-size = <64>;
  55. i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  56. next-level-cache = <&l2_cache_l0>;
  57. l2_cache_l0: l2-cache-l0 {
  58. compatible = "cache";
  59. cache-size = <0x80000>;
  60. cache-line-size = <64>;
  61. cache-sets = <1024>; //512KiB(size)/64(line-size)=8192ways/8-way set
  62. cache-level = <2>;
  63. cache-unified;
  64. next-level-cache = <&l3_cache>;
  65. };
  66. };
  67. cpu1: cpu@1 {
  68. device_type = "cpu";
  69. compatible = "arm,cortex-a76";
  70. reg = <0x100>;
  71. enable-method = "psci";
  72. d-cache-size = <0x10000>;
  73. d-cache-line-size = <64>;
  74. d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  75. i-cache-size = <0x10000>;
  76. i-cache-line-size = <64>;
  77. i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  78. next-level-cache = <&l2_cache_l1>;
  79. l2_cache_l1: l2-cache-l1 {
  80. compatible = "cache";
  81. cache-size = <0x80000>;
  82. cache-line-size = <64>;
  83. cache-sets = <1024>; //512KiB(size)/64(line-size)=8192ways/8-way set
  84. cache-level = <2>;
  85. cache-unified;
  86. next-level-cache = <&l3_cache>;
  87. };
  88. };
  89. cpu2: cpu@2 {
  90. device_type = "cpu";
  91. compatible = "arm,cortex-a76";
  92. reg = <0x200>;
  93. enable-method = "psci";
  94. d-cache-size = <0x10000>;
  95. d-cache-line-size = <64>;
  96. d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  97. i-cache-size = <0x10000>;
  98. i-cache-line-size = <64>;
  99. i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  100. next-level-cache = <&l2_cache_l2>;
  101. l2_cache_l2: l2-cache-l2 {
  102. compatible = "cache";
  103. cache-size = <0x80000>;
  104. cache-line-size = <64>;
  105. cache-sets = <1024>; //512KiB(size)/64(line-size)=8192ways/8-way set
  106. cache-level = <2>;
  107. cache-unified;
  108. next-level-cache = <&l3_cache>;
  109. };
  110. };
  111. cpu3: cpu@3 {
  112. device_type = "cpu";
  113. compatible = "arm,cortex-a76";
  114. reg = <0x300>;
  115. enable-method = "psci";
  116. d-cache-size = <0x10000>;
  117. d-cache-line-size = <64>;
  118. d-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  119. i-cache-size = <0x10000>;
  120. i-cache-line-size = <64>;
  121. i-cache-sets = <256>; // 64KiB(size)/64(line-size)=1024ways/4-way set
  122. next-level-cache = <&l2_cache_l3>;
  123. l2_cache_l3: l2-cache-l3 {
  124. compatible = "cache";
  125. cache-size = <0x80000>;
  126. cache-line-size = <64>;
  127. cache-sets = <1024>; //512KiB(size)/64(line-size)=8192ways/8-way set
  128. cache-level = <2>;
  129. cache-unified;
  130. next-level-cache = <&l3_cache>;
  131. };
  132. };
  133. /* Source for cache-line-size and cache-sets:
  134. * https://developer.arm.com/documentation/100453/0401/L3-cache?lang=en
  135. * Source for cache-size:
  136. * https://www.raspberrypi.com/documentation/computers/processors.html#bcm2712
  137. */
  138. l3_cache: l3-cache {
  139. compatible = "cache";
  140. cache-size = <0x200000>;
  141. cache-line-size = <64>;
  142. cache-sets = <2048>; // 2MiB(size)/64(line-size)=32768ways/16-way set
  143. cache-level = <3>;
  144. cache-unified;
  145. };
  146. };
  147. psci {
  148. method = "smc";
  149. compatible = "arm,psci-1.0", "arm,psci-0.2";
  150. };
  151. rmem: reserved-memory {
  152. ranges;
  153. #address-cells = <2>;
  154. #size-cells = <2>;
  155. atf@0 {
  156. reg = <0x0 0x0 0x0 0x80000>;
  157. no-map;
  158. };
  159. cma: linux,cma {
  160. compatible = "shared-dma-pool";
  161. size = <0x0 0x4000000>; /* 64MB */
  162. reusable;
  163. linux,cma-default;
  164. alloc-ranges = <0x0 0x00000000 0x0 0x40000000>;
  165. };
  166. };
  167. soc: soc@107c000000 {
  168. compatible = "simple-bus";
  169. ranges = <0x00000000 0x10 0x00000000 0x80000000>;
  170. #address-cells = <1>;
  171. #size-cells = <1>;
  172. sdio1: mmc@fff000 {
  173. compatible = "brcm,bcm2712-sdhci",
  174. "brcm,sdhci-brcmstb";
  175. reg = <0x00fff000 0x260>,
  176. <0x00fff400 0x200>;
  177. reg-names = "host", "cfg";
  178. interrupts = <GIC_SPI 273 IRQ_TYPE_LEVEL_HIGH>;
  179. clocks = <&clk_emmc2>;
  180. clock-names = "sw_sdio";
  181. mmc-ddr-3_3v;
  182. };
  183. system_timer: timer@7c003000 {
  184. compatible = "brcm,bcm2835-system-timer";
  185. reg = <0x7c003000 0x1000>;
  186. interrupts = <GIC_SPI 64 IRQ_TYPE_LEVEL_HIGH>,
  187. <GIC_SPI 65 IRQ_TYPE_LEVEL_HIGH>,
  188. <GIC_SPI 66 IRQ_TYPE_LEVEL_HIGH>,
  189. <GIC_SPI 67 IRQ_TYPE_LEVEL_HIGH>;
  190. clock-frequency = <1000000>;
  191. };
  192. mailbox: mailbox@7c013880 {
  193. compatible = "brcm,bcm2835-mbox";
  194. reg = <0x7c013880 0x40>;
  195. interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
  196. #mbox-cells = <0>;
  197. };
  198. local_intc: interrupt-controller@7cd00000 {
  199. compatible = "brcm,bcm2836-l1-intc";
  200. reg = <0x7cd00000 0x100>;
  201. };
  202. uart10: serial@7d001000 {
  203. compatible = "arm,pl011", "arm,primecell";
  204. reg = <0x7d001000 0x200>;
  205. interrupts = <GIC_SPI 121 IRQ_TYPE_LEVEL_HIGH>;
  206. clocks = <&clk_uart>, <&clk_vpu>;
  207. clock-names = "uartclk", "apb_pclk";
  208. arm,primecell-periphid = <0x00341011>;
  209. status = "disabled";
  210. };
  211. interrupt-controller@7d517000 {
  212. compatible = "brcm,bcm7271-l2-intc";
  213. reg = <0x7d517000 0x10>;
  214. interrupts = <GIC_SPI 247 IRQ_TYPE_LEVEL_HIGH>;
  215. interrupt-controller;
  216. #interrupt-cells = <1>;
  217. };
  218. gio_aon: gpio@7d517c00 {
  219. compatible = "brcm,bcm7445-gpio", "brcm,brcmstb-gpio";
  220. reg = <0x7d517c00 0x40>;
  221. gpio-controller;
  222. #gpio-cells = <2>;
  223. brcm,gpio-bank-widths = <17 6>;
  224. /* The lack of 'interrupt-controller' property here is intended:
  225. * don't use GIO_AON as an interrupt controller because it will
  226. * clash with the firmware monitoring the PMIC interrupt via the VPU.
  227. */
  228. };
  229. gicv2: interrupt-controller@7fff9000 {
  230. compatible = "arm,gic-400";
  231. reg = <0x7fff9000 0x1000>,
  232. <0x7fffa000 0x2000>,
  233. <0x7fffc000 0x2000>,
  234. <0x7fffe000 0x2000>;
  235. interrupt-controller;
  236. #address-cells = <0>;
  237. interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) |
  238. IRQ_TYPE_LEVEL_HIGH)>;
  239. #interrupt-cells = <3>;
  240. };
  241. };
  242. timer {
  243. compatible = "arm,armv8-timer";
  244. interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) |
  245. IRQ_TYPE_LEVEL_LOW)>,
  246. <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) |
  247. IRQ_TYPE_LEVEL_LOW)>,
  248. <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) |
  249. IRQ_TYPE_LEVEL_LOW)>,
  250. <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) |
  251. IRQ_TYPE_LEVEL_LOW)>,
  252. <GIC_PPI 12 (GIC_CPU_MASK_SIMPLE(4) |
  253. IRQ_TYPE_LEVEL_LOW)>;
  254. };
  255. };