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