|
20 | 20 | zephyr,dtcm = &dtcm; |
21 | 21 | zephyr,sram = &sram0; |
22 | 22 | zephyr,flash = &flash0; |
| 23 | + zephyr,flash-controller = &mx25uw25645; |
23 | 24 | }; |
24 | 25 |
|
25 | 26 | leds: leds { |
|
53 | 54 | led2 = &red_led; |
54 | 55 | sw0 = &user_button; |
55 | 56 | watchdog0 = &iwdg; |
| 57 | + spi-flash0 = &mx25uw25645; |
56 | 58 | }; |
57 | 59 | }; |
58 | 60 |
|
|
85 | 87 | status = "okay"; |
86 | 88 | }; |
87 | 89 |
|
| 90 | +/* PLL2 for clocking the xspi peripheral */ |
| 91 | +&pll2 { |
| 92 | + div-m = <12>; |
| 93 | + mul-n = <200>; |
| 94 | + div-p = <2>; |
| 95 | + div-q = <2>; |
| 96 | + div-r = <2>; |
| 97 | + div-s = <2>; |
| 98 | + div-t = <2>; |
| 99 | + clocks = <&clk_hse>; |
| 100 | + status = "okay"; |
| 101 | +}; |
| 102 | + |
88 | 103 | &rcc { |
89 | 104 | clocks = <&pll>; |
90 | 105 | clock-frequency = <DT_FREQ_M(200)>; |
|
139 | 154 | status = "okay"; |
140 | 155 | clock-frequency = <I2C_BITRATE_FAST>; |
141 | 156 | }; |
| 157 | + |
| 158 | +&flash0 { |
| 159 | + partitions { |
| 160 | + compatible = "fixed-partitions"; |
| 161 | + #address-cells = <1>; |
| 162 | + #size-cells = <1>; |
| 163 | + |
| 164 | + /* Set the partitions with first MB to make use of the whole Bank1 */ |
| 165 | + boot_partition: partition@0 { |
| 166 | + label = "mcuboot"; |
| 167 | + reg = <0x00000000 DT_SIZE_K(64)>; |
| 168 | + }; |
| 169 | + }; |
| 170 | +}; |
| 171 | + |
| 172 | +&xspi2 { |
| 173 | + pinctrl-0 = <&xspim_p2_clk_pn6 &xspim_p2_ncs1_pn1 |
| 174 | + &xspim_p2_io0_pn2 &xspim_p2_io1_pn3 |
| 175 | + &xspim_p2_io2_pn4 &xspim_p2_io3_pn5 |
| 176 | + &xspim_p2_io4_pn8 &xspim_p2_io5_pn9 |
| 177 | + &xspim_p2_io6_pn10 &xspim_p2_io7_pn11 |
| 178 | + &xspim_p2_dqs0_pn0>; |
| 179 | + pinctrl-names = "default"; |
| 180 | + |
| 181 | + status = "okay"; |
| 182 | + |
| 183 | + mx25uw25645: xspi-nor-flash@70000000 { |
| 184 | + compatible = "st,stm32-xspi-nor"; |
| 185 | + reg = <0x70000000 DT_SIZE_M(32)>; /* 256Mbits */ |
| 186 | + ospi-max-frequency = <DT_FREQ_M(50)>; |
| 187 | + spi-bus-width = <XSPI_OCTO_MODE>; |
| 188 | + data-rate = <XSPI_DTR_TRANSFER>; |
| 189 | + status = "okay"; |
| 190 | + |
| 191 | + partitions { |
| 192 | + compatible = "fixed-partitions"; |
| 193 | + #address-cells = <1>; |
| 194 | + #size-cells = <1>; |
| 195 | + |
| 196 | + slot0_partition: partition@0 { |
| 197 | + label = "image-0"; |
| 198 | + reg = <0x00000000 DT_SIZE_K(512)>; |
| 199 | + }; |
| 200 | + slot1_partition: partition@80000 { |
| 201 | + label = "image-1"; |
| 202 | + reg = <0x0080000 DT_SIZE_K(512)>; |
| 203 | + }; |
| 204 | + scratch_partition: partition@100000 { |
| 205 | + label = "image-scratch"; |
| 206 | + reg = <0x00100000 DT_SIZE_K(64)>; |
| 207 | + }; |
| 208 | + storage_partition: partition@110000 { |
| 209 | + label = "storage"; |
| 210 | + reg = <0x00110000 DT_SIZE_K(64)>; |
| 211 | + }; |
| 212 | + }; |
| 213 | + }; |
| 214 | +}; |
0 commit comments