1/*
2 * Copyright (c) 2024 Jacob Winther
3 *
4 * SPDX-License-Identifier: Apache-2.0
5 *
6 */
7
8/ {
9	chosen {
10		zephyr,sram = &sram0;
11		zephyr,flash = &flash0;
12		zephyr,code-partition = &code_partition;
13	};
14};
15
16&flash0 {
17	/*
18	 * Default flash layout for nrf52840 using UF2 and SoftDevice s140 v7
19	 *
20	 * 0x00000000 SoftDevice s140 v7    (156 kB)
21	 * 0x00027000 Application partition (788 kB)
22	 * 0x000ec000 Storage partition     (32 kB)
23	 * 0x000f4000 UF2 boot partition    (48 kB)
24	 */
25
26	partitions {
27		compatible = "fixed-partitions";
28		#address-cells = <1>;
29		#size-cells = <1>;
30
31		reserved_partition_0: partition@0 {
32			label = "SoftDevice";
33			read-only;
34			reg = <0x00000000 0x00027000>;
35		};
36		code_partition: partition@27000 {
37			label = "Application";
38			reg = <0x00027000 0x000C5000>;
39		};
40
41		storage_partition: partition@ec000 {
42			label = "Storage";
43			reg = <0x000ec000 0x00008000>;
44		};
45
46		boot_partition: partition@f4000 {
47			label = "UF2";
48			read-only;
49			reg = <0x000f4000 0x0000c000>;
50		};
51	};
52};
53