blob: 5d7465a8c85e317c3cc8d9237c3b40189056fd76 [file] [log] [blame]
Tom Rini8b0c8a12018-05-06 18:27:01 -04001SPDX-License-Identifier: GPL-2.0+ OR BSD-3-Clause
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +01002#
3# Copyright (C) 2018 STMicroelectronics - All Rights Reserved
4#
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +01005
Patrick Delaunay36948cc2020-01-28 10:11:04 +01006U-Boot on STMicroelectronics STM32MP15x
7=======================================
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +01008
91. Summary
10==========
11This is a quick instruction for setup stm32mp1 boards.
12
132. Supported devices
14====================
Patrick Delaunay36948cc2020-01-28 10:11:04 +010015U-Boot supports STMP32MP15x SoCs: STM32MP157, STM32MP153 and STM32MP151
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010016
Patrick Delaunay36948cc2020-01-28 10:11:04 +010017The STM32MP15x is a Cortex-A MPU aimed at various applications.
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010018It features:
Patrick Delaunay36948cc2020-01-28 10:11:04 +010019- Dual core Cortex-A7 application core (Single on STM32MP151)
20- 2D/3D image composition with GPU (only on STM32MP157)
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010021- Standard memories interface support
22- Standard connectivity, widely inherited from the STM32 MCU family
23- Comprehensive security support
24
25Everything is supported in Linux but U-Boot is limited to:
261. UART
272. SDCard/MMC controller (SDMMC)
Patrick Delaunay72e80f52019-07-05 17:20:18 +0200283. NAND controller (FMC)
294. NOR controller (QSPI)
305. USB controller (OTG DWC2)
316. Ethernet controller
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010032
33And the necessary drivers
341. I2C
Patrick Delaunayd79218f2019-02-04 11:26:17 +0100352. STPMIC1 (PMIC and regulator)
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200363. Clock, Reset, Sysreset
374. Fuse
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010038
39Currently the following boards are supported:
Patrick Delaunay36948cc2020-01-28 10:11:04 +010040+ stm32mp157a-avenger96.dts
41+ stm32mp157a-dk1.dts
42+ stm32mp157c-dk2.dts
43+ stm32mp157c-ed1.dts
44+ stm32mp157c-ev1.dts
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010045
463. Boot Sequences
47=================
48
49BootRom => FSBL in SYSRAM => SSBL in DDR => OS (Linux Kernel)
50
51with FSBL = First Stage Bootloader
52 SSBL = Second Stage Bootloader
53
Patrick Delaunayff215a42019-07-02 13:26:06 +0200543 boot configurations are supported:
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010055
Patrick Delaunay5d061412019-02-12 11:44:39 +0100561) The "Trusted" boot chain (defconfig_file : stm32mp15_trusted_defconfig)
57 BootRom => FSBL = Trusted Firmware-A (TF-A) => SSBL = U-Boot
58 TF-A performs a full initialization of Secure peripherals and installs a
59 secure monitor.
60 U-Boot is running in normal world and uses TF-A monitor
Patrick Delaunay72e80f52019-07-05 17:20:18 +020061 to access to secure resources.
Patrick Delaunay5d061412019-02-12 11:44:39 +010062
Patrick Delaunayff215a42019-07-02 13:26:06 +0200632) The "Trusted" boot chain with OP-TEE
64 (defconfig_file : stm32mp15_optee_defconfig)
65 BootRom => FSBL = Trusted Firmware-A (TF-A) => SSBL = U-Boot
66 TF-A performs a full initialization of Secure peripherals and installs OP-TEE
67 from specific partitions (teeh, teed, teex).
68 U-Boot is running in normal world and uses OP-TEE monitor to access
69 to secure resources.
70
713) The "Basic" boot chain (defconfig_file : stm32mp15_basic_defconfig)
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010072 BootRom => FSBL = U-Boot SPL => SSBL = U-Boot
73 SPL has limited security initialisation
74 U-Boot is running in secure mode and provide a secure monitor to the kernel
Patrick Delaunay72e80f52019-07-05 17:20:18 +020075 with only PSCI support (Power State Coordination Interface defined by ARM).
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010076
Patrick Delaunay36948cc2020-01-28 10:11:04 +010077All the STM32MP15x boards supported by U-Boot use the same generic board
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010078stm32mp1 which support all the bootable devices.
79
80Each board is configurated only with the associated device tree.
81
824. Device Tree Selection
83========================
84
85You need to select the appropriate device tree for your board,
86the supported device trees for stm32mp157 are:
87
Patrick Delaunayd79218f2019-02-04 11:26:17 +010088+ ev1: eval board with pmic stpmic1 (ev1 = mother board + daughter ed1)
Patrick Delaunaye7f435d2018-07-09 15:17:22 +020089 dts: stm32mp157c-ev1
90
Patrick Delaunayd79218f2019-02-04 11:26:17 +010091+ ed1: daughter board with pmic stpmic1
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +010092 dts: stm32mp157c-ed1
93
Patrice Chotardfe5b5392019-02-12 16:50:39 +010094+ dk1: Discovery board
95 dts: stm32mp157a-dk1
96
97+ dk2: Discovery board = dk1 with a BT/WiFI combo and a DSI panel
98 dts: stm32mp157c-dk2
99
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530100+ avenger96: Avenger96 board from Arrow Electronics
101 dts: stm32mp157a-avenger96
102
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +01001035. Build Procedure
104==================
105
1061. Install required tools for U-Boot
107
108 + install package needed in U-Boot makefile
109 (libssl-dev, swig, libpython-dev...)
110 + install ARMv7 toolchain for 32bit Cortex-A (from Linaro,
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100111 from SDK for STM32MP15x, or any crosstoolchains from your distribution)
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100112
1132. Set the cross compiler:
114
115 # export CROSS_COMPILE=/path/to/toolchain/arm-linux-gnueabi-
116 (you can use any gcc cross compiler compatible with U-Boot)
117
1183. Select the output directory (optional)
119
120 # export KBUILD_OUTPUT=/path/to/output
121
122 for example: use one output directory for each configuration
Patrick Delaunay5d061412019-02-12 11:44:39 +0100123 # export KBUILD_OUTPUT=stm32mp15_trusted
Patrick Delaunayff215a42019-07-02 13:26:06 +0200124 # export KBUILD_OUTPUT=stm32mp15_optee
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100125 # export KBUILD_OUTPUT=stm32mp15_basic
126
Patrick Delaunay72e80f52019-07-05 17:20:18 +0200127 you can build outside of code directory:
128 # export KBUILD_OUTPUT=../build/stm32mp15_trusted
129
Patrick Delaunay5d061412019-02-12 11:44:39 +01001304. Configure U-Boot:
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100131
132 # make <defconfig_file>
133
Patrick Delaunay5d061412019-02-12 11:44:39 +0100134 - For trusted boot mode : "stm32mp15_trusted_defconfig"
Patrick Delaunayff215a42019-07-02 13:26:06 +0200135 - For trusted with OP-TEE boot mode : "stm32mp15_optee_defconfig"
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100136 - For basic boot mode: "stm32mp15_basic_defconfig"
137
1385. Configure the device-tree and build the U-Boot image:
139
140 # make DEVICE_TREE=<name> all
141
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100142 example:
Patrick Delaunay5d061412019-02-12 11:44:39 +0100143 a) trusted boot on ev1
144 # export KBUILD_OUTPUT=stm32mp15_trusted
145 # make stm32mp15_trusted_defconfig
146 # make DEVICE_TREE=stm32mp157c-ev1 all
147
Patrick Delaunayff215a42019-07-02 13:26:06 +0200148 b) trusted with OP-TEE boot on dk2
149 # export KBUILD_OUTPUT=stm32mp15_optee
150 # make stm32mp15_optee_defconfig
151 # make DEVICE_TREE=stm32mp157c-dk2 all
152
153 c) basic boot on ev1
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200154 # export KBUILD_OUTPUT=stm32mp15_basic
155 # make stm32mp15_basic_defconfig
156 # make DEVICE_TREE=stm32mp157c-ev1 all
157
Patrick Delaunayff215a42019-07-02 13:26:06 +0200158 d) basic boot on ed1
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100159 # export KBUILD_OUTPUT=stm32mp15_basic
160 # make stm32mp15_basic_defconfig
161 # make DEVICE_TREE=stm32mp157c-ed1 all
162
Patrick Delaunayff215a42019-07-02 13:26:06 +0200163 e) basic boot on dk1
Patrice Chotardfe5b5392019-02-12 16:50:39 +0100164 # export KBUILD_OUTPUT=stm32mp15_basic
165 # make stm32mp15_basic_defconfig
Patrick Delaunayff215a42019-07-02 13:26:06 +0200166 # make DEVICE_TREE=stm32mp157a-dk1 all
Patrice Chotardfe5b5392019-02-12 16:50:39 +0100167
Patrick Delaunayff215a42019-07-02 13:26:06 +0200168 f) basic boot on avenger96
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530169 # export KBUILD_OUTPUT=stm32mp15_basic
170 # make stm32mp15_basic_defconfig
171 # make DEVICE_TREE=stm32mp157a-avenger96 all
172
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +01001736. Output files
174
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200175 BootRom and TF-A expect binaries with STM32 image header
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100176 SPL expects file with U-Boot uImage header
177
178 So in the output directory (selected by KBUILD_OUTPUT),
179 you can found the needed files:
180
Patrick Delaunayff215a42019-07-02 13:26:06 +0200181 a) For Trusted boot (with or without OP-TEE)
Patrick Delaunay5d061412019-02-12 11:44:39 +0100182 + FSBL = tf-a.stm32 (provided by TF-A compilation)
183 + SSBL = u-boot.stm32
184
185 b) For Basic boot
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100186 + FSBL = spl/u-boot-spl.stm32
187 + SSBL = u-boot.img
188
Patrick Delaunay8d050102018-03-20 10:54:52 +01001896. Switch Setting for Boot Mode
190===============================
191
Patrick Delaunayc0a698c2019-08-02 15:07:22 +0200192You can select the boot mode, on the board with one switch :
Patrick Delaunay8d050102018-03-20 10:54:52 +0100193
Patrick Delaunay72e80f52019-07-05 17:20:18 +0200194- on the daugther board ed1 with the switch SW1 : BOOT0, BOOT1, BOOT2
195
Patrick Delaunay8d050102018-03-20 10:54:52 +0100196 -----------------------------------
197 Boot Mode BOOT2 BOOT1 BOOT0
198 -----------------------------------
199 Reserved 0 0 0
200 NOR 0 0 1
Patrick Delaunay8d050102018-03-20 10:54:52 +0100201 SD-Card 1 0 1
202 eMMC 0 1 0
203 NAND 0 1 1
204 Recovery 1 1 0
205 Recovery 0 0 0
206
Patrice Chotardfe5b5392019-02-12 16:50:39 +0100207- on board DK1/DK2 with the switch SW1 : BOOT0, BOOT2
208 (BOOT1 forced to 0, NOR not supported)
209
210 --------------------------
211 Boot Mode BOOT2 BOOT0
212 --------------------------
213 Reserved 1 0
214 SD-Card 1 1
215 Recovery 0 0
216
Manivannan Sadhasivamd1564072019-05-02 13:26:44 +0530217- Boot mode of Avenger96 can be selected using switch S3
218
219 -----------------------------------
220 Boot Mode BOOT2 BOOT1 BOOT0
221 -----------------------------------
222 Recovery 0 0 0
223 NOR 0 0 1
224 SD-Card 1 0 1
225 eMMC 0 1 0
226 NAND 0 1 1
227 Reserved 1 0 0
228 Recovery 1 1 0
229 SD-Card 1 1 1
230
Patrick Delaunay8d050102018-03-20 10:54:52 +0100231Recovery is a boot from serial link (UART/USB) and it is used with
232STM32CubeProgrammer tool to load executable in RAM and to update the flash
233devices available on the board (NOR/NAND/eMMC/SDCARD).
234The communication between HOST and board is based on
235- for UARTs : the uart protocol used with all MCU STM32
236- for USB : based on USB DFU 1.1 (without the ST extensions used on MCU STM32)
237
2387. Prepare an SDCard
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100239===================
240
241The minimal requirements for STMP32MP1 boot up to U-Boot are:
242- GPT partitioning (with gdisk or with sgdisk)
243- 2 fsbl partitions, named fsbl1 and fsbl2, size at least 256KiB
244- one ssbl partition for U-Boot
245
246Then the minimal GPT partition is:
Patrick Delaunay5d061412019-02-12 11:44:39 +0100247 ----- ------- --------- --------------
248 | Num | Name | Size | Content |
249 ----- ------- -------- ---------------
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200250 | 1 | fsbl1 | 256 KiB | TF-A or SPL |
251 | 2 | fsbl2 | 256 KiB | TF-A or SPL |
Patrick Delaunay5d061412019-02-12 11:44:39 +0100252 | 3 | ssbl | enought | U-Boot |
253 | * | - | - | Boot/Rootfs |
254 ----- ------- --------- --------------
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100255
256(*) add bootable partition for extlinux.conf
257 following Generic Distribution
258 (doc/README.distro for use)
259
260 according the used card reader select the block device
261 (/dev/sdx or /dev/mmcblk0)
262 in the next example I use /dev/mmcblk0
263
264for example: with gpt table with 128 entries
265
266 a) remove previous formatting
267 # sgdisk -o /dev/<SDCard dev>
268
269 b) create minimal image
Patrick Delaunay8d050102018-03-20 10:54:52 +0100270 # sgdisk --resize-table=128 -a 1 \
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100271 -n 1:34:545 -c 1:fsbl1 \
272 -n 2:546:1057 -c 2:fsbl2 \
273 -n 3:1058:5153 -c 3:ssbl \
274 -p /dev/<SDCard dev>
275
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200276 you can add other partitions for kernel
277 one partition rootfs for example:
Patrick Delaunay5d061412019-02-12 11:44:39 +0100278 -n 4:5154: -c 4:rootfs \
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100279
280 c) copy the FSBL (2 times) and SSBL file on the correct partition.
281 in this example in partition 1 to 3
282
283 for basic boot mode : <SDCard dev> = /dev/mmcblk0
284 # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p1
285 # dd if=u-boot-spl.stm32 of=/dev/mmcblk0p2
286 # dd if=u-boot.img of=/dev/mmcblk0p3
287
Patrick Delaunay5d061412019-02-12 11:44:39 +0100288 for trusted boot mode :
289 # dd if=tf-a.stm32 of=/dev/mmcblk0p1
290 # dd if=tf-a.stm32 of=/dev/mmcblk0p2
291 # dd if=u-boot.stm32 of=/dev/mmcblk0p3
292
Patrick Delaunay72e80f52019-07-05 17:20:18 +0200293To boot from SDCard, select BootPinMode = 1 0 1 and reset.
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100294
Patrick Delaunay8d050102018-03-20 10:54:52 +01002958. Prepare eMMC
296===============
297You can use U-Boot to copy binary in eMMC.
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100298
Patrick Delaunay8d050102018-03-20 10:54:52 +0100299In the next example, you need to boot from SDCARD and the images (u-boot-spl.stm32, u-boot.img)
300are presents on SDCARD (mmc 0) in ext4 partition 4 (bootfs).
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100301
Patrick Delaunay5d061412019-02-12 11:44:39 +0100302To boot from SDCard, select BootPinMode = 1 0 1 and reset.
Patrick Delaunay8eb3b1e2018-03-12 10:46:18 +0100303
Patrick Delaunay8d050102018-03-20 10:54:52 +0100304Then you update the eMMC with the next U-Boot command :
305
306a) prepare GPT on eMMC,
307 example with 2 partitions, bootfs and roots:
308
309 # setenv emmc_part "name=ssbl,size=2MiB;name=bootfs,type=linux,bootable,size=64MiB;name=rootfs,type=linux,size=512"
310 # gpt write mmc 1 ${emmc_part}
311
312b) copy SPL on eMMC on firts boot partition
313 (SPL max size is 256kB, with LBA 512, 0x200)
314
315 # ext4load mmc 0:4 0xC0000000 u-boot-spl.stm32
316 # mmc dev 1
317 # mmc partconf 1 1 1 1
318 # mmc write ${fileaddr} 0 200
319 # mmc partconf 1 1 1 0
320
Patrick Delaunay5d061412019-02-12 11:44:39 +0100321c) copy U-Boot in first GPT partition of eMMC
Patrick Delaunay8d050102018-03-20 10:54:52 +0100322
323 # ext4load mmc 0:4 0xC0000000 u-boot.img
324 # mmc dev 1
325 # part start mmc 1 1 partstart
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100326 # mmc write ${fileaddr} ${partstart} ${filesize}
Patrick Delaunay8d050102018-03-20 10:54:52 +0100327
328To boot from eMMC, select BootPinMode = 0 1 0 and reset.
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200329
3309. MAC Address
331==============
332
333Please read doc/README.enetaddr for the implementation guidelines for mac id
334usage. Basically, environment has precedence over board specific storage.
335
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100336For STMicroelectonics board, it is retrieved in STM32MP15x otp :
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200337- OTP_57[31:0] = MAC_ADDR[31:0]
338- OTP_58[15:0] = MAC_ADDR[47:32]
339
340To program a MAC address on virgin OTP words above, you can use the fuse command
341on bank 0 to access to internal OTP:
342
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100343 Prerequisite: check if a MAC address isn't yet programmed in OTP
344
345 1- check OTP: their value must be equal to 0
346
347 STM32MP> fuse sense 0 57 2
348 Sensing bank 0:
349 Word 0x00000039: 00000000 00000000
350
351 2- check environment variable
352
353 STM32MP> env print ethaddr
354 ## Error: "ethaddr" not defined
355
356 Example to set mac address "12:34:56:78:9a:bc"
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200357
358 1- Write OTP
359 STM32MP> fuse prog -y 0 57 0x78563412 0x0000bc9a
360
361 2- Read OTP
362 STM32MP> fuse sense 0 57 2
363 Sensing bank 0:
364 Word 0x00000039: 78563412 0000bc9a
365
366 3- next REBOOT :
367 ### Setting environment from OTP MAC address = "12:34:56:78:9a:bc"
368
369 4 check env update
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100370 STM32MP> env print ethaddr
Patrick Delaunaye7f435d2018-07-09 15:17:22 +0200371 ethaddr=12:34:56:78:9a:bc
Patrick Delaunayc0a698c2019-08-02 15:07:22 +0200372
Patrick Delaunay36948cc2020-01-28 10:11:04 +0100373warning:: This MAC address provisioning can't be executed twice on the same
374 board as the OTP are protected. It is already done for the board
375 provided by STMicroelectronics.
376
Patrick Delaunayc0a698c2019-08-02 15:07:22 +020037710. Coprocessor firmware
378========================
379
380U-Boot can boot the coprocessor before the kernel (coprocessor early boot).
381
382A/ Manuallly by using rproc commands (update the bootcmd)
383 Configurations
384 # env set name_copro "rproc-m4-fw.elf"
385 # env set dev_copro 0
386 # env set loadaddr_copro 0xC1000000
387
388 Load binary from bootfs partition (number 4) on SDCard (mmc 0)
389 # ext4load mmc 0:4 ${loadaddr_copro} ${name_copro}
390 => ${filesize} updated with the size of the loaded file
391
392 Start M4 firmware with remote proc command
393 # rproc init
394 # rproc load ${dev_copro} ${loadaddr_copro} ${filesize}
395 # rproc start ${dev_copro}
396
397B/ Automatically by using FIT feature and generic DISTRO bootcmd
398
399 see examples in this directory :
400
401 Generate FIT including kernel + device tree + M4 firmware
402 with cfg with M4 boot
403 $> mkimage -f fit_copro_kernel_dtb.its fit_copro_kernel_dtb.itb
404
405 Then using DISTRO configuration file: see extlinux.conf to select
406 the correct configuration
407 => stm32mp157c-ev1-m4
408 => stm32mp157c-dk2-m4
Patrick Delaunay093f6e12019-10-14 09:28:09 +0200409
41011. DFU support
411===============
412
413The DFU is supported on ST board.
414The env variable dfu_alt_info is automatically build, and all
415the memory present on the ST boards are exported.
416
417The mode is started by
418
419STM32MP> dfu 0
420
421On EV1 board:
422
423STM32MP> dfu 0 list
424
425DFU alt settings list:
426dev: RAM alt: 0 name: uImage layout: RAM_ADDR
427dev: RAM alt: 1 name: devicetree.dtb layout: RAM_ADDR
428dev: RAM alt: 2 name: uramdisk.image.gz layout: RAM_ADDR
429dev: eMMC alt: 3 name: sdcard_fsbl1 layout: RAW_ADDR
430dev: eMMC alt: 4 name: sdcard_fsbl2 layout: RAW_ADDR
431dev: eMMC alt: 5 name: sdcard_ssbl layout: RAW_ADDR
432dev: eMMC alt: 6 name: sdcard_bootfs layout: RAW_ADDR
433dev: eMMC alt: 7 name: sdcard_vendorfs layout: RAW_ADDR
434dev: eMMC alt: 8 name: sdcard_rootfs layout: RAW_ADDR
435dev: eMMC alt: 9 name: sdcard_userfs layout: RAW_ADDR
436dev: eMMC alt: 10 name: emmc_fsbl1 layout: RAW_ADDR
437dev: eMMC alt: 11 name: emmc_fsbl2 layout: RAW_ADDR
438dev: eMMC alt: 12 name: emmc_ssbl layout: RAW_ADDR
439dev: eMMC alt: 13 name: emmc_bootfs layout: RAW_ADDR
440dev: eMMC alt: 14 name: emmc_vendorfs layout: RAW_ADDR
441dev: eMMC alt: 15 name: emmc_rootfs layout: RAW_ADDR
442dev: eMMC alt: 16 name: emmc_userfs layout: RAW_ADDR
443dev: MTD alt: 17 name: nor_fsbl1 layout: RAW_ADDR
444dev: MTD alt: 18 name: nor_fsbl2 layout: RAW_ADDR
445dev: MTD alt: 19 name: nor_ssbl layout: RAW_ADDR
446dev: MTD alt: 20 name: nor_env layout: RAW_ADDR
447dev: MTD alt: 21 name: nand_fsbl layout: RAW_ADDR
448dev: MTD alt: 22 name: nand_ssbl1 layout: RAW_ADDR
449dev: MTD alt: 23 name: nand_ssbl2 layout: RAW_ADDR
450dev: MTD alt: 24 name: nand_UBI layout: RAW_ADDR
451dev: VIRT alt: 25 name: OTP layout: RAW_ADDR
452dev: VIRT alt: 26 name: PMIC layout: RAW_ADDR
453
454All the supported device are exported for dfu-util tool:
455
456$> dfu-util -l
457Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=26, name="PMIC", serial="002700333338511934383330"
458Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=25, name="OTP", serial="002700333338511934383330"
459Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=24, name="nand_UBI", serial="002700333338511934383330"
460Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=23, name="nand_ssbl2", serial="002700333338511934383330"
461Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=22, name="nand_ssbl1", serial="002700333338511934383330"
462Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=21, name="nand_fsbl", serial="002700333338511934383330"
463Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=20, name="nor_env", serial="002700333338511934383330"
464Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=19, name="nor_ssbl", serial="002700333338511934383330"
465Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=18, name="nor_fsbl2", serial="002700333338511934383330"
466Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=17, name="nor_fsbl1", serial="002700333338511934383330"
467Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=16, name="emmc_userfs", serial="002700333338511934383330"
468Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=15, name="emmc_rootfs", serial="002700333338511934383330"
469Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=14, name="emmc_vendorfs", serial="002700333338511934383330"
470Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=13, name="emmc_bootfs", serial="002700333338511934383330"
471Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=12, name="emmc_ssbl", serial="002700333338511934383330"
472Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=11, name="emmc_fsbl2", serial="002700333338511934383330"
473Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=10, name="emmc_fsbl1", serial="002700333338511934383330"
474Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=9, name="sdcard_userfs", serial="002700333338511934383330"
475Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=8, name="sdcard_rootfs", serial="002700333338511934383330"
476Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=7, name="sdcard_vendorfs", serial="002700333338511934383330"
477Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=6, name="sdcard_bootfs", serial="002700333338511934383330"
478Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=5, name="sdcard_ssbl", serial="002700333338511934383330"
479Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=4, name="sdcard_fsbl2", serial="002700333338511934383330"
480Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=3, name="sdcard_fsbl1", serial="002700333338511934383330"
481Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=2, name="uramdisk.image.gz", serial="002700333338511934383330"
482Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=1, name="devicetree.dtb", serial="002700333338511934383330"
483Found DFU: [0483:5720] ver=9999, devnum=99, cfg=1, intf=0, alt=0, name="uImage", serial="002700333338511934383330"
484
485You can update the boot device:
486
487#SDCARD
488$> dfu-util -d 0483:5720 -a 3 -D tf-a-stm32mp157c-ev1-trusted.stm32
489$> dfu-util -d 0483:5720 -a 4 -D tf-a-stm32mp157c-ev1-trusted.stm32
490$> dfu-util -d 0483:5720 -a 5 -D u-boot-stm32mp157c-ev1-trusted.img
491$> dfu-util -d 0483:5720 -a 6 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
492$> dfu-util -d 0483:5720 -a 7 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
493$> dfu-util -d 0483:5720 -a 8 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
494$> dfu-util -d 0483:5720 -a 9 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
495
496#EMMC
497$> dfu-util -d 0483:5720 -a 10 -D tf-a-stm32mp157c-ev1-trusted.stm32
498$> dfu-util -d 0483:5720 -a 11 -D tf-a-stm32mp157c-ev1-trusted.stm32
499$> dfu-util -d 0483:5720 -a 12 -D u-boot-stm32mp157c-ev1-trusted.img
500$> dfu-util -d 0483:5720 -a 13 -D st-image-bootfs-openstlinux-weston-stm32mp1.ext4
501$> dfu-util -d 0483:5720 -a 14 -D st-image-vendorfs-openstlinux-weston-stm32mp1.ext4
502$> dfu-util -d 0483:5720 -a 15 -D st-image-weston-openstlinux-weston-stm32mp1.ext4
503$> dfu-util -d 0483:5720 -a 16 -D st-image-userfs-openstlinux-weston-stm32mp1.ext4
504
505#NOR
506$> dfu-util -d 0483:5720 -a 17 -D tf-a-stm32mp157c-ev1-trusted.stm32
507$> dfu-util -d 0483:5720 -a 18 -D tf-a-stm32mp157c-ev1-trusted.stm32
508$> dfu-util -d 0483:5720 -a 19 -D u-boot-stm32mp157c-ev1-trusted.img
509
510#NAND (UBI partition used for NAND only boot or NOR + NAND boot)
511$> dfu-util -d 0483:5720 -a 21 -D tf-a-stm32mp157c-ev1-trusted.stm32
512$> dfu-util -d 0483:5720 -a 22 -D u-boot-stm32mp157c-ev1-trusted.img
513$> dfu-util -d 0483:5720 -a 23 -D u-boot-stm32mp157c-ev1-trusted.img
514$> dfu-util -d 0483:5720 -a 24 -D st-image-weston-openstlinux-weston-stm32mp1_nand_4_256_multivolume.ubi
515
516And you can also dump the OTP and the PMIC NVM with:
517
518$> dfu-util -d 0483:5720 -a 25 -U otp.bin
519$> dfu-util -d 0483:5720 -a 26 -U pmic.bin