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