| .. | .. |
|---|
| 1 | 1 | #include "bcm283x.dtsi" |
|---|
| 2 | +#include "bcm2835-common.dtsi" |
|---|
| 3 | +#include "bcm2835-rpi-common.dtsi" |
|---|
| 2 | 4 | |
|---|
| 3 | 5 | / { |
|---|
| 4 | 6 | compatible = "brcm,bcm2837"; |
|---|
| .. | .. |
|---|
| 38 | 40 | #size-cells = <0>; |
|---|
| 39 | 41 | enable-method = "brcm,bcm2836-smp"; // for ARM 32-bit |
|---|
| 40 | 42 | |
|---|
| 43 | + /* Source for d/i-cache-line-size and d/i-cache-sets |
|---|
| 44 | + * https://developer.arm.com/documentation/ddi0500/e/level-1-memory-system |
|---|
| 45 | + * /about-the-l1-memory-system?lang=en |
|---|
| 46 | + * |
|---|
| 47 | + * Source for d/i-cache-size |
|---|
| 48 | + * https://magpi.raspberrypi.com/articles/raspberry-pi-3-specs-benchmarks |
|---|
| 49 | + */ |
|---|
| 41 | 50 | cpu0: cpu@0 { |
|---|
| 42 | 51 | device_type = "cpu"; |
|---|
| 43 | 52 | compatible = "arm,cortex-a53"; |
|---|
| 44 | 53 | reg = <0>; |
|---|
| 45 | 54 | enable-method = "spin-table"; |
|---|
| 46 | 55 | cpu-release-addr = <0x0 0x000000d8>; |
|---|
| 56 | + d-cache-size = <0x8000>; |
|---|
| 57 | + d-cache-line-size = <64>; |
|---|
| 58 | + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set |
|---|
| 59 | + i-cache-size = <0x8000>; |
|---|
| 60 | + i-cache-line-size = <64>; |
|---|
| 61 | + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set |
|---|
| 62 | + next-level-cache = <&l2>; |
|---|
| 47 | 63 | }; |
|---|
| 48 | 64 | |
|---|
| 49 | 65 | cpu1: cpu@1 { |
|---|
| .. | .. |
|---|
| 52 | 68 | reg = <1>; |
|---|
| 53 | 69 | enable-method = "spin-table"; |
|---|
| 54 | 70 | cpu-release-addr = <0x0 0x000000e0>; |
|---|
| 71 | + d-cache-size = <0x8000>; |
|---|
| 72 | + d-cache-line-size = <64>; |
|---|
| 73 | + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set |
|---|
| 74 | + i-cache-size = <0x8000>; |
|---|
| 75 | + i-cache-line-size = <64>; |
|---|
| 76 | + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set |
|---|
| 77 | + next-level-cache = <&l2>; |
|---|
| 55 | 78 | }; |
|---|
| 56 | 79 | |
|---|
| 57 | 80 | cpu2: cpu@2 { |
|---|
| .. | .. |
|---|
| 60 | 83 | reg = <2>; |
|---|
| 61 | 84 | enable-method = "spin-table"; |
|---|
| 62 | 85 | cpu-release-addr = <0x0 0x000000e8>; |
|---|
| 86 | + d-cache-size = <0x8000>; |
|---|
| 87 | + d-cache-line-size = <64>; |
|---|
| 88 | + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set |
|---|
| 89 | + i-cache-size = <0x8000>; |
|---|
| 90 | + i-cache-line-size = <64>; |
|---|
| 91 | + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set |
|---|
| 92 | + next-level-cache = <&l2>; |
|---|
| 63 | 93 | }; |
|---|
| 64 | 94 | |
|---|
| 65 | 95 | cpu3: cpu@3 { |
|---|
| .. | .. |
|---|
| 68 | 98 | reg = <3>; |
|---|
| 69 | 99 | enable-method = "spin-table"; |
|---|
| 70 | 100 | cpu-release-addr = <0x0 0x000000f0>; |
|---|
| 101 | + d-cache-size = <0x8000>; |
|---|
| 102 | + d-cache-line-size = <64>; |
|---|
| 103 | + d-cache-sets = <128>; // 32KiB(size)/64(line-size)=512ways/4-way set |
|---|
| 104 | + i-cache-size = <0x8000>; |
|---|
| 105 | + i-cache-line-size = <64>; |
|---|
| 106 | + i-cache-sets = <256>; // 32KiB(size)/64(line-size)=512ways/2-way set |
|---|
| 107 | + next-level-cache = <&l2>; |
|---|
| 108 | + }; |
|---|
| 109 | + |
|---|
| 110 | + /* Source for cache-line-size + cache-sets |
|---|
| 111 | + * https://developer.arm.com/documentation/ddi0500 |
|---|
| 112 | + * /e/level-2-memory-system/about-the-l2-memory-system?lang=en |
|---|
| 113 | + * Source for cache-size |
|---|
| 114 | + * https://datasheets.raspberrypi.com/cm/cm1-and-cm3-datasheet.pdf |
|---|
| 115 | + */ |
|---|
| 116 | + l2: l2-cache0 { |
|---|
| 117 | + compatible = "cache"; |
|---|
| 118 | + cache-size = <0x80000>; |
|---|
| 119 | + cache-line-size = <64>; |
|---|
| 120 | + cache-sets = <512>; // 512KiB(size)/64(line-size)=8192ways/16-way set |
|---|
| 121 | + cache-level = <2>; |
|---|
| 71 | 122 | }; |
|---|
| 72 | 123 | }; |
|---|
| 73 | 124 | }; |
|---|