1/*
2 * Copyright (c) 2019 Nordic Semiconductor ASA
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 */
6
7#include <arm/armv7-m.dtsi>
8#include "nrf_common.dtsi"
9
10/ {
11	chosen {
12		zephyr,entropy = &rng;
13		zephyr,flash-controller = &flash_controller;
14	};
15
16	cpus {
17		#address-cells = <1>;
18		#size-cells = <0>;
19
20		cpu@0 {
21			device_type = "cpu";
22			compatible = "arm,cortex-m4f";
23			reg = <0>;
24			swo-ref-frequency = <32000000>;
25		};
26	};
27
28	soc {
29		ficr: ficr@10000000 {
30			compatible = "nordic,nrf-ficr";
31			reg = <0x10000000 0x1000>;
32			status = "okay";
33		};
34
35		uicr: uicr@10001000 {
36			compatible = "nordic,nrf-uicr";
37			reg = <0x10001000 0x1000>;
38			status = "okay";
39		};
40
41		sram0: memory@20000000 {
42			compatible = "mmio-sram";
43		};
44
45		clock: clock@40000000 {
46			compatible = "nordic,nrf-clock";
47			reg = <0x40000000 0x1000>;
48			interrupts = <0 NRF_DEFAULT_IRQ_PRIORITY>;
49			status = "okay";
50			label = "CLOCK";
51		};
52
53		radio: radio@40001000 {
54			compatible = "nordic,nrf-radio";
55			reg = <0x40001000 0x1000>;
56			interrupts = <1 NRF_DEFAULT_IRQ_PRIORITY>;
57			status = "okay";
58			dfe-supported;
59		};
60
61		uart0: uart@40002000 {
62			/* uart can be either UART or UARTE, for the user to pick */
63			/* compatible = "nordic,nrf-uarte" or "nordic,nrf-uart"; */
64			reg = <0x40002000 0x1000>;
65			interrupts = <2 NRF_DEFAULT_IRQ_PRIORITY>;
66			status = "disabled";
67			label = "UART_0";
68		};
69
70		i2c0: i2c@40003000 {
71			/*
72			 * This i2c node can be TWI, TWIM, or TWIS,
73			 * for the user to pick:
74			 * compatible = "nordic,nrf-twi" or
75			 *              "nordic,nrf-twim" or
76			 *              "nordic,nrf-twis".
77			 */
78			#address-cells = <1>;
79			#size-cells = <0>;
80			reg = <0x40003000 0x1000>;
81			clock-frequency = <I2C_BITRATE_STANDARD>;
82			interrupts = <3 NRF_DEFAULT_IRQ_PRIORITY>;
83			status = "disabled";
84			label = "I2C_0";
85		};
86
87		spi0: spi@40003000 {
88			/*
89			 * This spi node can be SPI, SPIM, or SPIS,
90			 * for the user to pick:
91			 * compatible = "nordic,nrf-spi" or
92			 *              "nordic,nrf-spim" or
93			 *              "nordic,nrf-spis".
94			 */
95			#address-cells = <1>;
96			#size-cells = <0>;
97			reg = <0x40003000 0x1000>;
98			interrupts = <3 NRF_DEFAULT_IRQ_PRIORITY>;
99			status = "disabled";
100			label = "SPI_0";
101		};
102
103		i2c1: i2c@40004000 {
104			/*
105			 * This i2c node can be TWI, TWIM, or TWIS,
106			 * for the user to pick:
107			 * compatible = "nordic,nrf-twi" or
108			 *              "nordic,nrf-twim" or
109			 *              "nordic,nrf-twis".
110			 */
111			#address-cells = <1>;
112			#size-cells = <0>;
113			reg = <0x40004000 0x1000>;
114			clock-frequency = <I2C_BITRATE_STANDARD>;
115			interrupts = <4 NRF_DEFAULT_IRQ_PRIORITY>;
116			status = "disabled";
117			label = "I2C_1";
118		};
119
120		spi1: spi@40004000 {
121			/*
122			 * This spi node can be SPI, SPIM, or SPIS,
123			 * for the user to pick:
124			 * compatible = "nordic,nrf-spi" or
125			 *              "nordic,nrf-spim" or
126			 *              "nordic,nrf-spis".
127			 */
128			#address-cells = <1>;
129			#size-cells = <0>;
130			reg = <0x40004000 0x1000>;
131			interrupts = <4 NRF_DEFAULT_IRQ_PRIORITY>;
132			status = "disabled";
133			label = "SPI_1";
134		};
135
136		gpiote: gpiote@40006000 {
137			compatible = "nordic,nrf-gpiote";
138			reg = <0x40006000 0x1000>;
139			interrupts = <6 5>;
140			status = "disabled";
141			label = "GPIOTE_0";
142		};
143
144		adc: adc@40007000 {
145			compatible = "nordic,nrf-saadc";
146			reg = <0x40007000 0x1000>;
147			interrupts = <7 NRF_DEFAULT_IRQ_PRIORITY>;
148			status = "disabled";
149			label = "ADC_0";
150			#io-channel-cells = <1>;
151		};
152
153		timer0: timer@40008000 {
154			compatible = "nordic,nrf-timer";
155			status = "okay";
156			reg = <0x40008000 0x1000>;
157			cc-num = <4>;
158			interrupts = <8 NRF_DEFAULT_IRQ_PRIORITY>;
159			prescaler = <0>;
160			label = "TIMER_0";
161		};
162
163		timer1: timer@40009000 {
164			compatible = "nordic,nrf-timer";
165			status = "okay";
166			reg = <0x40009000 0x1000>;
167			cc-num = <4>;
168			interrupts = <9 NRF_DEFAULT_IRQ_PRIORITY>;
169			prescaler = <0>;
170			label = "TIMER_1";
171		};
172
173		timer2: timer@4000a000 {
174			compatible = "nordic,nrf-timer";
175			status = "okay";
176			reg = <0x4000a000 0x1000>;
177			cc-num = <4>;
178			interrupts = <10 NRF_DEFAULT_IRQ_PRIORITY>;
179			prescaler = <0>;
180			label = "TIMER_2";
181		};
182
183		rtc0: rtc@4000b000 {
184			compatible = "nordic,nrf-rtc";
185			reg = <0x4000b000 0x1000>;
186			cc-num = <3>;
187			interrupts = <11 NRF_DEFAULT_IRQ_PRIORITY>;
188			status = "okay";
189			clock-frequency = <32768>;
190			prescaler = <1>;
191			label = "RTC_0";
192		};
193
194		temp: temp@4000c000 {
195			compatible = "nordic,nrf-temp";
196			reg = <0x4000c000 0x1000>;
197			interrupts = <12 NRF_DEFAULT_IRQ_PRIORITY>;
198			status = "okay";
199			label = "TEMP_0";
200		};
201
202		rng: random@4000d000 {
203			compatible = "nordic,nrf-rng";
204			reg = <0x4000d000 0x1000>;
205			interrupts = <13 NRF_DEFAULT_IRQ_PRIORITY>;
206			status = "okay";
207			label = "RNG";
208		};
209
210		ecb: ecb@4000e000 {
211			compatible = "nordic,nrf-ecb";
212			reg = <0x4000e000 0x1000>;
213			interrupts = <14 NRF_DEFAULT_IRQ_PRIORITY>;
214			status = "okay";
215			label = "ECB";
216		};
217
218		wdt: wdt0: watchdog@40010000 {
219			compatible = "nordic,nrf-watchdog";
220			reg = <0x40010000 0x1000>;
221			interrupts = <16 NRF_DEFAULT_IRQ_PRIORITY>;
222			status = "okay";
223			label = "WDT";
224		};
225
226		rtc1: rtc@40011000 {
227			compatible = "nordic,nrf-rtc";
228			reg = <0x40011000 0x1000>;
229			cc-num = <4>;
230			interrupts = <17 NRF_DEFAULT_IRQ_PRIORITY>;
231			status = "okay";
232			clock-frequency = <32768>;
233			prescaler = <1>;
234			label = "RTC_1";
235		};
236
237		qdec: qdec@40012000 {
238			compatible = "nordic,nrf-qdec";
239			reg = <0x40012000 0x1000>;
240			interrupts = <18 NRF_DEFAULT_IRQ_PRIORITY>;
241			status = "disabled";
242			label = "QDEC";
243		};
244
245		egu0: egu@40014000 {
246			compatible = "nordic,nrf-egu";
247			reg = <0x40014000 0x1000>;
248			interrupts = <20 NRF_DEFAULT_IRQ_PRIORITY>;
249			status = "okay";
250		};
251
252		egu1: egu@40015000 {
253			compatible = "nordic,nrf-egu";
254			reg = <0x40015000 0x1000>;
255			interrupts = <21 NRF_DEFAULT_IRQ_PRIORITY>;
256			status = "okay";
257		};
258
259		egu2: egu@40016000 {
260			compatible = "nordic,nrf-egu";
261			reg = <0x40016000 0x1000>;
262			interrupts = <22 NRF_DEFAULT_IRQ_PRIORITY>;
263			status = "okay";
264		};
265
266		egu3: egu@40017000 {
267			compatible = "nordic,nrf-egu";
268			reg = <0x40017000 0x1000>;
269			interrupts = <23 NRF_DEFAULT_IRQ_PRIORITY>;
270			status = "okay";
271		};
272
273		egu4: egu@40018000 {
274			compatible = "nordic,nrf-egu";
275			reg = <0x40018000 0x1000>;
276			interrupts = <24 NRF_DEFAULT_IRQ_PRIORITY>;
277			status = "okay";
278		};
279
280		egu5: egu@40019000 {
281			compatible = "nordic,nrf-egu";
282			reg = <0x40019000 0x1000>;
283			interrupts = <25 NRF_DEFAULT_IRQ_PRIORITY>;
284			status = "okay";
285		};
286
287		timer3: timer@4001a000 {
288			compatible = "nordic,nrf-timer";
289			status = "okay";
290			reg = <0x4001a000 0x1000>;
291			cc-num = <6>;
292			interrupts = <26 NRF_DEFAULT_IRQ_PRIORITY>;
293			prescaler = <0>;
294			label = "TIMER_3";
295		};
296
297		timer4: timer@4001b000 {
298			compatible = "nordic,nrf-timer";
299			status = "okay";
300			reg = <0x4001b000 0x1000>;
301			cc-num = <6>;
302			interrupts = <27 NRF_DEFAULT_IRQ_PRIORITY>;
303			prescaler = <0>;
304			label = "TIMER_4";
305		};
306
307		pwm0: pwm@4001c000 {
308			compatible = "nordic,nrf-pwm";
309			reg = <0x4001c000 0x1000>;
310			interrupts = <28 NRF_DEFAULT_IRQ_PRIORITY>;
311			status = "disabled";
312			label = "PWM_0";
313			#pwm-cells = <1>;
314		};
315
316		pdm0: pdm@4001d000 {
317			compatible = "nordic,nrf-pdm";
318			reg = <0x4001d000 0x1000>;
319			interrupts = <29 NRF_DEFAULT_IRQ_PRIORITY>;
320			status = "disabled";
321			label = "PDM_0";
322		};
323
324		flash_controller: flash-controller@4001e000 {
325			compatible = "nordic,nrf52-flash-controller";
326			reg = <0x4001e000 0x1000>;
327
328			#address-cells = <1>;
329			#size-cells = <1>;
330
331			label="NRF_FLASH_DRV_NAME";
332
333			flash0: flash@0 {
334				compatible = "soc-nv-flash";
335				label = "NRF_FLASH";
336				erase-block-size = <4096>;
337				write-block-size = <4>;
338			};
339		};
340
341		pwm1: pwm@40021000 {
342			compatible = "nordic,nrf-pwm";
343			reg = <0x40021000 0x1000>;
344			interrupts = <33 NRF_DEFAULT_IRQ_PRIORITY>;
345			status = "disabled";
346			label = "PWM_1";
347			#pwm-cells = <1>;
348		};
349
350		pwm2: pwm@40022000 {
351			compatible = "nordic,nrf-pwm";
352			reg = <0x40022000 0x1000>;
353			interrupts = <34 NRF_DEFAULT_IRQ_PRIORITY>;
354			status = "disabled";
355			label = "PWM_2";
356			#pwm-cells = <1>;
357		};
358
359		spi2: spi@40023000 {
360			/*
361			 * This spi node can be SPI, SPIM, or SPIS,
362			 * for the user to pick:
363			 * compatible = "nordic,nrf-spi" or
364			 *              "nordic,nrf-spim" or
365			 *              "nordic,nrf-spis".
366			 */
367			#address-cells = <1>;
368			#size-cells = <0>;
369			reg = <0x40023000 0x1000>;
370			interrupts = <35 NRF_DEFAULT_IRQ_PRIORITY>;
371			status = "disabled";
372			label = "SPI_2";
373		};
374
375		rtc2: rtc@40024000 {
376			compatible = "nordic,nrf-rtc";
377			reg = <0x40024000 0x1000>;
378			cc-num = <4>;
379			interrupts = <36 NRF_DEFAULT_IRQ_PRIORITY>;
380			status = "okay";
381			clock-frequency = <32768>;
382			prescaler = <1>;
383			label = "RTC_2";
384		};
385
386		i2s0: i2s@40025000 {
387			compatible = "nordic,nrf-i2s";
388			#address-cells = <1>;
389			#size-cells = <0>;
390			reg = <0x40025000 0x1000>;
391			interrupts = <37 NRF_DEFAULT_IRQ_PRIORITY>;
392			status = "disabled";
393			label = "I2S_0";
394		};
395
396		usbd: usbd@40027000 {
397			compatible = "nordic,nrf-usbd";
398			reg = <0x40027000 0x1000>;
399			interrupts = <39 NRF_DEFAULT_IRQ_PRIORITY>;
400			num-bidir-endpoints = <1>;
401			num-in-endpoints = <7>;
402			num-out-endpoints = <7>;
403			num-isoin-endpoints = <1>;
404			num-isoout-endpoints = <1>;
405			status = "disabled";
406			label = "USBD";
407		};
408
409		uart1: uart@40028000 {
410			compatible = "nordic,nrf-uarte";
411			reg = <0x40028000 0x1000>;
412			interrupts = <40 NRF_DEFAULT_IRQ_PRIORITY>;
413			status = "disabled";
414			label = "UART_1";
415		};
416
417		pwm3: pwm@4002d000 {
418			compatible = "nordic,nrf-pwm";
419			reg = <0x4002d000 0x1000>;
420			interrupts = <45 NRF_DEFAULT_IRQ_PRIORITY>;
421			status = "disabled";
422			label = "PWM_3";
423			#pwm-cells = <1>;
424		};
425
426		spi3: spi@4002f000 {
427			compatible = "nordic,nrf-spim";
428			#address-cells = <1>;
429			#size-cells = <0>;
430			reg = <0x4002f000 0x1000>;
431			interrupts = <47 NRF_DEFAULT_IRQ_PRIORITY>;
432			status = "disabled";
433			label = "SPI_3";
434		};
435
436		gpio0: gpio@50000000 {
437			compatible = "nordic,nrf-gpio";
438			gpio-controller;
439			reg = <0x50000000 0x200
440			       0x50000500 0x300>;
441			#gpio-cells = <2>;
442			label = "GPIO_0";
443			status = "disabled";
444			port = <0>;
445		};
446
447		gpio1: gpio@50000300 {
448			compatible = "nordic,nrf-gpio";
449			gpio-controller;
450			reg = <0x50000300 0x200
451			       0x50000800 0x300>;
452			#gpio-cells = <2>;
453			ngpios = <10>;
454			label = "GPIO_1";
455			status = "disabled";
456			port = <1>;
457		};
458	};
459
460	sw_pwm: sw-pwm {
461		compatible = "nordic,nrf-sw-pwm";
462		status = "disabled";
463		label = "SW_PWM";
464		generator = <&timer2>;
465		channel-count = <3>;
466		clock-prescaler = <0>;
467		ppi-base = <0>;
468		gpiote-base = <0>;
469		#pwm-cells = <1>;
470	};
471};
472
473&nvic {
474	arm,num-irq-priority-bits = <3>;
475};
476