COMBOPHY device tree configuration

Revision as of 11:28, 29 September 2023 by Registered User (Created page with "{{Info|{{Green| The objective of this article model is to avoid significant misalignment between all of the articles related to peripheral or framework device tree configurati...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Info white.png Information

The objective of this article model is to avoid significant misalignment between all of the articles related to peripheral or framework device tree configuration.

  • The text highlighted in green explains what is expected in each paragraph, and must be removed or replaced in your peripheral or framework device tree configuration article.
  • The table of contents must be used as it is, without any modification in your peripheral or framework device tree configuration article.
  • The text in black must be used as it is, or slightly adapted as necessary, in your peripheral or framework device tree configuration article.
  • The technical writer's review of your peripheral or framework device tree configuration article uses this model as reference.
  • Your peripheral or framework device tree configuration article must be attached to category:Device tree configuration and to the framework category to which the article refers.
  • Your peripheral or framework device tree configuration article must be named "XXX device tree configuration", where "XXX" is either the associated framework or the associated internal peripheral.
  • If you have nothing to write in a paragraph, remove it.
  • If you have something to add in your peripheral or framework device tree configuration article, add it in a paragraph defined by this model. If you don't find the right paragraph, please contact the Wiki maintainers.
  • The following template must be added at the bottom of your article: {{ArticleBasedOnModel | Peripheral or framework device tree configuration model}}
  • Examples of articles that follow this model:

1. Article purpose[edit source]

This chapter must clearly indicate the purpose of the article, that is, provide an overview of what the reader can find in the article, and to which contexts this article applies.

A typical example is shown below
The purpose of this article is to explain how to configure the XXX internal peripheral using the device tree mechanism, relying on the bindings documentation, that is the description of the required and optional device-tree properties.

If it is possible to assign the peripheral to several execution contexts, keep the following sentence.
The peripheral can be assigned to different contexts/software components, depending on the final product needs. Refer to How to assign an internal peripheral to a runtime context for guidelines on this configuration .

2. DT bindings documentation[edit source]

The objective of this chapter is to provide link to bindings corresponding to the peripherals concerned for all supported contexts

The device tree binding documents are stored either in the given applicable components listed below, or in the Linux kernel repository:
Take inspiration from one of the 3 following examples to fill in your article

Example1: XXX only in Linux kernel

Example2: all software components assigning the XXX have bindings in the Linux kernel

Example3: some software components assigning the XXX have bindings in the Linux kernel, and some are specific

Set links by using the Template:CodeSource. See examples in Template:CodeSource#Example.

3. DT configuration[edit source]

This hardware description is a combination of the STM32 microprocessor device tree files (.dtsi extension) and board device tree files (.dts extension). See the Device tree for an explanation of the device-tree file organization.

STM32CubeMX can be used to generate the board device tree. Refer to How to configure the DT using STM32CubeMX for more details.

3.1. DT configuration (STM32/SoC level)[edit source]

The objective of this chapter is to explain how to configure the DT nodes related to the XXX on STM32 microprocessors.
A reference to the STM32MPU.dtsi file should be added here.
It is recommended to indicate that this set of properties must not vary for a given STM32MPU device (see the warning below)
.

The XXX node is located in the device tree file for the software components, supporting the peripheral and listed in the above DT bindings documentation paragraph.

Warning white.png Warning
This device tree part is related to STM32 microprocessors. It must be kept as is, without being modified by the end-user.

3.2. DT configuration (board level)[edit source]

The objective of this chapter is to explain how to enable and configure the DT nodes related to the board.
Using this chapter, the end-user can configure any parameters via the DT to adapt to a new board.

The objective of this chapter is to explain how to enable and configure the XXX DT nodes for a board.
Please add here the information to enable and configure the XXX peripheral""

Peripheral configuration should be done in specific board device tree files (board dts file and pinctrl dtsi file).

If pins of the internal peripheral need to be configured, then links to Pinctrl device tree configuration (and optionally to Pinctrl overview) must be added in the #DT configuration (board level) and/or #DT configuration examples.

3.3. DT configuration examples[edit source]

This OPTIONAL chapter must provide an example of how to configure the DT to adapt it to a new board.

4. How to configure the DT using STM32CubeMX[edit source]

The STM32CubeMX tool can be used to configure the STM32MPU device and get the corresponding platform configuration device tree files.
STM32CubeMX may not support all the properties described in DT binding files listed in the above DT bindings documentation paragraph. If so, the tool inserts user sections in the generated device tree. These sections can then be edited to add some properties, and they are preserved from one generation to another. Refer to STM32CubeMX user manual for further information.

5. References[edit source]

Refer to the following links for additional information: