Registered User mNo edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(12 intermediate revisions by 2 users not shown) | |||
Line 1: | Line 1: | ||
<noinclude>{{ApplicableFor | <noinclude>{{ApplicableFor | ||
|MPUs list=STM32MP15x | |MPUs list=STM32MP15x | ||
|MPUs checklist=STM32MP13x, STM32MP15x | |MPUs checklist=STM32MP13x, STM32MP15x, STM32MP21x, STM32MP23x, STM32MP25x | ||
}}</noinclude> | }}</noinclude> | ||
This article briefly describes the {{MicroprocessorDevice | device=15}} support in [[U-Boot_overview|U-Boot]]. | This article briefly describes the {{MicroprocessorDevice | device=15}} support in [[U-Boot_overview|U-Boot]]. | ||
Line 21: | Line 21: | ||
** '''{{CodeSource | U-Boot | configs/stm32mp15_defconfig}}''' when FIP is used in OpenSTLinux | ** '''{{CodeSource | U-Boot | configs/stm32mp15_defconfig}}''' when FIP is used in OpenSTLinux | ||
* config files | * config files | ||
* {{CodeSource | U-Boot | include/configs/stm32mp15_common.h}}: generic for {{MicroprocessorDevice | device=15}} | ** {{CodeSource | U-Boot | include/configs/stm32mp15_common.h}}: generic for {{MicroprocessorDevice | device=15}} | ||
* {{CodeSource | U-Boot | include/configs/stm32mp15_st_common.h}}: STMicroelectronics board for {{MicroprocessorDevice | device=15}} | ** {{CodeSource | U-Boot | include/configs/stm32mp15_st_common.h}}: STMicroelectronics board for {{MicroprocessorDevice | device=15}} | ||
* [[STM32_MPU_device_tree]] in {{CodeSource | U-Boot | arch/arm/dts }} : stm32mp15*.dts* | * [[STM32_MPU_device_tree]] in {{CodeSource | U-Boot | arch/arm/dts }} : stm32mp15*.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/stm32mp15-scmi-u-boot.dtsi |'''stm32mp15-scmi-u-boot.dtsi'''}}: SoC add-on file included in {{HighlightParam|<Device tree>}}-u-boot.dtsi | |||
{{ | ** {{CodeSource | U-Boot | arch/arm/dts/stm32mp15-u-boot.dtsi |stm32mp15-u-boot.dtsi}}: SoC add-on file for board support without SCMI, only for downstream support {{highlight|not used with OpenSTLinux}} | ||
The two next defconfig are kept only for compatibility with upstream, don't use them: | The two next defconfig are kept only for compatibility with upstream, don't use them: | ||
Line 37: | Line 37: | ||
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}} | ||
Several [[ | Several [[:Category:STM32_MPU_boards#More_about_STM32MP15_boards|boards]] are supported with the associated device-tree (same name as kernel): | ||
{| class="st-table" | {| class="st-table" | ||
Line 61: | Line 61: | ||
For information the 'Evaluation' daughter-board only ([[MB1263]] without [[MB1262]]) is also supported by stm32mp15*-ed1.dts device tree files. | For information the 'Evaluation' daughter-board only ([[MB1263]] without [[MB1262]]) is also supported by stm32mp15*-ed1.dts device tree files. | ||
{{Warning |In OpenSTLinux, the content the board device tree <code><board>.dts</code> have the same content then upstreamed smci device tree <code><board>-scmi.dts</code>, thanks to <code>#include "<board>-scmi.dtsi"</code><br/> | |||
in official U-Boot version, the smci device tree <code><board>-scmi.dts</code> are used with {{HighlightParam|stm32mp15_defconfig}} when the system resources are secured in OP-TEE (RCC_TZCR.TZEN:1), the configuration '''recommended''' by STMicroelectronics for product.<br/> | |||
see {{DocSource | domain=U-Boot | path=board/st/stm32mp1.html | version=latest}} for details.}} | |||
== Compilation == | == Compilation == | ||
See [[U-Boot_overview#U-Boot_build]] with the defconfig file: {{HighlightParam|stm32mp15_defconfig}} | See [[U-Boot_overview#U-Boot_build]] with the defconfig file: {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make DEVICE_TREE={{HighlightParam|<Device tree>}} all | {{PC$}}make DEVICE_TREE={{HighlightParam|<Device tree>}} all | ||
The supported variables are: | The supported variables are: | ||
Line 72: | Line 76: | ||
* '''KBUILD_OUTPUT''': change the destination directory for the build | * '''KBUILD_OUTPUT''': change the destination directory for the build | ||
* '''EXT_DTB''': select external device tree | * '''EXT_DTB''': select external device tree | ||
* '''EXT_DTS''': select PATH of external device tree source, by default the sub-directory "arch/arm/dts/external-dt" is used to allow sub-module. | |||
The output files {{Highlight|'''u-boot.dtb'''}} and {{Highlight|'''u-boot-nodtb.bin'''}} are integrated in [[#U- | The output files {{Highlight|'''u-boot.dtb'''}} and {{Highlight|'''u-boot-nodtb.bin'''}} are integrated in [[U-Boot_overview#U-Boot_integration_in_FIP|TF-A 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. | 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. | ||
== Examples == | == Examples == | ||
=== {{Board | type=157F-EV1}} === | === {{Board | type=157F-EV1}} === | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157f-ev1}} all | {{PC$}}make DEVICE_TREE={{HighlightParam|stm32mp157f-ev1}} all | ||
An existing FIP file is updated with: | An existing FIP file is updated with: | ||
{{PC$}} fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | {{PC$}}fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | ||
fip-{{HighlightParam|stm32mp157f-ev1}}.bin | fip-{{HighlightParam|stm32mp157f-ev1}}.bin | ||
=== {{Board | type=157C-EV1}} === | === {{Board | type=157C-EV1}} === | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157c-ev1}} all | {{PC$}}make DEVICE_TREE={{HighlightParam|stm32mp157c-ev1}} all | ||
An existing FIP file is updated with: | An existing FIP file is updated with: | ||
{{PC$}} fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | {{PC$}}fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | ||
fip-{{HighlightParam|stm32mp157c-ev1}}.bin | fip-{{HighlightParam|stm32mp157c-ev1}}.bin | ||
=== {{Board | type=157D-DK1}} === | === {{Board | type=157D-DK1}} === | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make DEVICE_TREE={{HighlightParam|stm32mp157d-dk1}} all | {{PC$}}make DEVICE_TREE={{HighlightParam|stm32mp157d-dk1}} all | ||
An existing FIP file is updated with: | An existing FIP file is updated with: | ||
{{PC$}} fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | {{PC$}}fiptool --verbose update --nt-fw {{Highlight|u-boot-nodtb.bin}} --hw-config {{Highlight|u-boot.dtb}} \ | ||
fip-{{HighlightParam|stm32mp157d-dk1}}.bin | fip-{{HighlightParam|stm32mp157d-dk1}}.bin | ||
=== {{Board | type=157C-DK2}} === | === {{Board | type=157C-DK2}} === | ||
Using export to select the device tree | Using export to select the device tree | ||
{{PC$}} export KBUILD_OUTPUT=../build/stm32mp15 | {{PC$}}export KBUILD_OUTPUT=../build/stm32mp15 | ||
{{PC$}} export DEVICE_TREE={{HighlightParam|stm32mp157c-dk2}} | {{PC$}}export DEVICE_TREE={{HighlightParam|stm32mp157c-dk2}} | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make all | {{PC$}}make all | ||
An existing FIP file is updated with: | An existing FIP file is updated with: | ||
{{PC$}} fiptool --verbose update --nt-fw {{Highlight|$KBUILD_OUTPUT/u-boot-nodtb.bin}} \ | {{PC$}}fiptool --verbose update --nt-fw {{Highlight|$KBUILD_OUTPUT/u-boot-nodtb.bin}} \ | ||
--hw-config {{Highlight|$KBUILD_OUTPUT/u-boot.dtb}} \ | --hw-config {{Highlight|$KBUILD_OUTPUT/u-boot.dtb}} \ | ||
fip-{{HighlightParam|stm32mp157c-dk2}}.bin | fip-{{HighlightParam|stm32mp157c-dk2}}.bin | ||
=== Custom board with external device tree === | === Custom board with external device tree === | ||
{{PC$}} make {{HighlightParam|stm32mp15_defconfig}} | {{PC$}}make {{HighlightParam|stm32mp15_defconfig}} | ||
{{PC$}} make EXT_DTB={{HighlightParam|stm32mp151a-myboard.dtb}} all | {{PC$}}make EXT_DTB={{HighlightParam|stm32mp151a-myboard.dtb}} all | ||
Then you can create or update the FIP | Then you can create or update the FIP |
Latest revision as of 14:00, 18 October 2024
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
- include/configs/stm32mp15_common.h : generic 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
- stm32mp15-scmi-u-boot.dtsi : SoC add-on file included in <Device tree>-u-boot.dtsi
- stm32mp15-u-boot.dtsi : SoC add-on file for board support without SCMI, only for downstream support not used with OpenSTLinux
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 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
- EXT_DTS: select PATH of 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
4.1. STM32MP157F-EV1 Evaluation board 
stm32mp15_defconfig make DEVICE_TREE=stm32mp157f-ev1 allmake
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157f-ev1.binfiptool --verbose update --nt-fw
4.2. STM32MP157C-EV1 Evaluation board 
stm32mp15_defconfig make DEVICE_TREE=stm32mp157c-ev1 allmake
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157c-ev1.binfiptool --verbose update --nt-fw
4.3. STM32MP157D-DK1 Discovery kit 
stm32mp15_defconfig make DEVICE_TREE=stm32mp157d-dk1 allmake
An existing FIP file is updated with:
u-boot-nodtb.bin --hw-config u-boot.dtb \ fip-stm32mp157d-dk1.binfiptool --verbose update --nt-fw
4.4. STM32MP157C-DK2 Discovery kit 
Using export to select the device tree
stm32mp157c-dk2 make stm32mp15_defconfig make allexport KBUILD_OUTPUT=../build/stm32mp15 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.binfiptool --verbose update --nt-fw
4.5. Custom board with external device tree
stm32mp15_defconfig make EXT_DTB=stm32mp151a-myboard.dtb allmake
Then you can create or update the FIP