Registered User mNo edit summary |
Registered User mNo edit summary |
||
(6 intermediate revisions by 3 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{ApplicableFor | <noinclude>{{ApplicableFor | ||
|MPUs list=STM32MP13x | |MPUs list=STM32MP13x | ||
|MPUs checklist=STM32MP13x, STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP25x | ||
}}</noinclude> | }}</noinclude> | ||
This article briefly describes the {{MicroprocessorDevice | device=13}} support in [[U-Boot_overview|U-Boot]]. | This article briefly describes the {{MicroprocessorDevice | device=13}} support in [[U-Boot_overview|U-Boot]]. | ||
Line 21: | Line 21: | ||
** {{CodeSource | U-Boot | configs/stm32mp13_defconfig}} | ** {{CodeSource | U-Boot | configs/stm32mp13_defconfig}} | ||
* config files | * config files | ||
** {{CodeSource | U-Boot | include/configs | ** {{CodeSource | U-Boot | include/configs/stm32mp13_common.h}}: generic for {{MicroprocessorDevice | device=13}} | ||
** {{CodeSource | U-Boot | include/configs/stm32mp13_st_common | ** {{CodeSource | U-Boot | include/configs/stm32mp13_st_common.h}}: STMicroelectronics board for {{MicroprocessorDevice | device=13}} | ||
* [[STM32_MPU_device_tree]] in {{CodeSource | U-Boot | arch/arm/dts }}: stm32mp13*.dts* | * [[STM32_MPU_device_tree]] in {{CodeSource | U-Boot | arch/arm/dts }}: stm32mp13*.dts* | ||
** {{HighlightParam|<Device tree>}}.dts: same as kernel | ** {{HighlightParam|<Device tree>}}.dts: same as kernel | ||
** {{HighlightParam|<Device tree>}}-u-boot.dtsi: addition for u-boot automatically included in build process | ** {{HighlightParam|<Device tree>}}-u-boot.dtsi: addition for u-boot automatically included in build process | ||
** {{CodeSource | U-Boot | arch/arm/dts/stm32mp13-u-boot.dtsi |stm32mp13-u-boot.dtsi}}: SoC add-on file included in {{HighlightParam|<Device tree>}}-u-boot.dtsi | |||
== Selecting targets: choose defconfig and device tree == | == Selecting targets: choose defconfig and device tree == | ||
Line 31: | Line 32: | ||
The [[U-Boot_overview#Kbuild|U-Boot configuration with defconfig]] is {{HighlightParam|stm32mp13_defconfig}}. | The [[U-Boot_overview#Kbuild|U-Boot configuration with defconfig]] is {{HighlightParam|stm32mp13_defconfig}}. | ||
The [[ | The [[:Category:STM32_MPU_boards#More_about_STM32MP13_boards|STM32MP13 boards]] are supported with the associated device tree (same name as kernel): | ||
{| class="st-table" | {| class="st-table" | ||
Line 38: | Line 39: | ||
|- | |- | ||
| '''{{Board | type=135F-DK}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp135f-dk.dts|stm32mp135f-dk}} || [[STM32MP135x-DK_-_hardware_description|MB1635]] | | '''{{Board | type=135F-DK}}''' || {{CodeSource | U-Boot | arch/arm/dts/stm32mp135f-dk.dts|stm32mp135f-dk}} || [[STM32MP135x-DK_-_hardware_description|MB1635]] | ||
|} | |} | ||
Line 98: | Line 97: | ||
{{PC$}} fiptool --verbose update {{HighlightParam|--nt-fw}} {{Highlight|u-boot-nodtb.bin}} {{HighlightParam|--hw-config}} {{Highlight|u-boot.dtb}} \ | {{PC$}} fiptool --verbose update {{HighlightParam|--nt-fw}} {{Highlight|u-boot-nodtb.bin}} {{HighlightParam|--hw-config}} {{Highlight|u-boot.dtb}} \ | ||
'''fip-{{HighlightParam|stm32mp135f-dk}}.bin''' | '''fip-{{HighlightParam|stm32mp135f-dk}}.bin''' | ||
=== {{Board | type=135F-DK}} with export === | === {{Board | type=135F-DK}} with export === |
Latest revision as of 07:13, 29 September 2023
This article briefly describes the STM32MP13x lines support in U-Boot.
1. STM32MP13x 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.13x : specific configuration for STM32MP13x 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
- config files
- include/configs/stm32mp13_common.h : generic for STM32MP13x lines
- include/configs/stm32mp13_st_common.h : STMicroelectronics board for STM32MP13x lines
- include/configs/stm32mp13_common.h : generic for STM32MP13x lines
- STM32_MPU_device_tree in arch/arm/dts : stm32mp13*.dts*
- <Device tree>.dts: same as kernel
- <Device tree>-u-boot.dtsi: addition for u-boot automatically included in build process
- stm32mp13-u-boot.dtsi : SoC add-on file included in <Device tree>-u-boot.dtsi
2. Selecting targets: choose defconfig and device tree
The U-Boot configuration with defconfig is stm32mp13_defconfig.
The STM32MP13 boards are supported with the associated device tree (same name as kernel):
Board part number | Device tree | Description |
---|---|---|
STM32MP135F-DK Discovery kit ![]() |
stm32mp135f-dk | MB1635 |
3. Compilation
see U-Boot_overview#U-Boot_build
For STM32MP135F-DK Discovery kit , the device tree is already selected in defconfig stm32mp13_defconfig
stm32mp13_defconfig make allmake
For other boards, you need to select the correct device tree
stm32mp13_defconfig make DEVICE_TREE=<Device tree> allmake
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 devices trees are available in $KBUILD_OUTPUT/arch/arm/dts/*.dtb.
You can select them instead of u-boot.dtb without U-Boot recompilation.
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 of STM32MP135F-DK Discovery kit :
--verbose update --nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ fip-stm32mp135f-dk.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: ... bytesfiptool
5. Examples
5.1. STM32MP135F-DK Discovery kit 
stm32mp13_defconfig make allmake
or
stm32mp13_defconfig make DEVICE_TREE=stm32mp135f-dk allmake
and
--nt-fw u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp135f-dk.binfiptool --verbose update
5.2. STM32MP135F-DK Discovery kit
with export
stm32mp135f-dk make stm32mp13_defconfig make allexport KBUILD_OUTPUT=../build/stm32mp13 export DEVICE_TREE=
--nt-fw $KBUILD_OUTPUT/u-boot-nodtb.bin \ --hw-config $KBUILD_OUTPUT/u-boot.dtb \ fip-stm32mp135f-dk.binfiptool --verbose update
5.3. Custom board with external device tree
stm32mp13_defconfig make EXT_DTB=stm32mp131a-myboard.dtb allmake
--nt-fw u-boot-nodtb.bin \ --hw-config u-boot.dtb \ fip-stm32mp131a-myboard.binfiptool --verbose update