diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.soc b/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.soc deleted file mode 100644 index c93746ca488..00000000000 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.soc +++ /dev/null @@ -1,16 +0,0 @@ -# ST Microelectronics STM32L5 MCU line - -# Copyright (c) 2020 Linaro Limited -# SPDX-License-Identifier: Apache-2.0 - -choice -prompt "STM32L5x MCU Selection" -depends on SOC_SERIES_STM32L5X - -config SOC_STM32L552XX - bool "STM32L552XX" - -config SOC_STM32L562XX - bool "STM32L562XX" - -endchoice diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index 10d16a560f3..b755eb2ee93 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -87,6 +87,10 @@ family: - name: stm32l151xc - name: stm32l152xc - name: stm32l152xe + - name: stm32l5x + socs: + - name: stm32l552xx + - name: stm32l562xx - name: stm32mp1x socs: - name: stm32mp157cxx diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/CMakeLists.txt b/soc/st/stm32/stm32l5/CMakeLists.txt similarity index 89% rename from soc/soc_legacy/arm/st_stm32/stm32l5/CMakeLists.txt rename to soc/st/stm32/stm32l5/CMakeLists.txt index 0fd5073770d..bc9a65c0049 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/CMakeLists.txt +++ b/soc/st/stm32/stm32l5/CMakeLists.txt @@ -9,4 +9,6 @@ zephyr_sources_ifdef(CONFIG_PM power.c ) +zephyr_include_directories(.) + set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "") diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.series b/soc/st/stm32/stm32l5/Kconfig similarity index 78% rename from soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.series rename to soc/st/stm32/stm32l5/Kconfig index ffee96473c3..ac7de0dfd7d 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.series +++ b/soc/st/stm32/stm32l5/Kconfig @@ -4,10 +4,8 @@ # SPDX-License-Identifier: Apache-2.0 config SOC_SERIES_STM32L5X - bool "STM32L5x Series MCU" select ARM select CPU_CORTEX_M33 - select SOC_FAMILY_STM32 select ARM_TRUSTZONE_M select CPU_HAS_ARM_SAU select CPU_HAS_ARM_MPU @@ -16,5 +14,3 @@ config SOC_SERIES_STM32L5X select CPU_CORTEX_M_HAS_DWT select HAS_STM32CUBE select HAS_PM - help - Enable support for STM32L5 MCU series diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.series b/soc/st/stm32/stm32l5/Kconfig.defconfig similarity index 60% rename from soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.series rename to soc/st/stm32/stm32l5/Kconfig.defconfig index 3b2229fa1c0..2c8607c9b79 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.series +++ b/soc/st/stm32/stm32l5/Kconfig.defconfig @@ -5,9 +5,9 @@ if SOC_SERIES_STM32L5X -source "soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l5*" +rsource "Kconfig.defconfig.stm32l5*" -config SOC_SERIES - default "stm32l5" +config ROM_START_OFFSET + default 0x400 if BOOTLOADER_MCUBOOT endif # SOC_SERIES_STM32L5X diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l552xx b/soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l552xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l552xx rename to soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l552xx index 7692fbd7451..29d2e2d8147 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l552xx +++ b/soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l552xx @@ -5,9 +5,6 @@ if SOC_STM32L552XX -config SOC - default "stm32l552xx" - config NUM_IRQS default 108 diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l562xx b/soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l562xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l562xx rename to soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l562xx index 484880dc910..5b1490c11c9 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32l5/Kconfig.defconfig.stm32l562xx +++ b/soc/st/stm32/stm32l5/Kconfig.defconfig.stm32l562xx @@ -5,9 +5,6 @@ if SOC_STM32L562XX -config SOC - default "stm32l562xx" - config NUM_IRQS default 109 diff --git a/soc/st/stm32/stm32l5/Kconfig.soc b/soc/st/stm32/stm32l5/Kconfig.soc new file mode 100644 index 00000000000..fff9f5fd0d2 --- /dev/null +++ b/soc/st/stm32/stm32l5/Kconfig.soc @@ -0,0 +1,23 @@ +# ST Microelectronics STM32L5 MCU line + +# Copyright (c) 2020 Linaro Limited +# SPDX-License-Identifier: Apache-2.0 + +config SOC_SERIES_STM32L5X + bool + select SOC_FAMILY_STM32 + +config SOC_SERIES + default "stm32l5" if SOC_SERIES_STM32L5X + +config SOC_STM32L552XX + bool + select SOC_SERIES_STM32L5X + +config SOC_STM32L562XX + bool + select SOC_SERIES_STM32L5X + +config SOC + default "stm32l552xx" if SOC_STM32L552XX + default "stm32l562xx" if SOC_STM32L562XX diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/power.c b/soc/st/stm32/stm32l5/power.c similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32l5/power.c rename to soc/st/stm32/stm32l5/power.c diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/soc.c b/soc/st/stm32/stm32l5/soc.c similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32l5/soc.c rename to soc/st/stm32/stm32l5/soc.c diff --git a/soc/soc_legacy/arm/st_stm32/stm32l5/soc.h b/soc/st/stm32/stm32l5/soc.h similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32l5/soc.h rename to soc/st/stm32/stm32l5/soc.h