This article briefly describes the STM32MP23x lines support in U-Boot.
1. STM32MP23x lines
support[edit | edit source]
For detailed information, read the file in the delivered U-Boot code: doc/board/st/stm32mp2.rst or the documentation generated by make htlmdocs
: board/st/stm32mp2.html.
Code:
- arch/arm/mach-stm32mp : architecture-specific code for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- arch/arm/mach-stm32mp/Kconfig.23x : specific configuration for STM32MP23x lines
- arch/arm/mach-stm32mp/Kconfig : generic configuration for STM32 Arm® Cortex® MPUs
- board/st/common : STMicroelectronics common code
- board/st/stm32mp2 : STMicroelectronics boards support for STM32MP2 series
- drivers/*/*stm32* : drivers
Configuration files:
- defconfig file
- config files
- include/configs/stm32mp23_common.h : generic for STM32MP23x lines
- include/configs/stm32mp23_st_common.h : STMicroelectronics board for STM32MP23x lines
- include/configs/stm32mp23_common.h : generic for STM32MP23x lines
- STM32_MPU_device_tree in arch/arm/dts : stm32mp23*.dts*
- <Device tree>.dts: same as kernel
- <Device tree>-u-boot.dtsi: addition for u-boot automatically included in build process
- stm32mp23-u-boot.dtsi : SoC add-on file included in <Device tree>-u-boot.dtsi
2. Selecting targets: choose defconfig and device tree[edit | edit source]
The U-Boot configuration with defconfig is stm32mp23_defconfig.
The boards are supported with the associated device tree (same name as kernel):
Board part number | Device tree | Description |
---|---|---|
STM32MP257F-DK Discovery kit ![]() ![]() |
stm32mp235f-dk | MB1605 |
3. Compilation[edit | edit source]
See U-Boot_overview#U-Boot_build, with installed aarch64 cross-compiler.
For STM32MP257F-DK Discovery kit for STM32MP23x lines evaluation
, the device tree is already selected in defconfig stm32mp23_defconfig
stm32mp23_defconfig make allmake
For other boards, you need to select the correct device tree.
stm32mp23_defconfig make DEVICE_TREE=<Device tree> allmake
The supported variables are:
- DEVICE_TREE: Select in arch/arm/dts or in EXT_DTS the device tree that is used.
- KBUILD_OUTPUT: Change the destination directory for the build
- EXT_DTB: Select external device tree.
- EXT_DTS: Select the path of the external device tree source. By default, the sub-directory "arch/arm/dts/external-dt" is used to allow sub-module.
The output files u-boot.dtb and u-boot-nodtb.bin are integrated in TF-A 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.
4. Examples[edit | edit source]
4.1. STM32MP257F-DK Discovery kit
for STM32MP23x lines evaluation
[edit | edit source]
stm32mp23_defconfig make DEVICE_TREE=stm32mp235f-dk allmake
and
--nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp235f-dk.binfiptool --verbose update
4.2. STM32MP257F-DK Discovery kit
for STM32MP23x lines evaluation
with export[edit | edit source]
stm32mp235f-dk make stm32mp23_defconfig make allexport KBUILD_OUTPUT=../build/stm32mp23 export DEVICE_TREE=
and
--nt-fw $KBUILD_OUTPUT/u-boot-nodtb.bin \ --hw-config $KBUILD_OUTPUT/u-boot.dtb \ fip-stm32mp235f-dk.binfiptool --verbose update
4.3. Custom board with external device tree[edit | edit source]
stm32mp23_defconfig make EXT_DTB=stm32mp235f-myboard.dtb allmake
--nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ fip-stm32mp235f-myboard.binfiptool --verbose update