soc: stm32: add initial soc support for stm32mp2x
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 <youssef.zini@savoirfairelinux.com>
This commit is contained in:
parent
898eaa9a3f
commit
e3953f10ad
8 changed files with 102 additions and 0 deletions
|
@ -193,6 +193,11 @@ family:
|
|||
- name: stm32mp13x
|
||||
socs:
|
||||
- name: stm32mp135fxx
|
||||
- name: stm32mp2x
|
||||
socs:
|
||||
- name: stm32mp257fxx
|
||||
cpuclusters:
|
||||
- name: m33
|
||||
- name: stm32n6x
|
||||
socs:
|
||||
- name: stm32n657xx
|
||||
|
|
9
soc/st/stm32/stm32mp2x/CMakeLists.txt
Normal file
9
soc/st/stm32/stm32mp2x/CMakeLists.txt
Normal file
|
@ -0,0 +1,9 @@
|
|||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_include_directories(.)
|
||||
|
||||
if(CONFIG_CPU_CORTEX_M33)
|
||||
add_subdirectory(m33)
|
||||
endif()
|
17
soc/st/stm32/stm32mp2x/Kconfig
Normal file
17
soc/st/stm32/stm32mp2x/Kconfig
Normal file
|
@ -0,0 +1,17 @@
|
|||
# STMicroelectronics STM32MP2 MPU series
|
||||
#
|
||||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_STM32MP2X
|
||||
select ARM
|
||||
select CPU_HAS_FPU
|
||||
select HAS_STM32CUBE
|
||||
|
||||
config SOC_STM32MP2X_M33
|
||||
select ARMV8_M_DSP
|
||||
select ARM_TRUSTZONE_M
|
||||
select CPU_CORTEX_M33
|
||||
select CPU_CORTEX_M_HAS_DWT
|
||||
select CPU_HAS_ARM_MPU
|
||||
select CPU_HAS_ARM_SAU
|
10
soc/st/stm32/stm32mp2x/Kconfig.defconfig
Normal file
10
soc/st/stm32/stm32mp2x/Kconfig.defconfig
Normal file
|
@ -0,0 +1,10 @@
|
|||
# STMicroelectronics STM32MP2 MPU series
|
||||
#
|
||||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_SERIES_STM32MP2X
|
||||
|
||||
rsource "Kconfig.defconfig.stm32mp2*"
|
||||
|
||||
endif # SOC_SERIES_STM32MP2X
|
11
soc/st/stm32/stm32mp2x/Kconfig.defconfig.stm32mp257fxx
Normal file
11
soc/st/stm32/stm32mp2x/Kconfig.defconfig.stm32mp257fxx
Normal file
|
@ -0,0 +1,11 @@
|
|||
# STMicroelectronics STM32MP2 MPU series
|
||||
#
|
||||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_STM32MP2X_M33
|
||||
|
||||
config NUM_IRQS
|
||||
default 320
|
||||
|
||||
endif # SOC_STM32MP2X_M33
|
18
soc/st/stm32/stm32mp2x/Kconfig.soc
Normal file
18
soc/st/stm32/stm32mp2x/Kconfig.soc
Normal file
|
@ -0,0 +1,18 @@
|
|||
# STMicroelectronics STM32MP2 MPU series
|
||||
#
|
||||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_STM32MP2X
|
||||
bool
|
||||
select SOC_FAMILY_STM32
|
||||
|
||||
config SOC_SERIES
|
||||
default "stm32mp2x" if SOC_SERIES_STM32MP2X
|
||||
|
||||
config SOC_STM32MP2X_M33
|
||||
bool
|
||||
select SOC_SERIES_STM32MP2X
|
||||
|
||||
config SOC
|
||||
default "stm32mp257fxx" if SOC_STM32MP2X_M33
|
7
soc/st/stm32/stm32mp2x/m33/CMakeLists.txt
Normal file
7
soc/st/stm32/stm32mp2x/m33/CMakeLists.txt
Normal file
|
@ -0,0 +1,7 @@
|
|||
# Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
#
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_include_directories(${ZEPHYR_BASE}/drivers)
|
||||
|
||||
zephyr_include_directories(.)
|
25
soc/st/stm32/stm32mp2x/m33/soc.h
Normal file
25
soc/st/stm32/stm32mp2x/m33/soc.h
Normal file
|
@ -0,0 +1,25 @@
|
|||
/*
|
||||
* Copyright (C) 2025 Savoir-faire Linux, Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
/**
|
||||
* @file SoC configuration macros for the STM32MP2 family processors.
|
||||
*
|
||||
* Based on reference manual:
|
||||
* STM32MP23/25xx advanced ARM(r)-based 32/64-bit MPUs
|
||||
*
|
||||
* Chapter 2.4.2: Memory map and register boundary addresses
|
||||
*/
|
||||
|
||||
#ifndef _STM32MP2_M33_SOC_H_
|
||||
#define _STM32MP2_M33_SOC_H_
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#include <stm32mp2xx.h>
|
||||
|
||||
#endif /* !_ASMLANGUAGE */
|
||||
|
||||
#endif /* !_STM32MP2_M33_SOC_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue