|
19 | 19 | zephyr,shell-uart = &usart3;
|
20 | 20 | zephyr,sram = &sram0;
|
21 | 21 | zephyr,flash = &flash0;
|
| 22 | + zephyr,flash-controller = &mx25lm51245; |
| 23 | + zephyr,code-partition = &slot1_partition; |
| 24 | + |
22 | 25 | };
|
23 | 26 |
|
24 | 27 | leds {
|
|
143 | 146 | cd-gpios = <&gpiof 5 GPIO_ACTIVE_LOW>;
|
144 | 147 | };
|
145 | 148 |
|
| 149 | +&flash0 { |
| 150 | + partitions { |
| 151 | + compatible = "fixed-partitions"; |
| 152 | + #address-cells = <1>; |
| 153 | + #size-cells = <1>; |
| 154 | + |
| 155 | + boot_partition: partition@0 { |
| 156 | + label = "mcuboot"; |
| 157 | + reg = <0x00000000 DT_SIZE_K(64)>; |
| 158 | + }; |
| 159 | + /* Set 2KB of storage at the end of first 1MB flash */ |
| 160 | + slot0_partition: partition@10000 { |
| 161 | + label = "image-0"; |
| 162 | + reg = <0x00010000 DT_SIZE_K(416)>; |
| 163 | + }; |
| 164 | + storage_partition: partition@ff800 { |
| 165 | + label = "storage"; |
| 166 | + reg = <0x000ff800 DT_SIZE_K(2)>; |
| 167 | + }; |
| 168 | + }; |
| 169 | +}; |
| 170 | + |
146 | 171 | &octospi1 {
|
147 | 172 | pinctrl-0 = <&octospim_p1_clk_pf10 &octospim_p1_ncs_pg6
|
148 | 173 | &octospim_p1_io0_pd11 &octospim_p1_io1_pd12
|
|
156 | 181 |
|
157 | 182 | mx25lm51245: ospi-nor-flash@0 {
|
158 | 183 | compatible = "st,stm32-ospi-nor";
|
159 |
| - reg = <0>; |
| 184 | + reg = <0x90000000 DT_SIZE_M(64)>; /* 512 Mbits */ |
160 | 185 | ospi-max-frequency = <DT_FREQ_M(50)>;
|
161 |
| - size = <DT_SIZE_M(512)>; /* 64 MBytes */ |
162 | 186 | spi-bus-width = <OSPI_OPI_MODE>;
|
163 | 187 | data-rate = <OSPI_DTR_TRANSFER>;
|
164 | 188 | status = "okay";
|
|
168 | 192 | #address-cells = <1>;
|
169 | 193 | #size-cells = <1>;
|
170 | 194 |
|
171 |
| - partition@0 { |
| 195 | + /* put image at offset 0 in slot1 */ |
| 196 | + slot1_partition:partition@0 { |
172 | 197 | label = "nor";
|
173 |
| - reg = <0x00000000 DT_SIZE_M(4)>; |
| 198 | + reg = <0x00000000 DT_SIZE_M(32)>; |
174 | 199 | };
|
175 | 200 | };
|
176 | 201 | };
|
|
0 commit comments