Last edited 2 years ago

STM32 MPU device tree


This article describes how the device tree files for STM32MPU are organized for Linux®, U-Boot and TF-A but also how they are organized when they are generated from STM32CubeMX.

1. Purpose and scope[edit source]

This article shows the structure of the device tree files as it is implemented in OpenSTLinux for Linux® kernel, U-Boot, TF-A and OP-TEE.

The purpose of this article is not to explain the device tree concept and the device tree configuration supported by STM32MP1 Series. A good knowledge of the concept is a prerequisite before reading this article. The articles regarding the configuration can be read afterwards.

2. Device tree structure[edit source]

The device tree files are used during boot time by the FSBL (TF-A), the secure OS (OP-TEE), the SSBL (U-Boot) and, at run time, by the Linux kernel.

These files are stored in different github repositories (one for each first level bullet below), but source code reuse is maximized from one repository to another:

The figure below shows the device tree files structure for Linux, U-Boot, TF-A and OP-TEE:

Device tree for Linux U-Boot TF-A OP-TEE.png

3. STM32CubeMX generated device tree[edit source]

STM32CubeMX can help to generate the device tree files for a given project, for the various software components:

  • TF-A: STM32CubeMX generates three files:
  • 'stm32mp15-mx.dtsi' is equivalent to 'stm32mp1*-<DDR type>.dtsi' in the diagram above, embedding DDR settings
  • 'stm32mp1*-<your_project_name>-mx.dts' is the board device tree file, that includes all dtsi files (directly or not)
  • 'stm32mp1*-<your_project_name>-mx-fw-config.dts' file corresponds to the TF-A firmware configuration and is out of the file structure shown in the previous paragraph
  • 'stm32mp1*-<your_project_name>-mx.dts' is the board device tree file, that includes all dtsi files (directly or not)
  • 'stm32mp1*-<your_project_name>-mx-u-boot.dts' is equivalent to the '<board>-u-boot.dtsi' file in the diagram above
  • 'stm32mp1*-<your_project_name>-mx.dts' is the board device tree file, that includes all dtsi files (directly or not)
  • 'stm32mp1*-<your_project_name>-mx.dts' is the board device tree file, that includes all dtsi files (directly or not)

The device tree files generated by STM32CubeMX can be built with the Developer Package or Distribution Package: