Skip to content

Add STM32MP2 support #282

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 8 commits into from
Jun 12, 2025

Conversation

youssefz24
Copy link
Contributor

This PR adds *-pinctrl.dtsi, HAL and LL files for the STM32MP2xx series

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

See comments.

Otherwise, initial commit is too large to be practically reviewed.
Would you be able to split into at least another commit which introduces the common ll part ?

Regarding the -pinctrl.dtsi, there is a change being merged, so it would be required that you generate a new batch based on #279.

Thanks!

@arnopo arnopo self-requested a review May 22, 2025 09:37
@arnopo
Copy link
Contributor

arnopo commented May 22, 2025

To split commits you can have a look to #266 as example.

Provide the stm32cube HAL and LL for the stm32mp2x series mcu
Origin: ST Microelectronics
License: BSD-3-Clause
URL: https://github.com/STMicroelectronics/STM32CubeMP2
Commit: 1b1ff6b48df3c9b7417ac411dbd8dfd097f0bb04
Purpose: HAL and LL for stm32mp2
Maintained-by: External

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Disable the lvds module in the stm32mp2xx HAL because it is not
available.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
@youssefz24 youssefz24 force-pushed the topic/stm32mp2_support branch from 1909a48 to 86c2658 Compare May 23, 2025 16:31
@youssefz24 youssefz24 requested a review from erwango May 23, 2025 16:37
youssefz24 added a commit to youssefz24/zephyr that referenced this pull request May 23, 2025
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This depends on the followin Pull Request:
zephyrproject-rtos/hal_stm32#282

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
@erwango erwango dismissed their stale review May 28, 2025 13:30

Dismissing in order not to block PR next week

Copy link
Member

@erwango erwango left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Otherwise LGTM

Remove the use of full assert in stm32mp2xx_hal_conf.h. As done with
all other STM32 HAL drivers, this prevents build errors when compiling
STM32Cube-based code in Zephyr and allows successful compilation even
if assertion checks are not implemented, as the code still functions
correctly without them.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add CMakeLists.txt to enable support of the hal and ll files for the
stm32mp2x series MCU as zephyr libraries.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the stm32mp2x to the supported soc series.
Add the cortex-m33 to the zephyr compile definitions.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Regenerate the ll headers to include the stm32mp2xx series

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the pinctrl address for stm32mp2 soc family to generate the
*-pinctrl.dtsi files.

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Add the pinctrl files for stm32mp2 soc series. These files are generated
from the open pin data repository, a subset of official release
STM32CubeMX 6.14.0, using the genpinctrl.py script.

Origin: ST Microelectronics
License: BSD-3-Clause
URL: https://github.com/STMicroelectronics/STM32_open_pin_data
Commit: 5e641448dc7df619ee46bb0c91796b7626005929
Purpose: *-pinctrl.dtsi for stm32mp2
Maintained-by: External

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
@youssefz24 youssefz24 force-pushed the topic/stm32mp2_support branch from 86c2658 to eb3d6a2 Compare June 6, 2025 13:35
@youssefz24
Copy link
Contributor Author

So apparently the USE_FULL_ASSERT was set in the stm32mp2xx_hal_conf.h which is unusual as all other boards having it commented out. Seems to be actually coming from the source code uncommented. Which was triggering the assert_failed checks when trying to build zephyr.

So I commented it to allow successful builds and mentioned it in the README as it differs from the source code.

Refer to the zephyr STM32MP2 PR conversations for more details.

@youssefz24 youssefz24 requested a review from erwango June 6, 2025 14:01
@erwango erwango merged commit 54f5a6e into zephyrproject-rtos:main Jun 12, 2025
2 checks passed
youssefz24 added a commit to youssefz24/zephyr that referenced this pull request Jun 12, 2025
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This is done after the merge of the PR::
zephyrproject-rtos/hal_stm32#282

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
arnopo pushed a commit to arnopo/zephyr that referenced this pull request Jun 12, 2025
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This depends on the followin Pull Request:
zephyrproject-rtos/hal_stm32#282

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
youssefz24 added a commit to youssefz24/zephyr that referenced this pull request Jun 13, 2025
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This is done after the merge of the PR::
zephyrproject-rtos/hal_stm32#282
It now references the fix pull request of the stm32mp2 HAL:
zephyrproject-rtos/hal_stm32#286

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
@youssefz24
Copy link
Contributor Author

Hello there,

Thank you for the merge. 🎩

Youssef Zini

youssefz24 added a commit to youssefz24/zephyr that referenced this pull request Jun 13, 2025
Update west.yml to add the STM32MP2x SoC support in the STM32 HAL.
This is done after the merge of the PRs:
zephyrproject-rtos/hal_stm32#282
zephyrproject-rtos/hal_stm32#286

Signed-off-by: Youssef Zini <youssef.zini@savoirfairelinux.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants