-
Notifications
You must be signed in to change notification settings - Fork 8.2k
STM32MP2 Series support #90295
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
STM32MP2 Series support #90295
Conversation
|
Hello @youssefz24, and thank you very much for your first pull request to the Zephyr project! |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @youssefz24 for this work!
Some initial comments, but looks globally fine!
This comment was marked as resolved.
This comment was marked as resolved.
dc679f5 to
8a8a74f
Compare
|
The following west manifest projects have changed revision in this Pull Request:
✅ All manifest checks OK Note: This message is automatically posted and updated by the Manifest GitHub Action. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I only review until commit 2ff8bc2
boards/st/stm32mp257f_ev1/support/openocd_stm32mp257f_ev1_m33.cfg
Outdated
Show resolved
Hide resolved
boards/st/stm32mp257f_ev1/support/openocd_stm32mp257f_ev1_m33.cfg
Outdated
Show resolved
Hide resolved
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 <[email protected]>
Add the initial device tree source include (dtsi) files for the stm32mp25 series boards, covering non-secure configuration for zephyr on the Cortex-M33 core. These files provide the basic hardware description, including CPU (Cortex-M33), memory, RCC clock controller and NVIC interrupt controller. Key features: - Set flash and RAM addresses to DDR memory. - Adjust RCC peripheral address for non-secure context. Signed-off-by: Youssef Zini <[email protected]>
Add initial soc support for the stm32mp2x series, including initial Kconfig entries and default configuration files. This enables Zephyr to recognize and build for the stm32mp2x series, taking the stm32mp257f_ev1 as a baseline. Includes: - Kconfig and defconfig files for SoC selection and defaults - soc.h for hal headers - CMakeLists.txt for build system integration - soc.yml update to register the new SoC System Clock is configured statically from DTS. So no initialization hook or soc.c needed. Signed-off-by: Youssef Zini <[email protected]>
Add a linker script for the stm32mp2x soc series. It includes the standard arm cortex-m linker and adds standard zephyr relocation sections. Replace the rom_start section name with .isr_vectors in the linker script. This is necessary for the zephyr firmware to be started by the remote proc driver which expects the section containing the vector table to be named .isr_vectors. Signed-off-by: Youssef Zini <[email protected]>
Introduce initial board support for the STM32MP257F-EV1. This includes: - Board metadata (board.yml, stm32mp257f_ev1.yaml) - Base software configuration (Kconfig.stm32mp257f_ev1) - CMake build integration (board.cmake) - Default configuration (stm32mp257f_ev1_stm32mp257fxx_m33_defconfig) - Minimal device tree (stm32mp257f_ev1_stm32mp257fxx_m33.dts) - Initial documentation and image for the stm32mp257f_ev1 board. - OpenOCD configuration files for debugging support. This enables the STM32MP257F-EV1 board to build and debug a hello world sample. Note that other necessary openocd configuration files are added to the zephyr sdk directory and can be found in the stm-openocd repository[1]. [1]:https://github.com/STMicroelectronics/device-stm-openocd/tree/main Signed-off-by: Youssef Zini <[email protected]>
Replace the use of `DT_NODELABEL(exti)` which depends on the node label with the defined EXTI_NODE macro using the instance with the `st_stm32_exti` compatible. Since both macros point to the same node, this change doesn't affect the code logic, but makes it independent of the node label, in preparation for the addition of the STM32MP2 exti nodes. Signed-off-by: Youssef Zini <[email protected]>
Add the mp2 exti2 dts to the dtsi file. Add mp2 exti hal and ll function calls with EXTI2 instance. We use the EXTI2 instance because it contains the GPIO interrupts in the non-secure context. (We are trying to build the blinky sample as a first milestone) Signed-off-by: Youssef Zini <[email protected]>
Add support for STM32MP2 series in the hwinfo driver. The STM32MP2 series uses the HAL functions since it doesn't have a ll_utils. Signed-off-by: Youssef Zini <[email protected]>
Introduce DeviceTree binding for the STM32MP2 RCC clock controller, enabling support for STM32MP2-specific clock configuration in Zephyr. Update Kconfig.stm32 to add a dependency on STM32MP2 configuration, allowing the use of STM32 LL RCC features when targeting STM32MP2 devices. Add header for STM32MP2 per peripheral clock definitions. Signed-off-by: Youssef Zini <[email protected]>
Add the stm32mp2 clock driver to the clock_control subsystem. The driver is a reduced version of the generic stm32 clock driver. Signed-off-by: Youssef Zini <[email protected]>
Remove gpio clock management from the GPIO driver when running on the cortex-m33 on the mp2 and gpio clocks are managed by the cortex-A, being the resource manager, allowed by the Resource Isolation Framework (RIF). Also add a specific binding for the mp2 gpio to make clock property optional. Signed-off-by: Youssef Zini <[email protected]>
Add GPIO A-K nodes to the device tree for STM32MP2 SoC. Note that GPIOs are disabled by default in the STM32MP2 SoC. Signed-off-by: Youssef Zini <[email protected]>
Add gpio support for STM32MP257F-EV1 board. Add the orange (&led0) LED to the device tree and enable GPIOJ. Add the user button USER2 to the device tree and enable GPIOG. This step allows building and debugging the blinky and button sample applications. Signed-off-by: Youssef Zini <[email protected]>
a6a71ea to
982382b
Compare
|
Rebased (again) to stay up to date with the main branch :/ |
|
|
Hi @youssefz24! To celebrate this milestone and showcase your contribution, we'd love to award you the Zephyr Technical Contributor badge. If you're interested, please claim your badge by filling out this form: Claim Your Zephyr Badge. Thank you for your valuable input, and we look forward to seeing more of your contributions in the future! 🪁 |
|
Hello there, Thank you all for the reviews and the merge. 🎩 Youssef Zini |



Add basic support of the Cortex-M33 core for the STM32MP2 series.
Provide support for the STM32MP257F-EV1 evaluation board.
It depends on the following PR from the STM32-HAL:zephyrproject-rtos/hal_stm32#282
This first step allows to run and debug the samples:
Signed-off-by: Youssef Zini [email protected]