blob: c0b1daa0418ef32a00cdc411bcc7693413838c55 [file] [log] [blame]
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +01001.. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
Patrice Chotard90e82782021-01-04 17:00:56 +01002.. sectionauthor:: Patrick Delaunay <patrick.delaunay@foss.st.com>
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +01003
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +02004STM32MP1xx boards
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +01005=================
6
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +02007This is a quick instruction for setup STMicroelectronics STM32MP1xx boards.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +01008
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +02009Further information can be found in STMicroelectronics STM32 WIKI_.
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +020010
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010011Supported devices
12-----------------
13
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020014U-Boot supports all the STMicroelectronics MPU with the associated boards
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010015
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020016 - STMP32MP15x SoCs:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010017
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020018 - STM32MP157
19 - STM32MP153
20 - STM32MP151
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010021
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020022 - STMP32MP13x SoCs:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010023
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020024 - STM32MP135
25 - STM32MP133
26 - STM32MP131
Patrick Delaunaydb33b0e2020-02-26 11:26:43 +010027
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020028Everything is supported in Linux but U-Boot is limited to the boot device:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010029
30 1. UART
31 2. SD card/MMC controller (SDMMC)
32 3. NAND controller (FMC)
33 4. NOR controller (QSPI)
34 5. USB controller (OTG DWC2)
35 6. Ethernet controller
36
37And the necessary drivers
38
39 1. I2C
40 2. STPMIC1 (PMIC and regulator)
41 3. Clock, Reset, Sysreset
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020042 4. Fuse (BSEC)
43 5. OP-TEE
44 6. ETH
45 7. USB host
46 8. WATCHDOG
47 9. RNG
48 10. RTC
49
50STM32MP15x
51``````````
52
53The STM32MP15x is a Cortex-A7 MPU aimed at various applications.
54
55It features:
56
57 - Dual core Cortex-A7 application core (Single on STM32MP151)
58 - 2D/3D image composition with GPU (only on STM32MP157)
59 - Standard memories interface support
60 - Standard connectivity, widely inherited from the STM32 MCU family
61 - Comprehensive security support
62 - Cortex M4 coprocessor
63
64Each line comes with a security option (cryptography & secure boot) and
65a Cortex-A frequency option:
66
67 - A : Cortex-A7 @ 650 MHz
68 - C : Secure Boot + HW Crypto + Cortex-A7 @ 650 MHz
69 - D : Cortex-A7 @ 800 MHz
70 - F : Secure Boot + HW Crypto + Cortex-A7 @ 800 MHz
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010071
72Currently the following boards are supported:
73
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010074 + stm32mp157a-dk1.dts
75 + stm32mp157c-dk2.dts
76 + stm32mp157c-ed1.dts
77 + stm32mp157c-ev1.dts
Marek Vasut526c9512020-03-31 19:51:36 +020078 + stm32mp15xx-dhcor-avenger96.dts
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +010079
Patrick Delaunayddba40a2022-07-05 16:55:57 +020080The SCMI variant of each board is supported by a specific "scmi" device tree:
81 + stm32mp157a-dk1-scmi.dts
82 + stm32mp157c-dk2-scmi.dts
83 + stm32mp157c-ed1-scmi.dts
84 + stm32mp157c-ev1-scmi.dts
85
86SCMI variant is used only with stm32mp15_defconfig, when the resources are
87secured with RCC_TZCR.TZEN=1 in OP-TEE. The access to these reset and clock
88resources are provided by OP-TEE and the associated SCMI services.
89
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +020090STM32MP13x
91``````````
92
93The STM32MP13x is a single Cortex-A7 MPU aimed at various applications.
94
95Currently the following boards are supported:
96
97 + stm32mp135f-dk.dts
98
99
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100100Boot Sequences
101--------------
102
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +02001032 boot configurations are supported with:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100104
105+----------+------------------------+-------------------------+--------------+
106| **ROM** | **FSBL** | **SSBL** | **OS** |
107+ **code** +------------------------+-------------------------+--------------+
108| | First Stage Bootloader | Second Stage Bootloader | Linux Kernel |
109+ +------------------------+-------------------------+--------------+
110| | embedded RAM | DDR |
111+----------+------------------------+-------------------------+--------------+
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200112| TrustZone| secure monitor |
113+----------+------------------------+-------------------------+--------------+
114
115The trusted boot chain is recommended with:
116
117- FSBL = **TF-A BL2**
118- Secure monitor = **OP-TEE**
119- SSBL = **U-Boot**
120
121It is the only supported boot chain for STM32MP13x family.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100122
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200123The **Trusted** boot chain with TF-A_
124`````````````````````````````````````
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100125
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200126defconfig_file :
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200127 + **stm32mp15_defconfig** and **stm32mp13_defconfig** (for TF-A_ with FIP support)
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200128 + **stm32mp15_trusted_defconfig** (for TF-A_ without FIP support)
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100129
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200130 +-------------+--------------------------+------------+-------+
131 | ROM code | FSBL | SSBL | OS |
132 + +--------------------------+------------+-------+
133 | |Trusted Firmware-A (TF-A_)| U-Boot | Linux |
134 +-------------+--------------------------+------------+-------+
135 | TrustZone |secure monitor = SPMin or OP-TEE_ |
136 +-------------+--------------------------+------------+-------+
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100137
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200138TF-A_ and OP-TEE_ are 2 separate projects, with their git repository;
139they are compiled separately.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100140
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200141TF-A_ (BL2) initialize the DDR and loads the next stage binaries from a FIP file:
142 + BL32: a secure monitor BL32 = SPMin provided by TF-A_ or OP-TEE_ :
143 performs a full initialization of Secure peripherals and provides service
144 to normal world
145 + BL33: a non-trusted firmware = U-Boot, running in normal world and uses
146 the secure monitor to access to secure resources.
147 + HW_CONFIG: The hardware configuration file = the U-Boot device tree
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100148
Patrick Delaunayddba40a2022-07-05 16:55:57 +0200149The scmi variant of each device tree is only support with OP-TEE as secure
150monitor, with stm32mp15_defconfig.
151
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200152The **Basic** boot chain with SPL (for STM32MP15x)
153``````````````````````````````````````````````````
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100154
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200155defconfig_file :
156 + **stm32mp15_basic_defconfig**
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100157
158 +-------------+------------+------------+-------+
159 | ROM code | FSBL | SSBL | OS |
160 + +------------+------------+-------+
161 | |U-Boot SPL | U-Boot | Linux |
162 +-------------+------------+------------+-------+
163 | TrustZone | | PSCI from U-Boot |
164 +-------------+------------+------------+-------+
165
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200166SPL has limited security initialization.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100167
168U-Boot is running in secure mode and provide a secure monitor to the kernel
169with only PSCI support (Power State Coordination Interface defined by ARM).
170
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200171.. warning:: This alternate **basic** boot chain with SPL is not supported/promoted by STMicroelectronics to make product.
172
173Device Tree
174-----------
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100175
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200176All the STM32MP15x and STM32MP13x boards supported by U-Boot use the same generic board
177stm32mp1 which supports all the bootable devices.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100178
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200179Each STMicroelectronics board is only configured with the associated device tree.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100180
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200181STM32MP15x device Tree Selection
182````````````````````````````````
183The supported device trees for STM32MP15x (stm32mp15_trusted_defconfig and stm32mp15_basic_defconfig) are:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100184
185+ ev1: eval board with pmic stpmic1 (ev1 = mother board + daughter ed1)
186
187 + stm32mp157c-ev1
188
189+ ed1: daughter board with pmic stpmic1
190
191 + stm32mp157c-ed1
192
193+ dk1: Discovery board
194
195 + stm32mp157a-dk1
196
197+ dk2: Discovery board = dk1 with a BT/WiFI combo and a DSI panel
198
199 + stm32mp157c-dk2
200
Marek Vasut526c9512020-03-31 19:51:36 +0200201+ avenger96: Avenger96 board from Arrow Electronics based on DH Elec. DHCOR SoM
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100202
Marek Vasut526c9512020-03-31 19:51:36 +0200203 + stm32mp15xx-dhcor-avenger96
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100204
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200205STM32MP13x device Tree Selection
206````````````````````````````````
207The supported device trees for STM32MP13x (stm32mp13_defconfig) are:
208
209+ dk: Discovery board
210
211 + stm32mp135f-dk
212
213
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100214Build Procedure
215---------------
216
2171. Install the required tools for U-Boot
218
219 * install package needed in U-Boot makefile
220 (libssl-dev, swig, libpython-dev...)
221
222 * install ARMv7 toolchain for 32bit Cortex-A (from Linaro,
223 from SDK for STM32MP15x, or any crosstoolchains from your distribution)
224 (you can use any gcc cross compiler compatible with U-Boot)
225
2262. Set the cross compiler::
227
228 # export CROSS_COMPILE=/path/to/toolchain/arm-linux-gnueabi-
229
2303. Select the output directory (optional)::
231
232 # export KBUILD_OUTPUT=/path/to/output
233
234 for example: use one output directory for each configuration::
235
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200236 # export KBUILD_OUTPUT=stm32mp13
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200237 # export KBUILD_OUTPUT=stm32mp15
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100238 # export KBUILD_OUTPUT=stm32mp15_trusted
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100239 # export KBUILD_OUTPUT=stm32mp15_basic
240
241 you can build outside of code directory::
242
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200243 # export KBUILD_OUTPUT=../build/stm32mp15
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100244
2454. Configure U-Boot::
246
247 # make <defconfig_file>
248
249 with <defconfig_file>:
250
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200251 - For **trusted** boot mode :
252 - For STM32MP13x: **stm32mp13_defconfig**
253 - For STM32MP15x: **stm32mp15_defconfig** or stm32mp15_trusted_defconfig
254 - For STM32MP15x basic boot mode: stm32mp15_basic_defconfig
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100255
2565. Configure the device-tree and build the U-Boot image::
257
258 # make DEVICE_TREE=<name> all
259
260 Examples:
261
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200262 a) trusted boot with FIP on STM32MP15x ev1::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100263
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200264 # export KBUILD_OUTPUT=stm32mp15
265 # make stm32mp15_defconfig
Patrick Delaunayddba40a2022-07-05 16:55:57 +0200266 # make DEVICE_TREE=stm32mp157c-ev1-scmi all
267
268 or without SCMI support
269
270 # export KBUILD_OUTPUT=stm32mp15
271 # make stm32mp15_defconfig
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100272 # make DEVICE_TREE=stm32mp157c-ev1 all
273
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200274 b) trusted boot on STM32MP13x discovery board::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100275
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200276 # export KBUILD_OUTPUT=stm32mp13
277 # make stm32mp13_defconfig
278 # make DEVICE_TREE=stm32mp135f-dk all
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100279
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200280 DEVICE_TEE selection is optional as stm32mp135f-dk is the default board of the defconfig::
281
282 # make stm32mp13_defconfig
283 # make all
284
285 c) basic boot on STM32MP15x ev1::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100286
287 # export KBUILD_OUTPUT=stm32mp15_basic
288 # make stm32mp15_basic_defconfig
289 # make DEVICE_TREE=stm32mp157c-ev1 all
290
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200291 d) basic boot on STM32MP15x ed1::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100292
293 # export KBUILD_OUTPUT=stm32mp15_basic
294 # make stm32mp15_basic_defconfig
295 # make DEVICE_TREE=stm32mp157c-ed1 all
296
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200297 e) basic boot on STM32MP15x dk1::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100298
299 # export KBUILD_OUTPUT=stm32mp15_basic
300 # make stm32mp15_basic_defconfig
301 # make DEVICE_TREE=stm32mp157a-dk1 all
302
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200303 f) basic boot on STM32MP15x avenger96::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100304
305 # export KBUILD_OUTPUT=stm32mp15_basic
306 # make stm32mp15_basic_defconfig
Marek Vasut526c9512020-03-31 19:51:36 +0200307 # make DEVICE_TREE=stm32mp15xx-dhcor-avenger96 all
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100308
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +02003096. U-Boot Output files
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100310
311 So in the output directory (selected by KBUILD_OUTPUT),
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200312 you can found the needed U-Boot files:
313
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200314 - stm32mp13_defconfig = **u-boot-nodtb.bin** and **u-boot.dtb**
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200315 - stm32mp15_defconfig = **u-boot-nodtb.bin** and **u-boot.dtb**
316
317 - stm32mp15_trusted_defconfig = u-boot.stm32
318
319 - stm32mp15_basic_defconfig
320
321 - FSBL = spl/u-boot-spl.stm32
322
323 - SSBL = u-boot.img (without CONFIG_SPL_LOAD_FIT) or
324 u-boot.itb (with CONFIG_SPL_LOAD_FIT=y)
325
3267. TF-A_ compilation
327
328 This step is required only for **Trusted** boot (stm32mp15_defconfig and
329 stm32mp15_trusted_defconfig); see OP-TEE_ and TF-A_ documentation for build
330 commands.
331
332 - For TF-A_ with FIP support: **stm32mp15_defconfig**
333
334 - with OP-TEE_ support, compile the OP-TEE to generate the binary included
335 in FIP
336
337 - after TF-A compilation, the used files are:
338
339 - TF-A_ BL2 => FSBL = **tf-a.stm32**
340
341 - FIP => **fip.bin**
342
343 FIP file includes the 2 files given in arguments of TF-A_ compilation:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100344
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200345 - BL33=u-boot-nodtb.bin
346 - BL33_CFG=u-boot.dtb
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100347
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200348 You can also update a existing FIP after U-boot compilation with fiptool,
349 a tool provided by TF-A_::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100350
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200351 # fiptool update --nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb fip-stm32mp157c-ev1.bin
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100352
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200353 - For TF-A_ without FIP support : **stm32mp15_trusted_defconfig**
354 SPMin is used and the used files are:
355
356 - FSBL = **tf-a.stm32** (provided by TF-A_ compilation, contening BL2 and
357 BL32 = SPMin)
358
359 - SSBL = **u-boot.stm32** used instead of fip.bin in next chapters
360
3618. The bootloaders files
362
363+ The **ROM code** expects FSBL binaries with STM32 image header =
364 tf-a.stm32 or u-boot-spl.stm32
365
366According the FSBL / the boot mode:
367
368+ **TF-A** expect a FIP binary = fip.bin, including the OS monitor (SPMin or
369 OP-TEE_) and the U-Boot binary + device tree
370
371 or, without FIP support, binaries with STM32 image header: U-Boot
372 = u-boot.stm32 and eventually OP-TEE files (tee-header.stm32, tee-pageable.stm32,
373 tee-pager.stm32)
374
375+ **SPL** expects SSBL = U-Boot with uImage header = u-boot.img
376 or FIT = u-boot.itb.
377
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100378
379Switch Setting for Boot Mode
380----------------------------
381
382You can select the boot mode, on the board with one switch, to select
383the boot pin values = BOOT0, BOOT1, BOOT2
384
385 +-------------+---------+---------+---------+
386 |*Boot Mode* | *BOOT2* | *BOOT1* | *BOOT0* |
387 +=============+=========+=========+=========+
388 | Recovery | 0 | 0 | 0 |
389 +-------------+---------+---------+---------+
390 | NOR | 0 | 0 | 1 |
391 +-------------+---------+---------+---------+
392 | eMMC | 0 | 1 | 0 |
393 +-------------+---------+---------+---------+
394 | NAND | 0 | 1 | 1 |
395 +-------------+---------+---------+---------+
396 | Reserved | 1 | 0 | 0 |
397 +-------------+---------+---------+---------+
398 | SD-Card | 1 | 0 | 1 |
399 +-------------+---------+---------+---------+
400 | Recovery | 1 | 1 | 0 |
401 +-------------+---------+---------+---------+
402 | SPI-NAND | 1 | 1 | 1 |
403 +-------------+---------+---------+---------+
404
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200405- on the STM32MP15x **daughter board ed1 = MB1263** with the switch SW1
406- on STM32MP15x **Avenger96** with switch S3 (NOR and SPI-NAND are not applicable)
407- on board STM32MP15x **DK1/DK2** with the switch SW1 = BOOT0, BOOT2
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100408 with only 2 pins available (BOOT1 is forced to 0 and NOR not supported),
409 the possible value becomes:
410
411 +-------------+---------+---------+
412 |*Boot Mode* | *BOOT2* | *BOOT0* |
413 +=============+=========+=========+
414 | Recovery | 0 | 0 |
415 +-------------+---------+---------+
416 | NOR (NA)| 0 | 1 |
417 +-------------+---------+---------+
418 | Reserved | 1 | 0 |
419 +-------------+---------+---------+
420 | SD-Card | 1 | 1 |
421 +-------------+---------+---------+
422
423Recovery is a boot from serial link (UART/USB) and it is used with
424STM32CubeProgrammer tool to load executable in RAM and to update the flash
425devices available on the board (NOR/NAND/eMMC/SD card).
426
427The communication between HOST and board is based on
428
429 - for UARTs : the uart protocol used with all MCU STM32
430 - for USB : based on USB DFU 1.1 (without the ST extensions used on MCU STM32)
431
432Prepare an SD card
433------------------
434
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200435The minimal requirements for STMP32MP15x and STM32MP13x boot up to U-Boot are:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100436
437- GPT partitioning (with gdisk or with sgdisk)
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200438- 2 fsbl partitions, named "fsbl1" and "fsbl2", size at least 256KiB
439- one partition named "fip" for FIP or U-Boot (TF-A_ search the "fip"
440 partition and SPL search the 3th partition, because
441 CONFIG_SYS_MMCSD_RAW_MODE_U_BOOT_PARTITION=3)
442
443The 2 fsbl partitions have the same content and are present to guarantee a
444fail-safe update of FSBL; fsbl2 can be omitted if this ROM code feature is
445not required.
446
447Without FIP support in TF-A_, the 3rd partition "fip" for u-boot.stm32 must
448be named "ssbl".
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100449
450Then the minimal GPT partition is:
451
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200452For TF-A_ with FIP support:
453
454 +-------+--------+---------+------------------------+
455 | *Num* | *Name* | *Size* | *Content* |
456 +=======+========+=========+========================+
457 | 1 | fsbl1 | 256 KiB | TF-A_ BL2 (tf-a.stm32) |
458 +-------+--------+---------+------------------------+
459 | 2 | fsbl2 | 256 KiB | TF-A_ BL2 (tf-a.stm32) |
460 +-------+--------+---------+------------------------+
461 | 3 | fip | 4MB | fip.bin |
462 +-------+--------+---------+------------------------+
463 | 4 | <any> | <any> | Rootfs |
464 +-------+--------+---------+------------------------+
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100465
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200466or:
467
468 +-------+--------+---------+------------------------+------------------------+
469 | *Num* | *Name* | *Size* | *Trusted boot content* | *Basic boot content* |
470 +=======+========+=========+========================+========================+
471 | 1 | fsbl1 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl.stm32) |
472 +-------+--------+---------+------------------------+------------------------+
473 | 2 | fsbl2 | 256 KiB | TF-A_ BL2 (tf-a.stm32) | SPL (u-boot-spl.stm32) |
474 +-------+--------+---------+------------------------+------------------------+
475 | 3 | ssbl | 2MB | U-Boot (u-boot.stm32) | U-Boot (u-boot.img) |
476 +-------+--------+---------+------------------------+------------------------+
477 | 4 | <any> | <any> | Rootfs |
478 +-------+--------+---------+------------------------+------------------------+
479
480And the 4th partition (Rootfs) is marked bootable with a file extlinux.conf
Patrick Delaunay3281cb62023-01-24 10:16:02 +0100481following the Generic Distribution feature (see :doc:`../../develop/distro` for
482use).
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100483
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200484The size of fip or ssbl partition must be enough for the associated binary file,
4854MB and 2MB are default values.
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100486
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200487According the used card reader select the correct block device
488(for example /dev/sdx or /dev/mmcblk0), in the next example, it is /dev/mmcblk0
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100489
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200490For example:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100491
492a) remove previous formatting::
493
494 # sgdisk -o /dev/<SD card dev>
495
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200496b) create minimal image for FIP
497
498 For FIP support in TF-A_::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100499
500 # sgdisk --resize-table=128 -a 1 \
501 -n 1:34:545 -c 1:fsbl1 \
502 -n 2:546:1057 -c 2:fsbl2 \
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200503 -n 3:1058:9249 -c 3:fip \
504 -n 4:9250: -c 4:rootfs -A 4:set:2 \
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100505 -p /dev/<SD card dev>
506
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200507 With gpt table with 128 entries an the partition 4 marked bootable (bit 2).
508
509 For basic boot mode or without FIP support in TF-A_::
510
511 # sgdisk --resize-table=128 -a 1 \
512 -n 1:34:545 -c 1:fsbl1 \
513 -n 2:546:1057 -c 2:fsbl2 \
514 -n 3:1058:5153 -c 3:ssbl \
515 -n 4:5154: -c 4:rootfs -A 4:set:2 \
516 -p /dev/<SD card dev>
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100517
518c) copy the FSBL (2 times) and SSBL file on the correct partition.
519 in this example in partition 1 to 3
520
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200521 for trusted boot: ::
522
523 # dd if=tf-a.stm32 of=/dev/mmcblk0p1
524 # dd if=tf-a.stm32 of=/dev/mmcblk0p2
525 # dd if=fip.bin of=/dev/mmcblk0p3
526 OR
527 dd if=u-boot.stm32 of=/dev/mmcblk0p3 # Without FIT support
528
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100529 for basic boot mode : <SD card dev> = /dev/mmcblk0::
530
531 # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p1
532 # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p2
Marek Vasutdb4374f2021-03-06 21:44:17 +0100533 # dd if=u-boot.img of=/dev/mmcblk0p3 # Without CONFIG_SPL_LOAD_FIT
534 OR
535 dd if=u-boot.itb of=/dev/mmcblk0p3 # With CONFIG_SPL_LOAD_FIT=y
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100536
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100537To boot from SD card, select BootPinMode = 1 0 1 and reset.
538
539Prepare eMMC
540------------
541
542You can use U-Boot to copy binary in eMMC.
543
544In the next example, you need to boot from SD card and the images
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200545(tf-a.stm32, fip.bin / u-boot-spl.stm32, u-boot.img for systems without
546CONFIG_SPL_LOAD_FIT or u-boot.itb for systems with CONFIG_SPL_LOAD_FIT=y) are
547presents on SD card (mmc 0) in ext4 partition 4 (bootfs)
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100548
549To boot from SD card, select BootPinMode = 1 0 1 and reset.
550
551Then you update the eMMC with the next U-Boot command :
552
553a) prepare GPT on eMMC,
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200554 example with 3 partitions, fip, bootfs and roots::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100555
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200556 # setenv emmc_part "name=fip,size=4MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100557 # gpt write mmc 1 ${emmc_part}
558
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200559b) copy FSBL, TF-A_ or SPL, on first eMMC boot partition
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100560 (SPL max size is 256kB, with LBA 512, 0x200)::
561
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200562 # ext4load mmc 0:4 0xC0000000 tf-a.stm32
563 or
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100564 # ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200565
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100566 # mmc dev 1
567 # mmc partconf 1 1 1 1
568 # mmc write ${fileaddr} 0 200
569 # mmc partconf 1 1 1 0
570
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200571c) copy SSBL, FIP or U-Boot binary, in first GPT partition of eMMC::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100572
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200573 # ext4load mmc 0:4 0xC0000000 fip.bin
574 or
Marek Vasutdb4374f2021-03-06 21:44:17 +0100575 # ext4load mmc 0:4 0xC0000000 u-boot.img # Without CONFIG_SPL_LOAD_FIT
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200576 or
577 # ext4load mmc 0:4 0xC0000000 u-boot.itb # With CONFIG_SPL_LOAD_FIT=y
578
579
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100580 # mmc dev 1
581 # part start mmc 1 1 partstart
582 # mmc write ${fileaddr} ${partstart} ${filesize}
583
584To boot from eMMC, select BootPinMode = 0 1 0 and reset.
585
586MAC Address
587-----------
588
589Please read doc/README.enetaddr for the implementation guidelines for mac id
590usage. Basically, environment has precedence over board specific storage.
591
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200592For STMicroelectronics board, it is retrieved in:
593
594 - STM32MP15x OTP:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100595
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200596 - OTP_57[31:0] = MAC_ADDR[31:0]
597 - OTP_58[15:0] = MAC_ADDR[47:32]
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100598
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200599 - STM32MP13x OTP:
600
601 - OTP_57[31:0] = MAC_ADDR0[31:0]
602 - OTP_58[15:0] = MAC_ADDR0[47:32]
603 - OTP_58[31:16] = MAC_ADDR1[15:0]
604 - OTP_59[31:0] = MAC_ADDR1[47:16]
605
606To program a MAC address on virgin STM32MP15x OTP words above, you can use the fuse command
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100607on bank 0 to access to internal OTP and lock them:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100608
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200609In the next example we are using the 2 OTPs used on STM32MP15x.
610
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100611Prerequisite: check if a MAC address isn't yet programmed in OTP
612
Patrick Delaunayb10cddf2020-02-12 19:37:38 +01006131) check OTP: their value must be equal to 0::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100614
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100615 STM32MP> fuse sense 0 57 2
616 Sensing bank 0:
617 Word 0x00000039: 00000000 00000000
618
6192) check environment variable::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100620
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100621 STM32MP> env print ethaddr
622 ## Error: "ethaddr" not defined
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100623
Patrick Delaunayd5388292023-01-06 13:20:15 +01006243) check lock status of fuse 57 & 58 (at 0x39, 0=unlocked, 0x40000000=locked)::
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100625
626 STM32MP> fuse sense 0 0x10000039 2
627 Sensing bank 0:
628 Word 0x10000039: 00000000 00000000
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100629
630Example to set mac address "12:34:56:78:9a:bc"
631
6321) Write OTP::
633
634 STM32MP> fuse prog -y 0 57 0x78563412 0x0000bc9a
635
6362) Read OTP::
637
638 STM32MP> fuse sense 0 57 2
639 Sensing bank 0:
640 Word 0x00000039: 78563412 0000bc9a
641
Patrick Delaunayb10cddf2020-02-12 19:37:38 +01006423) Lock OTP::
643
Patrick Delaunayd5388292023-01-06 13:20:15 +0100644 STM32MP> fuse prog 0 0x10000039 0x40000000 0x40000000
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100645
646 STM32MP> fuse sense 0 0x10000039 2
647 Sensing bank 0:
Patrick Delaunayd5388292023-01-06 13:20:15 +0100648 Word 0x10000039: 40000000 40000000
Patrick Delaunayb10cddf2020-02-12 19:37:38 +0100649
6504) next REBOOT, in the trace::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100651
652 ### Setting environment from OTP MAC address = "12:34:56:78:9a:bc"
653
Patrick Delaunayb10cddf2020-02-12 19:37:38 +01006545) check env update::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100655
656 STM32MP> env print ethaddr
657 ethaddr=12:34:56:78:9a:bc
658
659.. warning:: This command can't be executed twice on the same board as
660 OTP are protected. It is already done for the board
661 provided by STMicroelectronics.
662
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200663Coprocessor firmware on STM32MP15x
664----------------------------------
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100665
666U-Boot can boot the coprocessor before the kernel (coprocessor early boot).
667
668a) Manuallly by using rproc commands (update the bootcmd)
669
670 Configurations::
671
672 # env set name_copro "rproc-m4-fw.elf"
673 # env set dev_copro 0
674 # env set loadaddr_copro 0xC1000000
675
676 Load binary from bootfs partition (number 4) on SD card (mmc 0)::
677
678 # ext4load mmc 0:4 ${loadaddr_copro} ${name_copro}
679
680 => ${filesize} variable is updated with the size of the loaded file.
681
682 Start M4 firmware with remote proc command::
683
684 # rproc init
685 # rproc load ${dev_copro} ${loadaddr_copro} ${filesize}
686 # rproc start ${dev_copro}"00270033
687
688b) Automatically by using FIT feature and generic DISTRO bootcmd
689
690 see examples in the board stm32mp1 directory: fit_copro_kernel_dtb.its
691
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200692 Generate FIT including kernel + device tree + M4 firmware with cfg with M4
693 boot::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100694
695 $> mkimage -f fit_copro_kernel_dtb.its fit_copro_kernel_dtb.itb
696
697 Then using DISTRO configuration file: see extlinux.conf to select the correct
698 configuration:
699
700 - stm32mp157c-ev1-m4
701 - stm32mp157c-dk2-m4
702
703DFU support
704-----------
705
706The DFU is supported on ST board.
707
708The env variable dfu_alt_info is automatically build, and all
709the memory present on the ST boards are exported.
710
711The dfu mode is started by the command::
712
713 STM32MP> dfu 0
714
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200715On EV1 board, booting from SD card, without OP-TEE_::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100716
717 STM32MP> dfu 0 list
718 DFU alt settings list:
719 dev: RAM alt: 0 name: uImage layout: RAM_ADDR
720 dev: RAM alt: 1 name: devicetree.dtb layout: RAM_ADDR
721 dev: RAM alt: 2 name: uramdisk.image.gz layout: RAM_ADDR
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100722 dev: eMMC alt: 3 name: mmc0_fsbl1 layout: RAW_ADDR
723 dev: eMMC alt: 4 name: mmc0_fsbl2 layout: RAW_ADDR
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200724 dev: eMMC alt: 5 name: mmc0_fip layout: RAW_ADDR
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100725 dev: eMMC alt: 6 name: mmc0_bootfs layout: RAW_ADDR
726 dev: eMMC alt: 7 name: mmc0_vendorfs layout: RAW_ADDR
727 dev: eMMC alt: 8 name: mmc0_rootfs layout: RAW_ADDR
728 dev: eMMC alt: 9 name: mmc0_userfs layout: RAW_ADDR
729 dev: eMMC alt: 10 name: mmc1_boot1 layout: RAW_ADDR
730 dev: eMMC alt: 11 name: mmc1_boot2 layout: RAW_ADDR
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200731 dev: eMMC alt: 12 name: mmc1_fip layout: RAW_ADDR
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100732 dev: eMMC alt: 13 name: mmc1_bootfs layout: RAW_ADDR
733 dev: eMMC alt: 14 name: mmc1_vendorfs layout: RAW_ADDR
734 dev: eMMC alt: 15 name: mmc1_rootfs layout: RAW_ADDR
735 dev: eMMC alt: 16 name: mmc1_userfs layout: RAW_ADDR
736 dev: MTD alt: 17 name: nor0 layout: RAW_ADDR
Patrick Delaunayb82c97e2021-11-25 11:54:53 +0100737 dev: MTD alt: 18 name: nor1 layout: RAW_ADDR
738 dev: MTD alt: 19 name: nand0 layout: RAW_ADDR
739 dev: VIRT alt: 20 name: OTP layout: RAW_ADDR
740 dev: VIRT alt: 21 name: PMIC layout: RAW_ADDR
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100741
742All the supported device are exported for dfu-util tool::
743
744 $> dfu-util -l
Patrick Delaunayb82c97e2021-11-25 11:54:53 +0100745 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=21, name="PMIC", serial="002700333338511934383330"
746 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=20, name="OTP", serial="002700333338511934383330"
747 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=19, name="nand0", serial="002700333338511934383330"
748 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=18, name="nor1", serial="002700333338511934383330"
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100749 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=17, name="nor0", serial="002700333338511934383330"
750 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=16, name="mmc1_userfs", serial="002700333338511934383330"
751 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=15, name="mmc1_rootfs", serial="002700333338511934383330"
752 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=14, name="mmc1_vendorfs", serial="002700333338511934383330"
753 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=13, name="mmc1_bootfs", serial="002700333338511934383330"
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200754 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=12, name="mmc1_fip", serial="002700333338511934383330"
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100755 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=11, name="mmc1_boot2", serial="002700333338511934383330"
756 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=10, name="mmc1_boot1", serial="002700333338511934383330"
757 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=9, name="mmc0_userfs", serial="002700333338511934383330"
758 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=8, name="mmc0_rootfs", serial="002700333338511934383330"
759 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=7, name="mmc0_vendorfs", serial="002700333338511934383330"
760 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=6, name="mmc0_bootfs", serial="002700333338511934383330"
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200761 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=5, name="mmc0_fip", serial="002700333338511934383330"
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100762 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=4, name="mmc0_fsbl2", serial="002700333338511934383330"
763 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=3, name="mmc0_fsbl1", serial="002700333338511934383330"
764 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=2, name="uramdisk.image.gz", serial="002700333338511934383330"
765 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=1, name="devicetree.dtb", serial="002700333338511934383330"
766 Found DFU: [0483:df11] ver=9999, devnum=99, cfg=1, intf=0, alt=0, name="uImage", serial="002700333338511934383330"
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100767
768You can update the boot device:
769
Patrick Delaunaya1d36ed2022-05-20 18:24:54 +0200770- SD card (mmc0)::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100771
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200772 $> dfu-util -d 0483:5720 -a 3 -D tf-a-stm32mp157c-ev1.stm32
773 $> dfu-util -d 0483:5720 -a 4 -D tf-a-stm32mp157c-ev1.stm32
774 $> dfu-util -d 0483:5720 -a 5 -D fip-stm32mp157c-ev1.bin
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100775 $> dfu-util -d 0483:5720 -a 6 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
776 $> dfu-util -d 0483:5720 -a 7 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
777 $> dfu-util -d 0483:5720 -a 8 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
778 $> dfu-util -d 0483:5720 -a 9 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
779
780- EMMC (mmc1)::
781
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200782 $> dfu-util -d 0483:5720 -a 10 -D tf-a-stm32mp157c-ev1.stm32
783 $> dfu-util -d 0483:5720 -a 11 -D tf-a-stm32mp157c-ev1.stm32
784 $> dfu-util -d 0483:5720 -a 12 -D fip-stm32mp157c-ev1.bin
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100785 $> dfu-util -d 0483:5720 -a 13 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
786 $> dfu-util -d 0483:5720 -a 14 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
787 $> dfu-util -d 0483:5720 -a 15 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
788 $> dfu-util -d 0483:5720 -a 16 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
789
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100790- you can also dump the OTP and the PMIC NVM with::
791
792 $> dfu-util -d 0483:5720 -a 19 -U otp.bin
793 $> dfu-util -d 0483:5720 -a 20 -U pmic.bin
794
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100795
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100796When the board is booting for nor0 or nand0,
797only the MTD partition on the boot devices are available, for example:
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100798
Patrick Delaunayb82c97e2021-11-25 11:54:53 +0100799- NOR (nor0 = alt 20, nor1 = alt 26) & NAND (nand0 = alt 27) :
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100800
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200801 $> dfu-util -d 0483:5720 -a 21 -D tf-a-stm32mp157c-ev1.stm32
802 $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1.stm32
803 $> dfu-util -d 0483:5720 -a 23 -D fip-stm32mp157c-ev1.bin
Patrick Delaunayb82c97e2021-11-25 11:54:53 +0100804 $> dfu-util -d 0483:5720 -a 28 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100805
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100806- NAND (nand0 = alt 21)::
Patrick Delaunay5f6fdcc2020-02-25 19:04:14 +0100807
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200808 $> dfu-util -d 0483:5720 -a 22 -D tf-a-stm32mp157c-ev1.stm32
809 $> dfu-util -d 0483:5720 -a 23 -D fip-stm32mp157c-ev1.bin
810 $> dfu-util -d 0483:5720 -a 24 -D fip-stm32mp157c-ev1.bin
Patrick Delaunayccf64ef2020-03-18 09:22:54 +0100811 $> dfu-util -d 0483:5720 -a 25 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
Patrick Delaunay3e70d3c2021-07-26 11:21:37 +0200812
813References
814----------
815
816.. _WIKI:
817
818STM32 Arm® Cortex®-based MPUs user guide
819
820 + https://wiki.st.com/
821 + https://wiki.st.com/stm32mpu/wiki/Main_Page
822
823.. _TF-A:
824
825TF-A = The Trusted Firmware-A project provides a reference implementation of
826secure world software for Armv7-A and Armv8-A class processors
827
828 + https://www.trustedfirmware.org/projects/tf-a/
829 + https://trustedfirmware-a.readthedocs.io/en/latest/
830 + https://trustedfirmware-a.readthedocs.io/en/latest/plat/stm32mp1.html
831 + https://git.trustedfirmware.org/TF-A/trusted-firmware-a.git/
832
833.. _OP-TEE:
834
835OP-TEE = an open source Trusted Execution Environment (TEE) implementing the
836Arm TrustZone technology
837
838 + https://www.op-tee.org/
839 + https://optee.readthedocs.io/en/latest/
840 + https://optee.readthedocs.io/en/latest/building/devices/stm32mp1.html
841 + https://github.com/OP-TEE/optee_os