Registered User m (→Examples) |
Registered User mNo edit summary |
||
Line 7: | Line 7: | ||
== {{MicroprocessorDevice | device=15}} support == | == {{MicroprocessorDevice | device=15}} support == | ||
For detailed information, | For detailed information, read the file in the delivered U-Boot code = {{CodeSource | U-Boot | doc/board/st/stm32mp1.rst}} or the documentation generated by <code>make htlmdocs</code>: {{DocSource | domain=U-Boot | path=board/st/stm32mp1.html}}. | ||
Code : | Code : | ||
Line 19: | Line 17: | ||
* drivers/*/*stm32* : drivers | * drivers/*/*stm32* : drivers | ||
Configuration | Configuration files: | ||
* defconfig file | * defconfig file | ||
** '''{{CodeSource | U-Boot | configs/stm32mp15_defconfig}}''' when FIP is used in OpenSTLinux | ** '''{{CodeSource | U-Boot | configs/stm32mp15_defconfig}}''' when FIP is used in OpenSTLinux | ||
Line 35: | Line 33: | ||
* {{CodeSource | U-Boot | configs/stm32mp15_basic_defconfig}} when SPL is used | * {{CodeSource | U-Boot | configs/stm32mp15_basic_defconfig}} when SPL is used | ||
== Selecting targets : choose defconfig and | == Selecting targets : choose defconfig and device tree == | ||
The [[Boot_chain_overview|STM32 MPU boot chain]] is supported by one [[U-Boot_overview#Kbuild|U-Boot configuration with defconfig]] = {{HighlightParam|stm32mp15_defconfig}} | The [[Boot_chain_overview|STM32 MPU boot chain]] is supported by one [[U-Boot_overview#Kbuild|U-Boot configuration with defconfig]] = {{HighlightParam|stm32mp15_defconfig}} | ||
Line 77: | Line 75: | ||
The output files {{Highlight|'''u-boot.dtb'''}} and {{Highlight|'''u-boot-nodtb.bin'''}} are integrated in [[#U-Boot integration in FIP|FIP]]. | The output files {{Highlight|'''u-boot.dtb'''}} and {{Highlight|'''u-boot-nodtb.bin'''}} are integrated in [[#U-Boot integration in FIP|FIP]]. | ||
Note: All the compiled device trees are available in $KBUILD_OUTPUT/arch/arm/dts/*.dtb.<br/>You can select them instead of {{Highlight|u-boot.dtb}} without U-Boot recompilation. | |||
The ouput file ''u-boot.stm32''' is only generated for {{HighlightParam|stm32mp15_trusted_defconfig}} with {{HighlightParam|CONFIG_STM32MP15x_STM32IMAGE}}; it is not more used for {{EcosystemRelease | revision=4.0.0 | | range=and after}}. | The ouput file ''u-boot.stm32''' is only generated for {{HighlightParam|stm32mp15_trusted_defconfig}} with {{HighlightParam|CONFIG_STM32MP15x_STM32IMAGE}}; it is not more used for {{EcosystemRelease | revision=4.0.0 | | range=and after}}. |
Revision as of 09:28, 15 June 2022
This article briefly describes the STM32MP15x lines support in U-Boot.
1. STM32MP15x lines
support
For detailed information, read the file in the delivered U-Boot code = doc/board/st/stm32mp1.rst or the documentation generated by make htlmdocs
: board/st/stm32mp1.html.
Code :
- arch/arm/mach-stm32mp : arch specific code for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig.15x : specific configuration for STM32MP15x lines
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- board/st/common : STMicroelectronics common code
- board/st/stm32mp1 : STMicroelectronics boards support for STM32MP1 Series
- drivers/*/*stm32* : drivers
Configuration files:
- defconfig file
- configs/stm32mp15_defconfig when FIP is used in OpenSTLinux
- config files
- include/configs/stm32mp15_common.h : generic for STM32MP15x lines
- include/configs/stm32mp15_st_common.h : STMicroelectronics board for STM32MP15x lines
- STM32_MPU_device_tree in arch/arm/dts : stm32mp15*.dts*
- <Device tree>.dts : same as kernel
- <Device tree>-u-boot.dtsi : addition for u-boot automatically included in build process
The two next defconfig are kept only for compatibility with upstream, don't use them:
- configs/stm32mp15_trusted_defconfig with stm32 image header support (CONFIG_STM32MP15x_STM32IMAGE)
- configs/stm32mp15_basic_defconfig when SPL is used
2. Selecting targets : choose defconfig and device tree
The STM32 MPU boot chain is supported by one U-Boot configuration with defconfig = stm32mp15_defconfig
Several boards are supported with the associated device-tree (same name as kernel):
Board part number | Device tree | Description |
---|---|---|
STM32MP157A-EV1 Evaluation board ![]() |
stm32mp157a-ev1 | MB1262+MB1263 |
STM32MP157C-EV1 Evaluation board ![]() |
stm32mp157c-ev1 | |
STM32MP157D-EV1 Evaluation board ![]() |
stm32mp157d-ev1 | |
STM32MP157F-EV1 Evaluation board ![]() |
stm32mp157f-ev1 | |
STM32MP157A-DK1 Discovery kit ![]() |
stm32mp157a-dk1 | MB1272 |
STM32MP157D-DK1 Discovery kit ![]() |
stm32mp157d-dk1 | |
STM32MP157C-DK2 Discovery kit ![]() |
stm32mp157c-dk2 | MB1272+MB1407 |
STM32MP157F-DK2 Discovery kit ![]() |
stm32mp157f-dk2 |
For information the 'Evaluation' daughter-board only (MB1263 without MB1262) is also supported by stm32mp15*-ed1.dts device tree files.
3. Compilation
See U-Boot_overview#U-Boot_build with the defconfig file: stm32mp15_defconfig
stm32mp15_defconfig PC $> make DEVICE_TREE=<Device tree> allPC $> make
The supported variables are:
- DEVICE_TREE: select in arch/arm/dts the device tree that is used
- KBUILD_OUTPUT: change the destination directory for the build
- EXT_DTB: select external device tree
The output files u-boot.dtb and u-boot-nodtb.bin are integrated in FIP.
Note: All the compiled device trees are available in $KBUILD_OUTPUT/arch/arm/dts/*.dtb.
You can select them instead of u-boot.dtb without U-Boot recompilation.
The ouput file u-boot.stm32' is only generated for stm32mp15_trusted_defconfig with CONFIG_STM32MP15x_STM32IMAGE; it is not more used for ecosystem release ≥ <span title="Main software components:
unknown revision
unknown revision
unknown revision
unknown revision
unknown revision
unknown revision
unknown revision">v4.0.0 .
4. U-Boot integration in FIP
U-Boot binary and its associated device tree are part of the FIP binary, created with TF-A Makefile option :
- BL33_CFG = u-boot.dtb
- BL33 = u-boot-nodtb.bin
or updated with fiptools
:
- --hw-config u-boot.dtb
- --nt-fw u-boot-nodtb.bin
Example for FIP update :
--verbose update --nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ fip-<board>.bin DEBUG: Replacing nt-fw with.../u-boot-nodtb.bin DEBUG: Replacing hw-config with .../u-boot.dtb DEBUG: Metadata size: ... bytes DEBUG: Payload size: ... bytesPC $> fiptool
See How_to_configure_TF-A_FIP for details.
5. Examples
5.1. STM32MP157F-EV1 Evaluation board 
stm32mp15_defconfig PC $> make DEVICE_TREE=stm32mp157f-ev1 allPC $> make
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157f-ev1.binPC $> fiptool --verbose update --nt-fw
5.2. STM32MP157C-EV1 Evaluation board 
stm32mp15_defconfig PC $> make DEVICE_TREE=stm32mp157c-ev1 allPC $> make
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157c-ev1.binPC $> fiptool --verbose update --nt-fw
5.3. STM32MP157D-DK1 Discovery kit 
stm32mp15_defconfig PC $> make DEVICE_TREE=stm32mp157d-dk1 allPC $> make
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157d-dk1.binPC $> fiptool --verbose update --nt-fw
5.4. STM32MP157C-DK2 Discovery kit 
Using export to select the device tree
stm32mp157c-dk2 PC $> make stm32mp15_defconfig PC $> make allPC $> export KBUILD_OUTPUT=../build/stm32mp15 PC $> export DEVICE_TREE=
An existing FIP file is updated with:
$KBUILD_OUTPUT/u-boot-nodtb.bin \ --hw-config $KBUILD_OUTPUT/u-boot.dtb \ fip-stm32mp157c-dk2.binPC $> fiptool --verbose update --nt-fw
5.5. Custom board with external device tree
stm32mp15_defconfig PC $> make EXT_DTB=stm32mp151a-myboard.dtb allPC $> make
Then you can create or update the FIP