summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAhmad Fatoum <a.fatoum@pengutronix.de>2022-05-20 13:14:28 +0200
committerSascha Hauer <s.hauer@pengutronix.de>2022-05-23 09:01:14 +0200
commitea21190d061be7a0b3c74e930ba6a36ad0159c75 (patch)
tree8aba83ee34118f46b03b62e18e08f8eccb35fa08
parent6bdcd640333d2370527c8e4e9f70070183e4bfeb (diff)
downloadbarebox-ea21190d061be7a0b3c74e930ba6a36ad0159c75.tar.gz
barebox-ea21190d061be7a0b3c74e930ba6a36ad0159c75.tar.xz
Documentation: boards: stm32mp: document USB bootstrap via DFU
TF-A v2.6 now supports DFU for USB bootstrap on the STM32MP1. This is normally exercised by the STM32CubeProgrammer, but is easily usable with just dfu-util as well. Document how to. Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de> Link: https://lore.barebox.org/20220520111429.2716691-1-a.fatoum@pengutronix.de Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
-rw-r--r--Documentation/boards/stm32mp.rst30
1 files changed, 30 insertions, 0 deletions
diff --git a/Documentation/boards/stm32mp.rst b/Documentation/boards/stm32mp.rst
index 0c9615b290..4cdd281a9e 100644
--- a/Documentation/boards/stm32mp.rst
+++ b/Documentation/boards/stm32mp.rst
@@ -49,6 +49,8 @@ In the above output, images with a ``.stm32`` extension feature the (legacy)
stm32image header. ``barebox-dt-2nd.img`` and ``barebox-stm32mp-generic-bl33.img``
are board-generic barebox images that receive an external device tree.
+.. _stm32mp_fip:
+
Flashing barebox (FIP)
----------------------
@@ -137,6 +139,34 @@ Assuming ``CONFIG_CMD_MMC_EXTCSD`` is enabled and the board shall boot from
The STM32MP1 BootROM does *not* support booting from eMMC without fast boot
acknowledge.
+USB Bootstrap (DFU)
+-------------------
+
+The STM32MP1 can be strapped to boot from USB. After Power-On reset, it
+should be detectable as ``STMicroelectronics STM Device in DFU Mode``
+and can be uploaded to with ``dfu-util(1)``::
+
+ dfu-util --alt 1 -D tf-a-stm32mp157c-my-board.stm32
+ dfu-util --alt 3 -D bl3-firmware.fip
+ dfu-util --alt 0 -e
+
+The first command will talk to the BootROM and upload the first stage
+bootloader (ARM Trusted Firmware-A) into on-chip SRAM.
+
+When compiled with ``STM32MP_USB_PROGRAMMER=1``, TF-A v2.6 or higher
+will seamlessly continue operation of the DFU gadget. The second
+command will talk to TF-A to upload a Firmware Image Package, which
+is a format bundling further firmware including barebox.
+
+The final command will instruct TF-A to boot the loaded images.
+This all happens in volatile memory. To persist images, use
+normal barebox functionality like creating a DFU-gadget in barebox,
+Fastboot/USB mass storage ... etc.
+
+The FIP image containing barebox can be generated as described in
+137::ref:`stm32mp_fip`. Upstream TF-A doesn't support DFU for
+SSBLs using the legacy stm32image format.
+
Boot source selection
---------------------