bcm2837.dtsi 4.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. #include "bcm283x.dtsi"
  2. #include "bcm2835-common.dtsi"
  3. #include "bcm2835-rpi-common.dtsi"
  4. / {
  5. compatible = "brcm,bcm2837";
  6. soc {
  7. ranges = <0x7e000000 0x3f000000 0x1000000>,
  8. <0x40000000 0x40000000 0x00001000>;
  9. dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
  10. local_intc: local_intc@40000000 {
  11. compatible = "brcm,bcm2836-l1-intc";
  12. reg = <0x40000000 0x100>;
  13. interrupt-controller;
  14. #interrupt-cells = <2>;
  15. interrupt-parent = <&local_intc>;
  16. };
  17. };
  18. arm-pmu {
  19. compatible = "arm,cortex-a53-pmu";
  20. interrupt-parent = <&local_intc>;
  21. interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
  22. };
  23. timer {
  24. compatible = "arm,armv7-timer";
  25. interrupt-parent = <&local_intc>;
  26. interrupts = <0 IRQ_TYPE_LEVEL_HIGH>, // PHYS_SECURE_PPI
  27. <1 IRQ_TYPE_LEVEL_HIGH>, // PHYS_NONSECURE_PPI
  28. <3 IRQ_TYPE_LEVEL_HIGH>, // VIRT_PPI
  29. <2 IRQ_TYPE_LEVEL_HIGH>; // HYP_PPI
  30. always-on;
  31. };
  32. cpus: cpus {
  33. #address-cells = <1>;
  34. #size-cells = <0>;
  35. enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit
  36. /* Source for d/i-cache-line-size and d/i-cache-sets
  37. * https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system
  38. * /about-the-l1-memory-system?lang=en
  39. *
  40. * Source for d/i-cache-size
  41. * https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks
  42. */
  43. cpu0: cpu@0 {
  44. device_type = "cpu";
  45. compatible = "arm,cortex-a53";
  46. reg = <0>;
  47. enable-method = "spin-table";
  48. cpu-release-addr = <0x0 0x000000d8>;
  49. d-cache-size = <0x8000>;
  50. d-cache-line-size = <64>;
  51. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  52. i-cache-size = <0x8000>;
  53. i-cache-line-size = <64>;
  54. i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
  55. next-level-cache = <&l2>;
  56. };
  57. cpu1: cpu@1 {
  58. device_type = "cpu";
  59. compatible = "arm,cortex-a53";
  60. reg = <1>;
  61. enable-method = "spin-table";
  62. cpu-release-addr = <0x0 0x000000e0>;
  63. d-cache-size = <0x8000>;
  64. d-cache-line-size = <64>;
  65. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  66. i-cache-size = <0x8000>;
  67. i-cache-line-size = <64>;
  68. i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
  69. next-level-cache = <&l2>;
  70. };
  71. cpu2: cpu@2 {
  72. device_type = "cpu";
  73. compatible = "arm,cortex-a53";
  74. reg = <2>;
  75. enable-method = "spin-table";
  76. cpu-release-addr = <0x0 0x000000e8>;
  77. d-cache-size = <0x8000>;
  78. d-cache-line-size = <64>;
  79. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  80. i-cache-size = <0x8000>;
  81. i-cache-line-size = <64>;
  82. i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
  83. next-level-cache = <&l2>;
  84. };
  85. cpu3: cpu@3 {
  86. device_type = "cpu";
  87. compatible = "arm,cortex-a53";
  88. reg = <3>;
  89. enable-method = "spin-table";
  90. cpu-release-addr = <0x0 0x000000f0>;
  91. d-cache-size = <0x8000>;
  92. d-cache-line-size = <64>;
  93. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  94. i-cache-size = <0x8000>;
  95. i-cache-line-size = <64>;
  96. i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set
  97. next-level-cache = <&l2>;
  98. };
  99. /* Source for cache-line-size + cache-sets
  100. * https://developer.arm.com/documentation/ddi0500
  101. * /e/level-2-memory-system/about-the-l2-memory-system?lang=en
  102. * Source for cache-size
  103. * https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf
  104. */
  105. l2: l2-cache0 {
  106. compatible = "cache";
  107. cache-size = <0x80000>;
  108. cache-line-size = <64>;
  109. cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set
  110. cache-level = <2>;
  111. };
  112. };
  113. };
  114. /* Make the BCM2835-style global interrupt controller be a child of the
  115. * CPU-local interrupt controller.
  116. */
  117. &intc {
  118. compatible = "brcm,bcm2836-armctrl-ic";
  119. reg = <0x7e00b200 0x200>;
  120. interrupt-parent = <&local_intc>;
  121. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
  122. };
  123. &cpu_thermal {
  124. coefficients = <(-538) 412000>;
  125. };
  126. /* enable thermal sensor with the correct compatible property set */
  127. &thermal {
  128. compatible = "brcm,bcm2837-thermal";
  129. status = "okay";
  130. };