xref: /rk3399_ARM-atf/docs/plat/st/stm32mpus.rst (revision a97e1f9747e295af74e032c20c32eb94cfdf2a04)
1ce7f8044SYann GautierSTM32 MPUs
2ce7f8044SYann Gautier==========
3ce7f8044SYann Gautier
4ce7f8044SYann GautierSTM32 MPUs are microprocessors designed by STMicroelectronics
5ce7f8044SYann Gautierbased on Arm Cortex-A. This page presents the common configuration of STM32
6ce7f8044SYann GautierMPUs, more details and dedicated configuration can be found in each STM32 MPU
7ee5076f9SYann Gautierpage (:ref:`STM32MP1` or :ref:`STM32MP2`)
8ce7f8044SYann Gautier
9ce7f8044SYann GautierDesign
10ce7f8044SYann Gautier------
11ce7f8044SYann GautierThe STM32 MPU resets in the ROM code of the Cortex-A.
12ce7f8044SYann GautierThe primary boot core (core 0) executes the boot sequence while
13ce7f8044SYann Gautiersecondary boot core (core 1) is kept in a holding pen loop.
14ce7f8044SYann GautierThe ROM code boot sequence loads the TF-A binary image from boot device
15ce7f8044SYann Gautierto embedded SRAM.
16ce7f8044SYann Gautier
17ce7f8044SYann GautierThe TF-A image must be properly formatted with a STM32 header structure
18ce7f8044SYann Gautierfor ROM code is able to load this image.
19ce7f8044SYann GautierTool stm32image can be used to prepend this header to the generated TF-A binary.
20ce7f8044SYann Gautier
21ce7f8044SYann GautierBoot
22ce7f8044SYann Gautier~~~~
23ce7f8044SYann GautierOnly BL2 (with STM32 header) is loaded by ROM code. The other binaries are
24ce7f8044SYann Gautierinside the FIP binary: BL31 (for Aarch64 platforms), BL32 (OP-TEE), U-Boot
25ce7f8044SYann Gautierand their respective device tree blobs.
26ce7f8044SYann Gautier
27ce7f8044SYann GautierBoot sequence
28ce7f8044SYann Gautier~~~~~~~~~~~~~
29ce7f8044SYann Gautier
30ce7f8044SYann GautierROM code -> BL2 (compiled with RESET_TO_BL2) -> OP-TEE -> BL33 (U-Boot)
31ce7f8044SYann Gautier
32ce7f8044SYann GautierBuild Instructions
33ce7f8044SYann Gautier------------------
34ce7f8044SYann GautierBoot media(s) supported by BL2 must be specified in the build command.
35ce7f8044SYann GautierAvailable storage medias are:
36ce7f8044SYann Gautier
37ce7f8044SYann Gautier- ``STM32MP_SDMMC``
38ce7f8044SYann Gautier- ``STM32MP_EMMC``
39ce7f8044SYann Gautier- ``STM32MP_RAW_NAND``
40ce7f8044SYann Gautier- ``STM32MP_SPI_NAND``
41ce7f8044SYann Gautier- ``STM32MP_SPI_NOR``
42ce7f8044SYann Gautier
43ce7f8044SYann GautierSerial boot devices:
44ce7f8044SYann Gautier
45ce7f8044SYann Gautier- ``STM32MP_UART_PROGRAMMER``
46ce7f8044SYann Gautier- ``STM32MP_USB_PROGRAMMER``
47ce7f8044SYann Gautier
48*40ed77feSYann GautierOnly one storage or serial device should be selected in the build command line,
49*40ed77feSYann Gautierto save space and not overflow SYSRAM size, or else the platform won't build or boot.
50ce7f8044SYann Gautier
51ce7f8044SYann GautierOther configuration flags:
52ce7f8044SYann Gautier
53ce7f8044SYann Gautier- | ``DTB_FILE_NAME``: to precise board device-tree blob to be used.
54ce7f8044SYann Gautier  | Default: stm32mp157c-ev1.dtb
55ce7f8044SYann Gautier- | ``DWL_BUFFER_BASE``: the 'serial boot' load address of FIP,
56ce7f8044SYann Gautier  | default location (end of the first 128MB) is used when absent
57ce7f8044SYann Gautier- | ``STM32MP_RECONFIGURE_CONSOLE``: to re-configure crash console (especially after BL2).
58ce7f8044SYann Gautier  | Default: 0 (disabled)
59ce7f8044SYann Gautier- | ``STM32MP_UART_BAUDRATE``: to select UART baud rate.
60ce7f8044SYann Gautier  | Default: 115200
61ce7f8044SYann Gautier
62ce7f8044SYann Gautier
63ce7f8044SYann GautierPopulate SD-card
64ce7f8044SYann Gautier----------------
65ce7f8044SYann Gautier
66ce7f8044SYann GautierBoot with FIP
67ce7f8044SYann Gautier~~~~~~~~~~~~~
68ce7f8044SYann GautierThe SD-card has to be formatted with GPT.
69ce7f8044SYann GautierIt should contain at least those partitions:
70ce7f8044SYann Gautier
71ce7f8044SYann Gautier- fsbl: to copy the tf-a-stm32mp157c-ev1.stm32 binary (BL2)
72ce7f8044SYann Gautier- fip (GUID 19d5df83-11b0-457b-be2c-7559c13142a5): which contains the FIP binary
73ce7f8044SYann Gautier
74ce7f8044SYann GautierUsually, two copies of fsbl are used (fsbl1 and fsbl2) instead of one partition fsbl.
75ce7f8044SYann Gautier
76ce7f8044SYann Gautier--------------
77ce7f8044SYann Gautier
78*40ed77feSYann Gautier*Copyright (c) 2023-2024, STMicroelectronics - All Rights Reserved*
79