diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index 59d420ee09f..ce20e7d6f2f 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -193,6 +193,11 @@ family: - name: stm32mp13x socs: - name: stm32mp135fxx + - name: stm32mp2x + socs: + - name: stm32mp257fxx + cpuclusters: + - name: m33 - name: stm32n6x socs: - name: stm32n657xx diff --git a/soc/st/stm32/stm32mp2x/CMakeLists.txt b/soc/st/stm32/stm32mp2x/CMakeLists.txt new file mode 100644 index 00000000000..fdfdc3244a7 --- /dev/null +++ b/soc/st/stm32/stm32mp2x/CMakeLists.txt @@ -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() diff --git a/soc/st/stm32/stm32mp2x/Kconfig b/soc/st/stm32/stm32mp2x/Kconfig new file mode 100644 index 00000000000..016ee4ad207 --- /dev/null +++ b/soc/st/stm32/stm32mp2x/Kconfig @@ -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 diff --git a/soc/st/stm32/stm32mp2x/Kconfig.defconfig b/soc/st/stm32/stm32mp2x/Kconfig.defconfig new file mode 100644 index 00000000000..144368d8e1b --- /dev/null +++ b/soc/st/stm32/stm32mp2x/Kconfig.defconfig @@ -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 diff --git a/soc/st/stm32/stm32mp2x/Kconfig.defconfig.stm32mp257fxx b/soc/st/stm32/stm32mp2x/Kconfig.defconfig.stm32mp257fxx new file mode 100644 index 00000000000..57a77780ee9 --- /dev/null +++ b/soc/st/stm32/stm32mp2x/Kconfig.defconfig.stm32mp257fxx @@ -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 diff --git a/soc/st/stm32/stm32mp2x/Kconfig.soc b/soc/st/stm32/stm32mp2x/Kconfig.soc new file mode 100644 index 00000000000..92825e7a0c5 --- /dev/null +++ b/soc/st/stm32/stm32mp2x/Kconfig.soc @@ -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 diff --git a/soc/st/stm32/stm32mp2x/m33/CMakeLists.txt b/soc/st/stm32/stm32mp2x/m33/CMakeLists.txt new file mode 100644 index 00000000000..2ef552ce5ac --- /dev/null +++ b/soc/st/stm32/stm32mp2x/m33/CMakeLists.txt @@ -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(.) diff --git a/soc/st/stm32/stm32mp2x/m33/soc.h b/soc/st/stm32/stm32mp2x/m33/soc.h new file mode 100644 index 00000000000..c517d443c67 --- /dev/null +++ b/soc/st/stm32/stm32mp2x/m33/soc.h @@ -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 + +#endif /* !_ASMLANGUAGE */ + +#endif /* !_STM32MP2_M33_SOC_H_ */