Registered User No edit summary |
Registered User mNo edit summary Tag: 2017 source edit |
||
(One intermediate revision by the same user not shown) | |||
Line 20: | Line 20: | ||
===DT configuration (STM32 level) === | ===DT configuration (STM32 level) === | ||
* On '''{{MicroprocessorDevice | device=15}}''' the IPCC peripheral node is located in ''stm32mp151.dtsi'' <ref>{{CodeSource | Linux kernel | arch/arm/boot/dts/stm32mp151.dtsi | arch/arm/boot/dts/stm32mp151.dtsi}}</ref> file. | |||
< | * On '''{{MicroprocessorDevice | device=25}}''' the IPCC1 and IPCC2 peripheral nodes are located in ''stm32mp251.dtsi'' <ref>{{CodeSource | Linux kernel | arch/arm64/boot/dts/st/stm32mp251.dtsi | arch/arm64/boot/dts/st/stm32mp251.dtsi}}</ref> file. | ||
{{Info| The '''st,proc-id''' property specifies the ID of the IPCC processor interface assigned to the Cortex-A processor, according to the [[IPCC_internal_peripheral#Processor_interface_assignment | 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|This device tree part is related to STM32 microprocessors. It must be kept as it is, without being modified by the end-user.}} | {{Warning|This device tree part is related to STM32 microprocessors. It must be kept as it is, without being modified by the end-user.}} | ||
=== DT configuration (board level) === | === DT configuration (board level) === | ||
This part is used to enable the IPCC hardware on a board: | This part is used to enable the IPCC hardware on a board: | ||
< | <syntaxhighlight lang="devicetree"> | ||
&ipcc { | &ipcc { | ||
status = "okay"; | status = "okay"; | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
=== DT configuration examples === | === DT configuration examples === | ||
Below is an example of the remoteproc client using three mailbox channels: | Below is an example of the remoteproc client using three mailbox channels: | ||
< | <syntaxhighlight lang="devicetree"> | ||
&m4_rproc { | &m4_rproc { | ||
... | ... | ||
Line 56: | Line 45: | ||
... | ... | ||
}; | }; | ||
</ | </syntaxhighlight> | ||
{{Info|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: | |||
<syntaxhighlight lang="devicetree"> | |||
&m4_rproc { | |||
... | |||
mboxes = <&ipcc 0x100>, <&ipcc 0x101>, <&ipcc 2>; | |||
mbox-names = "vq0", "vq1", "shutdown"; | |||
... | |||
}; | |||
</syntaxhighlight> | |||
}} | |||
==How to configure the DT using STM32CubeMX== | ==How to configure the DT using STM32CubeMX== | ||
The [[STM32CubeMX]] tool can be used to configure the STM32MPU device and get the corresponding [[Device_tree#STM32_MPU|platform configuration device tree]] files.<br /> | The [[STM32CubeMX]] tool can be used to configure the STM32MPU device and get the corresponding [[Device_tree#STM32_MPU|platform configuration device tree]] files.<br /> |
Latest revision as of 19:00, 13 June 2024
1. Article purpose
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
The IPCC internal peripheral is represented by:
3. DT configuration
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)
- On STM32MP15x lines
the IPCC peripheral node is located in stm32mp151.dtsi [3] file.
- On STM32MP25x lines
the IPCC1 and IPCC2 peripheral nodes are located in stm32mp251.dtsi [4] file.
![]() |
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
|
3.2. DT configuration (board level)
This part is used to enable the IPCC hardware on a board:
&ipcc {
status = "okay";
};
3.3. DT configuration examples
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";
...
};
![]() |
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:
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
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
Refer to the following links for additional information:
- ↑ Documentation/devicetree/bindings/mailbox/mailbox.txt , Generic mailbox device tree bindings
- ↑ Documentation/devicetree/bindings/mailbox/st,stm32-ipcc.yaml , STM32 IPCC device tree bindings
- ↑ arch/arm/boot/dts/stm32mp151.dtsi
- ↑ arch/arm64/boot/dts/st/stm32mp251.dtsi