b3856be9a151d95f1d61ad2399ed04108b9a48ae
[oweals/u-boot.git] / doc / board / st / stm32mp1.rst
1 .. SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
2 .. sectionauthor:: Patrick Delaunay <patrick.delaunay@st.com>
3
4 STM32MP15x boards
5 =================
6
7 This is a quick instruction for setup STM32MP15x boards.
8
9 Supported devices
10 -----------------
11
12 U-Boot supports STMP32MP15x SoCs:
13
14  - STM32MP157
15  - STM32MP153
16  - STM32MP151
17
18 The STM32MP15x is a Cortex-A MPU aimed at various applications.
19
20 It features:
21
22  - Dual core Cortex-A7 application core (Single on STM32MP151)
23  - 2D/3D image composition with GPU (only on STM32MP157)
24  - Standard memories interface support
25  - Standard connectivity, widely inherited from the STM32 MCU family
26  - Comprehensive security support
27
28 Each line comes with a security option (cryptography & secure boot) and
29 a Cortex-A frequency option:
30
31  - A : Cortex-A7 @ 650 MHz
32  - C : Secure Boot + HW Crypto + Cortex-A7 @ 650 MHz
33  - D : Cortex-A7 @ 800 MHz
34  - F : Secure Boot + HW Crypto + Cortex-A7 @ 800 MHz
35
36 Everything is supported in Linux but U-Boot is limited to:
37
38  1. UART
39  2. SD card/MMC controller (SDMMC)
40  3. NAND controller (FMC)
41  4. NOR controller (QSPI)
42  5. USB controller (OTG DWC2)
43  6. Ethernet controller
44
45 And the necessary drivers
46
47  1. I2C
48  2. STPMIC1 (PMIC and regulator)
49  3. Clock, Reset, Sysreset
50  4. Fuse
51
52 Currently the following boards are supported:
53
54  + stm32mp157a-dk1.dts
55  + stm32mp157c-dk2.dts
56  + stm32mp157c-ed1.dts
57  + stm32mp157c-ev1.dts
58  + stm32mp15xx-dhcor-avenger96.dts
59
60 Boot Sequences
61 --------------
62
63 3 boot configurations are supported with:
64
65 +----------+------------------------+-------------------------+--------------+
66 | **ROM**  | **FSBL**               | **SSBL**                | **OS**       |
67 + **code** +------------------------+-------------------------+--------------+
68 |          | First Stage Bootloader | Second Stage Bootloader | Linux Kernel |
69 +          +------------------------+-------------------------+--------------+
70 |          | embedded RAM           | DDR                                    |
71 +----------+------------------------+-------------------------+--------------+
72
73 The **Trusted** boot chain
74 ``````````````````````````
75
76 defconfig_file : stm32mp15_trusted_defconfig
77
78     +-------------+-------------------------+------------+-------+
79     |  ROM code   | FSBL                    | SSBL       | OS    |
80     +             +-------------------------+------------+-------+
81     |             |Trusted Firmware-A (TF-A)| U-Boot     | Linux |
82     +-------------+-------------------------+------------+-------+
83     | TrustZone   |TF-A secure monitor                           |
84     +-------------+-------------------------+------------+-------+
85
86 TF-A performs a full initialization of Secure peripherals and installs a
87 secure monitor (BL32=SPMin).
88
89 U-Boot is running in normal world and uses TF-A monitor to access
90 to secure resources.
91
92 The **Trusted** boot chain with **OP-TEE**
93 ``````````````````````````````````````````
94
95 defconfig_file : stm32mp15_optee_defconfig
96
97     +-------------+-------------------------+------------+-------+
98     |  ROM code   | FSBL                    | SSBL       | OS    |
99     +             +-------------------------+------------+-------+
100     |             |Trusted Firmware-A (TF-A)| U-Boot     | Linux |
101     +-------------+-------------------------+------------+-------+
102     | TrustZone   |OP-TEE                                        |
103     +-------------+-------------------------+------------+-------+
104
105 TF-A performs a full initialization of Secure peripherals and installs OP-TEE
106 from specific partitions (teeh, teed, teex).
107
108 U-Boot is running in normal world and uses OP-TEE monitor to access
109 to secure resources.
110
111 The **Basic** boot chain
112 ````````````````````````
113
114 defconfig_file : stm32mp15_basic_defconfig
115
116     +-------------+------------+------------+-------+
117     |  ROM code   | FSBL       | SSBL       | OS    |
118     +             +------------+------------+-------+
119     |             |U-Boot SPL  | U-Boot     | Linux |
120     +-------------+------------+------------+-------+
121     | TrustZone   |            | PSCI from U-Boot   |
122     +-------------+------------+------------+-------+
123
124 SPL has limited security initialization
125
126 U-Boot is running in secure mode and provide a secure monitor to the kernel
127 with only PSCI support (Power State Coordination Interface defined by ARM).
128
129 All the STM32MP15x boards supported by U-Boot use the same generic board
130 stm32mp1 which support all the bootable devices.
131
132 Each board is configured only with the associated device tree.
133
134 Device Tree Selection
135 ---------------------
136
137 You need to select the appropriate device tree for your board,
138 the supported device trees for STM32MP15x are:
139
140 + ev1: eval board with pmic stpmic1 (ev1 = mother board + daughter ed1)
141
142    + stm32mp157c-ev1
143
144 + ed1: daughter board with pmic stpmic1
145
146    + stm32mp157c-ed1
147
148 + dk1: Discovery board
149
150    + stm32mp157a-dk1
151
152 + dk2: Discovery board = dk1 with a BT/WiFI combo and a DSI panel
153
154    + stm32mp157c-dk2
155
156 + avenger96: Avenger96 board from Arrow Electronics based on DH Elec. DHCOR SoM
157
158    + stm32mp15xx-dhcor-avenger96
159
160 Build Procedure
161 ---------------
162
163 1. Install the required tools for U-Boot
164
165    * install package needed in U-Boot makefile
166      (libssl-dev, swig, libpython-dev...)
167
168    * install ARMv7 toolchain for 32bit Cortex-A (from Linaro,
169      from SDK for STM32MP15x, or any crosstoolchains from your distribution)
170      (you can use any gcc cross compiler compatible with U-Boot)
171
172 2. Set the cross compiler::
173
174     # export CROSS_COMPILE=/path/to/toolchain/arm-linux-gnueabi-
175
176 3. Select the output directory (optional)::
177
178    # export KBUILD_OUTPUT=/path/to/output
179
180    for example: use one output directory for each configuration::
181
182    # export KBUILD_OUTPUT=stm32mp15_trusted
183    # export KBUILD_OUTPUT=stm32mp15_optee
184    # export KBUILD_OUTPUT=stm32mp15_basic
185
186    you can build outside of code directory::
187
188    # export KBUILD_OUTPUT=../build/stm32mp15_trusted
189
190 4. Configure U-Boot::
191
192    # make <defconfig_file>
193
194    with <defconfig_file>:
195
196    - For **trusted** boot mode : **stm32mp15_trusted_defconfig**
197    - For **trusted** with OP-TEE boot mode : **stm32mp15_optee_defconfig**
198    - For basic boot mode: stm32mp15_basic_defconfig
199
200 5. Configure the device-tree and build the U-Boot image::
201
202    # make DEVICE_TREE=<name> all
203
204    Examples:
205
206   a) trusted boot on ev1::
207
208      # export KBUILD_OUTPUT=stm32mp15_trusted
209      # make stm32mp15_trusted_defconfig
210      # make DEVICE_TREE=stm32mp157c-ev1 all
211
212   b) trusted with OP-TEE boot on dk2::
213
214       # export KBUILD_OUTPUT=stm32mp15_optee
215       # make stm32mp15_optee_defconfig
216       # make DEVICE_TREE=stm32mp157c-dk2 all
217
218   c) basic boot on ev1::
219
220       # export KBUILD_OUTPUT=stm32mp15_basic
221       # make stm32mp15_basic_defconfig
222       # make DEVICE_TREE=stm32mp157c-ev1 all
223
224   d) basic boot on ed1::
225
226       # export KBUILD_OUTPUT=stm32mp15_basic
227       # make stm32mp15_basic_defconfig
228       # make DEVICE_TREE=stm32mp157c-ed1 all
229
230   e) basic boot on dk1::
231
232      # export KBUILD_OUTPUT=stm32mp15_basic
233      # make stm32mp15_basic_defconfig
234      # make DEVICE_TREE=stm32mp157a-dk1 all
235
236   f) basic boot on avenger96::
237
238      # export KBUILD_OUTPUT=stm32mp15_basic
239      # make stm32mp15_basic_defconfig
240      # make DEVICE_TREE=stm32mp15xx-dhcor-avenger96 all
241
242 6. Output files
243
244    BootRom and TF-A expect binaries with STM32 image header
245    SPL expects file with U-Boot uImage header
246
247    So in the output directory (selected by KBUILD_OUTPUT),
248    you can found the needed files:
249
250   - For **Trusted** boot (with or without OP-TEE)
251
252      - FSBL = **tf-a.stm32** (provided by TF-A compilation)
253      - SSBL = **u-boot.stm32**
254
255   - For Basic boot
256
257      - FSBL = spl/u-boot-spl.stm32
258      - SSBL = u-boot.img
259
260 Switch Setting for Boot Mode
261 ----------------------------
262
263 You can select the boot mode, on the board with one switch, to select
264 the boot pin values = BOOT0, BOOT1, BOOT2
265
266   +-------------+---------+---------+---------+
267   |*Boot Mode*  | *BOOT2* | *BOOT1* | *BOOT0* |
268   +=============+=========+=========+=========+
269   | Recovery    |  0      |  0      |  0      |
270   +-------------+---------+---------+---------+
271   | NOR         |  0      |  0      |  1      |
272   +-------------+---------+---------+---------+
273   | eMMC        |  0      |  1      |  0      |
274   +-------------+---------+---------+---------+
275   | NAND        |  0      |  1      |  1      |
276   +-------------+---------+---------+---------+
277   | Reserved    |  1      |  0      |  0      |
278   +-------------+---------+---------+---------+
279   | SD-Card     |  1      |  0      |  1      |
280   +-------------+---------+---------+---------+
281   | Recovery    |  1      |  1      |  0      |
282   +-------------+---------+---------+---------+
283   | SPI-NAND    |  1      |  1      |  1      |
284   +-------------+---------+---------+---------+
285
286 - on the **daugther board ed1 = MB1263** with the switch SW1
287 - on **Avenger96** with switch S3 (NOR and SPI-NAND are not applicable)
288 - on board **DK1/DK2** with the switch SW1 = BOOT0, BOOT2
289   with only 2 pins available (BOOT1 is forced to 0 and NOR not supported),
290   the possible value becomes:
291
292     +-------------+---------+---------+
293     |*Boot Mode*  | *BOOT2* | *BOOT0* |
294     +=============+=========+=========+
295     | Recovery    |  0      |  0      |
296     +-------------+---------+---------+
297     | NOR     (NA)|  0      |  1      |
298     +-------------+---------+---------+
299     | Reserved    |  1      |  0      |
300     +-------------+---------+---------+
301     | SD-Card     |  1      |  1      |
302     +-------------+---------+---------+
303
304 Recovery is a boot from serial link (UART/USB) and it is used with
305 STM32CubeProgrammer tool to load executable in RAM and to update the flash
306 devices available on the board (NOR/NAND/eMMC/SD card).
307
308 The communication between HOST and board is based on
309
310   - for UARTs : the uart protocol used with all MCU STM32
311   - for USB : based on USB DFU 1.1 (without the ST extensions used on MCU STM32)
312
313 Prepare an SD card
314 ------------------
315
316 The minimal requirements for STMP32MP15x boot up to U-Boot are:
317
318 - GPT partitioning (with gdisk or with sgdisk)
319 - 2 fsbl partitions, named fsbl1 and fsbl2, size at least 256KiB
320 - one ssbl partition for U-Boot
321
322 Then the minimal GPT partition is:
323
324   +-------+--------+---------+-------------+
325   | *Num* | *Name* | *Size*  | *Content*   |
326   +=======+========+=========+=============+
327   | 1     | fsbl1  | 256 KiB | TF-A or SPL |
328   +-------+--------+---------+-------------+
329   | 2     | fsbl2  | 256 KiB | TF-A or SPL |
330   +-------+--------+---------+-------------+
331   | 3     | ssbl   | enought | U-Boot      |
332   +-------+--------+---------+-------------+
333   | 4     | <any>  | <any>   | Rootfs      |
334   +-------+--------+---------+-------------+
335
336 Add a 4th partition (Rootfs) marked bootable with a file extlinux.conf
337 following the Generic Distribution feature (doc/README.distro for use).
338
339 According the used card reader select the correct block device
340 (for example /dev/sdx or /dev/mmcblk0).
341
342 In the next example, it is /dev/mmcblk0
343
344 For example: with gpt table with 128 entries
345
346 a) remove previous formatting::
347
348      # sgdisk -o /dev/<SD card dev>
349
350 b) create minimal image::
351
352     # sgdisk --resize-table=128 -a 1 \
353     -n 1:34:545         -c 1:fsbl1 \
354     -n 2:546:1057               -c 2:fsbl2 \
355     -n 3:1058:5153              -c 3:ssbl \
356     -n 4:5154:              -c 4:rootfs \
357     -p /dev/<SD card dev>
358
359   With other partition for kernel one partition rootfs for kernel.
360
361 c) copy the FSBL (2 times) and SSBL file on the correct partition.
362    in this example in partition 1 to 3
363
364    for basic boot mode : <SD card dev> = /dev/mmcblk0::
365
366     # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p1
367     # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p2
368     # dd if=u-boot.img of=/dev/mmcblk0p3
369
370    for trusted boot mode: ::
371
372     # dd if=tf-a.stm32 of=/dev/mmcblk0p1
373     # dd if=tf-a.stm32 of=/dev/mmcblk0p2
374     # dd if=u-boot.stm32 of=/dev/mmcblk0p3
375
376 To boot from SD card, select BootPinMode = 1 0 1 and reset.
377
378 Prepare eMMC
379 ------------
380
381 You can use U-Boot to copy binary in eMMC.
382
383 In the next example, you need to boot from SD card and the images
384 (u-boot-spl.stm32, u-boot.img) are presents on SD card (mmc 0)
385 in ext4 partition 4 (bootfs).
386
387 To boot from SD card, select BootPinMode = 1 0 1 and reset.
388
389 Then you update the eMMC with the next U-Boot command :
390
391 a) prepare GPT on eMMC,
392    example with 2 partitions, bootfs and roots::
393
394     # setenv emmc_part "name=ssbl,size=2MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
395     # gpt write mmc 1 ${emmc_part}
396
397 b) copy SPL on eMMC on firts boot partition
398    (SPL max size is 256kB, with LBA 512, 0x200)::
399
400     # ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32
401     # mmc dev 1
402     # mmc partconf 1 1 1 1
403     # mmc write ${fileaddr} 0 200
404     # mmc partconf 1 1 1 0
405
406 c) copy U-Boot in first GPT partition of eMMC::
407
408     # ext4load mmc 0:4 0xC0000000 u-boo t.img
409     # mmc dev 1
410     # part start mmc 1 1 partstart
411     # mmc write ${fileaddr} ${partstart} ${filesize}
412
413 To boot from eMMC, select BootPinMode = 0 1 0 and reset.
414
415 MAC Address
416 -----------
417
418 Please read doc/README.enetaddr for the implementation guidelines for mac id
419 usage. Basically, environment has precedence over board specific storage.
420
421 For STMicroelectonics board, it is retrieved in STM32MP15x OTP :
422
423  - OTP_57[31:0] = MAC_ADDR[31:0]
424  - OTP_58[15:0] = MAC_ADDR[47:32]
425
426 To program a MAC address on virgin OTP words above, you can use the fuse command
427 on bank 0 to access to internal OTP and lock them:
428
429 Prerequisite: check if a MAC address isn't yet programmed in OTP
430
431 1) check OTP: their value must be equal to 0::
432
433     STM32MP> fuse sense 0 57 2
434     Sensing bank 0:
435     Word 0x00000039: 00000000 00000000
436
437 2) check environment variable::
438
439     STM32MP> env print ethaddr
440     ## Error: "ethaddr" not defined
441
442 3) check lock status of fuse 57 & 58 (at 0x39, 0=unlocked, 1=locked)::
443
444     STM32MP> fuse sense 0 0x10000039 2
445     Sensing bank 0:
446        Word 0x10000039: 00000000 00000000
447
448 Example to set mac address "12:34:56:78:9a:bc"
449
450 1) Write OTP::
451
452     STM32MP> fuse prog -y 0 57 0x78563412 0x0000bc9a
453
454 2) Read OTP::
455
456     STM32MP> fuse sense 0 57 2
457     Sensing bank 0:
458     Word 0x00000039: 78563412 0000bc9a
459
460 3) Lock OTP::
461
462     STM32MP> fuse prog 0 0x10000039 1 1
463
464     STM32MP> fuse sense 0 0x10000039 2
465     Sensing bank 0:
466        Word 0x10000039: 00000001 00000001
467
468 4) next REBOOT, in the trace::
469
470     ### Setting environment from OTP MAC address = "12:34:56:78:9a:bc"
471
472 5) check env update::
473
474     STM32MP> env print ethaddr
475     ethaddr=12:34:56:78:9a:bc
476
477 .. warning:: This command can't be executed twice on the same board as
478              OTP are protected. It is already done for the board
479              provided by STMicroelectronics.
480
481 Coprocessor firmware
482 --------------------
483
484 U-Boot can boot the coprocessor before the kernel (coprocessor early boot).
485
486 a) Manuallly by using rproc commands (update the bootcmd)
487
488    Configurations::
489
490         # env set name_copro "rproc-m4-fw.elf"
491         # env set dev_copro 0
492         # env set loadaddr_copro 0xC1000000
493
494    Load binary from bootfs partition (number 4) on SD card (mmc 0)::
495
496         # ext4load mmc 0:4 ${loadaddr_copro} ${name_copro}
497
498    => ${filesize} variable is updated with the size of the loaded file.
499
500    Start M4 firmware with remote proc command::
501
502         # rproc init
503         # rproc load ${dev_copro} ${loadaddr_copro} ${filesize}
504         # rproc start ${dev_copro}"00270033
505
506 b) Automatically by using FIT feature and generic DISTRO bootcmd
507
508    see examples in the board stm32mp1 directory: fit_copro_kernel_dtb.its
509
510    Generate FIT including kernel + device tree + M4 firmware with cfg with M4 boot::
511
512    $> mkimage -f fit_copro_kernel_dtb.its fit_copro_kernel_dtb.itb
513
514    Then using DISTRO configuration file: see extlinux.conf to select the correct
515    configuration:
516
517    - stm32mp157c-ev1-m4
518    - stm32mp157c-dk2-m4
519
520 DFU support
521 -----------
522
523 The DFU is supported on ST board.
524
525 The env variable dfu_alt_info is automatically build, and all
526 the memory present on the ST boards are exported.
527
528 The dfu mode is started by the command::
529
530   STM32MP> dfu 0
531
532 On EV1 board, booting from SD card, without OP-TEE::
533
534   STM32MP> dfu 0 list
535   DFU alt settings list:
536   dev: RAM alt: 0 name: uImage layout: RAM_ADDR
537   dev: RAM alt: 1 name: devicetree.dtb layout: RAM_ADDR
538   dev: RAM alt: 2 name: uramdisk.image.gz layout: RAM_ADDR
539   dev: eMMC alt: 3 name: sdcard_fsbl1 layout: RAW_ADDR
540   dev: eMMC alt: 4 name: sdcard_fsbl2 layout: RAW_ADDR
541   dev: eMMC alt: 5 name: sdcard_ssbl layout: RAW_ADDR
542   dev: eMMC alt: 6 name: sdcard_bootfs layout: RAW_ADDR
543   dev: eMMC alt: 7 name: sdcard_vendorfs layout: RAW_ADDR
544   dev: eMMC alt: 8 name: sdcard_rootfs layout: RAW_ADDR
545   dev: eMMC alt: 9 name: sdcard_userfs layout: RAW_ADDR
546   dev: eMMC alt: 10 name: emmc_fsbl1 layout: RAW_ADDR
547   dev: eMMC alt: 11 name: emmc_fsbl2 layout: RAW_ADDR
548   dev: eMMC alt: 12 name: emmc_ssbl layout: RAW_ADDR
549   dev: eMMC alt: 13 name: emmc_bootfs layout: RAW_ADDR
550   dev: eMMC alt: 14 name: emmc_vendorfs layout: RAW_ADDR
551   dev: eMMC alt: 15 name: emmc_rootfs layout: RAW_ADDR
552   dev: eMMC alt: 16 name: emmc_userfs layout: RAW_ADDR
553   dev: MTD alt: 17 name: nor_fsbl1 layout: RAW_ADDR
554   dev: MTD alt: 18 name: nor_fsbl2 layout: RAW_ADDR
555   dev: MTD alt: 19 name: nor_ssbl layout: RAW_ADDR
556   dev: MTD alt: 20 name: nor_env layout: RAW_ADDR
557   dev: MTD alt: 21 name: nand_fsbl layout: RAW_ADDR
558   dev: MTD alt: 22 name: nand_ssbl1 layout: RAW_ADDR
559   dev: MTD alt: 23 name: nand_ssbl2 layout: RAW_ADDR
560   dev: MTD alt: 24 name: nand_UBI layout: RAW_ADDR
561   dev: VIRT alt: 25 name: OTP layout: RAW_ADDR
562   dev: VIRT alt: 26 name: PMIC layout: RAW_ADDR
563
564 All the supported device are exported for dfu-util tool::
565
566   $> dfu-util -l
567   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=26, name="PMIC", serial="002700333338511934383330"
568   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=25, name="OTP", serial="002700333338511934383330"
569   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=24, name="nand_UBI", serial="002700333338511934383330"
570   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=23, name="nand_ssbl2", serial="002700333338511934383330"
571   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=22, name="nand_ssbl1", serial="002700333338511934383330"
572   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=21, name="nand_fsbl", serial="002700333338511934383330"
573   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=20, name="nor_env", serial="002700333338511934383330"
574   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=19, name="nor_ssbl", serial="002700333338511934383330"
575   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=18, name="nor_fsbl2", serial="002700333338511934383330"
576   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=17, name="nor_fsbl1", serial="002700333338511934383330"
577   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=16, name="emmc_userfs", serial="002700333338511934383330"
578   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=15, name="emmc_rootfs", serial="002700333338511934383330"
579   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=14, name="emmc_vendorfs", serial="002700333338511934383330"
580   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=13, name="emmc_bootfs", serial="002700333338511934383330"
581   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=12, name="emmc_ssbl", serial="002700333338511934383330"
582   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=11, name="emmc_fsbl2", serial="002700333338511934383330"
583   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=10, name="emmc_fsbl1", serial="002700333338511934383330"
584   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=9, name="sdcard_userfs", serial="002700333338511934383330"
585   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=8, name="sdcard_rootfs", serial="002700333338511934383330"
586   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=7, name="sdcard_vendorfs", serial="002700333338511934383330"
587   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=6, name="sdcard_bootfs", serial="002700333338511934383330"
588   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=5, name="sdcard_ssbl", serial="002700333338511934383330"
589   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=4, name="sdcard_fsbl2", serial="002700333338511934383330"
590   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=3, name="sdcard_fsbl1", serial="002700333338511934383330"
591   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=2, name="uramdisk.image.gz", serial="002700333338511934383330"
592   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=1, name="devicetree.dtb", serial="002700333338511934383330"
593   Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=0, name="uImage", serial="002700333338511934383330"
594
595 You can update the boot device:
596
597 - SD card (mmc0) ::
598
599   $> dfu-util -d 0483:5720 -a 3 -D tf-a-stm32mp157c-ev1-trusted.stm32
600   $> dfu-util -d 0483:5720 -a 4 -D tf-a-stm32mp157c-ev1-trusted.stm32
601   $> dfu-util -d 0483:5720 -a 5 -D u-boot-stm32mp157c-ev1-trusted.img
602   $> dfu-util -d 0483:5720 -a 6 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
603   $> dfu-util -d 0483:5720 -a 7 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
604   $> dfu-util -d 0483:5720 -a 8 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
605   $> dfu-util -d 0483:5720 -a 9 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
606
607 - EMMC (mmc1)::
608
609   $> dfu-util -d 0483:5720 -a 10 -D tf-a-stm32mp157c-ev1-trusted.stm32
610   $> dfu-util -d 0483:5720 -a 11 -D tf-a-stm32mp157c-ev1-trusted.stm32
611   $> dfu-util -d 0483:5720 -a 12 -D u-boot-stm32mp157c-ev1-trusted.img
612   $> dfu-util -d 0483:5720 -a 13 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
613   $> dfu-util -d 0483:5720 -a 14 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
614   $> dfu-util -d 0483:5720 -a 15 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
615   $> dfu-util -d 0483:5720 -a 16 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
616
617 - NOR::
618
619   $> dfu-util -d 0483:5720 -a 17 -D tf-a-stm32mp157c-ev1-trusted.stm32
620   $> dfu-util -d 0483:5720 -a 18 -D tf-a-stm32mp157c-ev1-trusted.stm32
621   $> dfu-util -d 0483:5720 -a 19 -D u-boot-stm32mp157c-ev1-trusted.img
622
623 - NAND (UBI partition used for NAND only boot or NOR + NAND boot)::
624
625   $> dfu-util -d 0483:5720 -a 21 -D tf-a-stm32mp157c-ev1-trusted.stm32
626   $> dfu-util -d 0483:5720 -a 22 -D u-boot-stm32mp157c-ev1-trusted.img
627   $> dfu-util -d 0483:5720 -a 23 -D u-boot-stm32mp157c-ev1-trusted.img
628   $> dfu-util -d 0483:5720 -a 24 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
629
630 - you can also dump the OTP and the PMIC NVM with::
631
632   $> dfu-util -d 0483:5720 -a 25 -U otp.bin
633   $> dfu-util -d 0483:5720 -a 26 -U pmic.bin