|
29 | 29 | zephyr,console = &uart0; |
30 | 30 | zephyr,shell-uart = &uart0; |
31 | 31 | zephyr,sram = &ram; |
32 | | - zephyr,flash = &code; |
| 32 | + zephyr,flash = &reserved_memory; |
| 33 | + zephyr,code-partition = &slot0_ns_partition; |
33 | 34 | }; |
34 | 35 |
|
35 | 36 | leds { |
|
107 | 108 | reg = <0x80000000 DT_SIZE_M(16)>; |
108 | 109 | }; |
109 | 110 |
|
110 | | - reserved-memory { |
| 111 | + reserved_memory: reserved-memory@0 { |
| 112 | + compatible = "soc-nv-flash"; |
| 113 | + reg = <0x0 DT_SIZE_M(4)>; |
| 114 | + erase-block-size = <4096>; |
| 115 | + write-block-size = <4>; |
111 | 116 | #address-cells = <1>; |
112 | 117 | #size-cells = <1>; |
113 | | - ranges; |
114 | 118 |
|
115 | | - /* This code memory region must match what the TF-M |
116 | | - * project has defined for that board - a single image boot is |
117 | | - * assumed. Please see the memory layout in: |
118 | | - * |
119 | | - * https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/master/platform/ext/target/arm/mps2/an521/partition/flash_layout.h |
120 | | - */ |
121 | | - code: memory@100000 { |
122 | | - reg = <0x00100000 DT_SIZE_K(512)>; |
| 119 | + partitions { |
| 120 | + compatible = "fixed-partitions"; |
| 121 | + #address-cells = <1>; |
| 122 | + #size-cells = <1>; |
| 123 | + |
| 124 | + /* This code memory region must match what the TF-M |
| 125 | + * project has defined for that board - the milti-image |
| 126 | + * boot is used in Zephyr. See memory layout details in: |
| 127 | + * |
| 128 | + * https://github.com/zephyrproject-rtos/trusted-firmware-m/blob/master/platform/ext/target/arm/mps2/an521/partition/flash_layout.h |
| 129 | + */ |
| 130 | + boot_partition: partition@0 { |
| 131 | + reg = <0x00000000 DT_SIZE_K(512)>; |
| 132 | + read-only; |
| 133 | + }; |
| 134 | + |
| 135 | + slot0_partition: partition@80000 { |
| 136 | + reg = <0x00080000 DT_SIZE_K(512)>; |
| 137 | + }; |
| 138 | + |
| 139 | + slot0_ns_partition: partition@100000 { |
| 140 | + reg = <0x00100000 DT_SIZE_K(512)>; |
| 141 | + }; |
| 142 | + |
| 143 | + slot1_partition: partition@180000 { |
| 144 | + reg = <0x00180000 DT_SIZE_K(512)>; |
| 145 | + }; |
| 146 | + |
| 147 | + slot1_ns_partition: partition@200000 { |
| 148 | + reg = <0x00200000 DT_SIZE_K(512)>; |
| 149 | + }; |
| 150 | + |
| 151 | + scratch_partition: partition@280000 { |
| 152 | + reg = <0x00280000 DT_SIZE_K(512)>; |
| 153 | + }; |
123 | 154 | }; |
124 | 155 |
|
125 | 156 | /* This ram memory region's size is chosen to avoid conflict |
|
0 commit comments