bcm2836.dtsi 3.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142
  1. // SPDX-License-Identifier: GPL-2.0
  2. #include "bcm283x.dtsi"
  3. #include "bcm2835-common.dtsi"
  4. #include "bcm2835-rpi-common.dtsi"
  5. / {
  6. compatible = "brcm,bcm2836";
  7. soc {
  8. ranges = <0x7e000000 0x3f000000 0x1000000>,
  9. <0x40000000 0x40000000 0x00001000>;
  10. dma-ranges = <0xc0000000 0x00000000 0x3f000000>;
  11. local_intc: local_intc@40000000 {
  12. compatible = "brcm,bcm2836-l1-intc";
  13. reg = <0x40000000 0x100>;
  14. interrupt-controller;
  15. #interrupt-cells = <2>;
  16. interrupt-parent = <&local_intc>;
  17. };
  18. };
  19. arm-pmu {
  20. compatible = "arm,cortex-a7-pmu";
  21. interrupt-parent = <&local_intc>;
  22. interrupts = <9 IRQ_TYPE_LEVEL_HIGH>;
  23. };
  24. timer {
  25. compatible = "arm,armv7-timer";
  26. interrupt-parent = <&local_intc>;
  27. interrupts = <0 IRQ_TYPE_LEVEL_HIGH>, // PHYS_SECURE_PPI
  28. <1 IRQ_TYPE_LEVEL_HIGH>, // PHYS_NONSECURE_PPI
  29. <3 IRQ_TYPE_LEVEL_HIGH>, // VIRT_PPI
  30. <2 IRQ_TYPE_LEVEL_HIGH>; // HYP_PPI
  31. always-on;
  32. };
  33. cpus: cpus {
  34. #address-cells = <1>;
  35. #size-cells = <0>;
  36. enable-method = "brcm,bcm2836-smp";
  37. /* Source for d/i-cache-line-size and d/i-cache-sets
  38. * https://developer.arm.com/documentation/ddi0464/f/L1-Memory-System
  39. * /About-the-L1-memory-system?lang=en
  40. *
  41. * Source for d/i-cache-size
  42. * https://forums.raspberrypi.com/viewtopic.php?t=98428
  43. */
  44. v7_cpu0: cpu@0 {
  45. device_type = "cpu";
  46. compatible = "arm,cortex-a7";
  47. reg = <0xf00>;
  48. clock-frequency = <800000000>;
  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 = <32>;
  54. i-cache-sets = <512>; // 32KiB(size)/32(line-size)=1024ways/2-way set
  55. next-level-cache = <&l2>;
  56. };
  57. v7_cpu1: cpu@1 {
  58. device_type = "cpu";
  59. compatible = "arm,cortex-a7";
  60. reg = <0xf01>;
  61. clock-frequency = <800000000>;
  62. d-cache-size = <0x8000>;
  63. d-cache-line-size = <64>;
  64. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  65. i-cache-size = <0x8000>;
  66. i-cache-line-size = <32>;
  67. i-cache-sets = <512>; // 32KiB(size)/32(line-size)=1024ways/2-way set
  68. next-level-cache = <&l2>;
  69. };
  70. v7_cpu2: cpu@2 {
  71. device_type = "cpu";
  72. compatible = "arm,cortex-a7";
  73. reg = <0xf02>;
  74. clock-frequency = <800000000>;
  75. d-cache-size = <0x8000>;
  76. d-cache-line-size = <64>;
  77. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  78. i-cache-size = <0x8000>;
  79. i-cache-line-size = <32>;
  80. i-cache-sets = <512>; // 32KiB(size)/32(line-size)=1024ways/2-way set
  81. next-level-cache = <&l2>;
  82. };
  83. v7_cpu3: cpu@3 {
  84. device_type = "cpu";
  85. compatible = "arm,cortex-a7";
  86. reg = <0xf03>;
  87. clock-frequency = <800000000>;
  88. d-cache-size = <0x8000>;
  89. d-cache-line-size = <64>;
  90. d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set
  91. i-cache-size = <0x8000>;
  92. i-cache-line-size = <32>;
  93. i-cache-sets = <512>; // 32KiB(size)/32(line-size)=1024ways/2-way set
  94. next-level-cache = <&l2>;
  95. };
  96. /* Source for cache-line-size + cache-sets
  97. * https://developer.arm.com/documentation/ddi0464/f/L2-Memory-System
  98. * /About-the-L2-Memory-system?lang=en
  99. * Source for cache-size
  100. * https://forums.raspberrypi.com/viewtopic.php?t=98428
  101. */
  102. l2: l2-cache0 {
  103. compatible = "cache";
  104. cache-size = <0x80000>;
  105. cache-line-size = <64>;
  106. cache-sets = <1024>; // 512KiB(size)/64(line-size)=8192ways/8-way set
  107. cache-level = <2>;
  108. };
  109. };
  110. };
  111. /* Make the BCM2835-style global interrupt controller be a child of the
  112. * CPU-local interrupt controller.
  113. */
  114. &intc {
  115. compatible = "brcm,bcm2836-armctrl-ic";
  116. reg = <0x7e00b200 0x200>;
  117. interrupt-parent = <&local_intc>;
  118. interrupts = <8 IRQ_TYPE_LEVEL_HIGH>;
  119. };
  120. &cpu_thermal {
  121. coefficients = <(-538) 407000>;
  122. };
  123. /* enable thermal sensor with the correct compatible property set */
  124. &thermal {
  125. compatible = "brcm,bcm2836-thermal";
  126. status = "okay";
  127. };