Last edited one month ago

IPCC device tree configuration

Applicable for STM32MP15x lines, STM32MP21x lines, STM32MP23x lines, STM32MP25x lines


1. Article purpose[edit | edit source]

This article explains how to configure the IPCC internal peripheral controlled by the Linux Mailbox framework.

The configuration is performed using the device tree mechanism that provides a hardware description of the IPCC peripheral, used by the STM32 IPCC Linux driver.

2. DT bindings documentation[edit | edit source]

The IPCC internal peripheral is represented by:

  • The Generic mailbox device tree bindings[1]
  • The STM32 IPCC device tree bindings[2]

3. DT configuration[edit | edit source]

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

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 level)[edit | edit source]

  • On STM32MP15x lines More info.png the IPCC peripheral node is located in stm32mp151.dtsi [3] file.
  • On STM32MP21x lines More info.png the IPCC1 peripheral node is located in stm32mp211.dtsi [4] file.
  • On STM32MP23x lines More info.png the IPCC1 peripheral node is located in stm32mp231.dtsi [5] file.
  • On STM32MP25x lines More info.png the IPCC1 and IPCC2 peripheral nodes are located in stm32mp251.dtsi [6] file.
Info white.png Information
The st,proc-id property specifies the ID of the IPCC processor interface assigned to the Cortex-A processor, according to the Processor interface assignment
  • st,proc-id = <0>; indicates that the IPCC processor interface 1 (PROC1) is used,
  • st,proc-id = <1>; indicates that the IPCC processor interface 2 (PROC2) is used.
Warning white.png Warning
This device tree part is related to STM32 microprocessors. It must be kept as it is, without being modified by the end-user.

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

This part is used to enable the IPCC hardware on a board:

&ipcc {
	status = "okay";
};

3.3. DT configuration examples[edit | edit source]

Below is an example of the remoteproc client using three mailbox channels:

&m4_rproc {
	...
	mboxes = <&ipcc 0>, <&ipcc 1>, <&ipcc 2>;
	mbox-names = "vq0", "vq1", "shutdown";
	...
};
Info white.png Information
Using the IPCC ID parameter, it is possible to specify whether the mailbox client is notified in an interrupt context or in a normal context:
  • ID i, with i in the range [0, IPCC channel - 1], is used for notification in a normal context.
  • ID 0x100 + i, with i in the range [0, IPCC channel - 1], is used for notification in an interrupt context.

For instance, to declare "vq0" and "vq1" notifications under an interrupt context, the previous example becomes:

&m4_rproc {
	...
	mboxes = <&ipcc 0x100>, <&ipcc 0x101>, <&ipcc 2>;
	mbox-names = "vq0", "vq1", "shutdown";
	...
};

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

The STM32CubeMX tool can be used to configure the STM32MPU device and get the corresponding platform configuration device tree files.
The STM32CubeMX may not support all the properties described in the above DT bindings documentation paragraph. In such a case, 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 more information.

5. References[edit | edit source]

Refer to the following links for additional information: