soc: st: stm32: Migrate STM32L4 series

Port STM32L4 series to HW model v2

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier
2024-02-09 09:07:08 +01:00
committed by Carles Cufi
parent a63ff71bcb
commit d15144f582
29 changed files with 135 additions and 132 deletions

View File

@@ -1,70 +0,0 @@
# ST Microelectronics STM32L4 MCU line
# Copyright (c) 2016 Open-RnD Sp. z o.o.
# Copyright (c) 2016 BayLibre, SAS
# Copyright (c) 2019 Centaur Analytics, Inc
# Copyright (c) 2019 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
choice
prompt "STM32L4x MCU Selection"
depends on SOC_SERIES_STM32L4X
config SOC_STM32L476XX
bool "STM32L476XX"
config SOC_STM32L486XX
bool "STM32L486XX"
config SOC_STM32L496XX
bool "STM32L496XX"
config SOC_STM32L4A6XX
bool "STM32L4A6XX"
config SOC_STM32L412XX
bool "STM32L412XX"
config SOC_STM32L422XX
bool "STM32L422XX"
config SOC_STM32L431XX
bool "STM32L431XX"
config SOC_STM32L432XX
bool "STM32L432XX"
config SOC_STM32L433XX
bool "STM32L433XX"
config SOC_STM32L451XX
bool "STM32L451XX"
config SOC_STM32L452XX
bool "STM32L452XX"
config SOC_STM32L462XX
bool "STM32L462XX"
config SOC_STM32L475XX
bool "STM32L475XX"
config SOC_STM32L4P5XX
bool "STM32L4P5XX"
config SOC_STM32L4Q5XX
bool "STM32L4Q5XX"
config SOC_STM32L4S5XX
bool "STM32L4S5XX"
config SOC_STM32L4R5XX
bool "STM32L4R5XX"
config SOC_STM32L4R9XX
bool "STM32L4R9XX"
config SOC_STM32L471XX
bool "STM32L471XX"
endchoice

View File

@@ -137,6 +137,27 @@ family:
- name: stm32l151xc
- name: stm32l152xc
- name: stm32l152xe
- name: stm32l4x
socs:
- name: stm32l412xx
- name: stm32l422xx
- name: stm32l431xx
- name: stm32l432xx
- name: stm32l433xx
- name: stm32l451xx
- name: stm32l452xx
- name: stm32l462xx
- name: stm32l471xx
- name: stm32l475xx
- name: stm32l476xx
- name: stm32l486xx
- name: stm32l496xx
- name: stm32l4a6xx
- name: stm32l4p5xx
- name: stm32l4q5xx
- name: stm32l4s5xx
- name: stm32l4r5xx
- name: stm32l4r9xx
- name: stm32l5x
socs:
- name: stm32l552xx

View File

@@ -11,4 +11,6 @@ zephyr_sources_ifdef(CONFIG_PM
zephyr_sources_ifdef(CONFIG_POWEROFF poweroff.c)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/arm/cortex_m/scripts/linker.ld CACHE INTERNAL "")

View File

@@ -5,16 +5,12 @@
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32L4X
bool "STM32L4x Series MCU"
select ARM
select CPU_CORTEX_M4
select CPU_CORTEX_M_HAS_DWT
select CPU_HAS_FPU
select SOC_FAMILY_STM32
select HAS_STM32CUBE
select CPU_HAS_ARM_MPU
select HAS_SWO
select HAS_PM
select HAS_POWEROFF
help
Enable support for STM32L4 MCU series

View File

@@ -8,7 +8,7 @@
if SOC_SERIES_STM32L4X
source "soc/soc_legacy/arm/st_stm32/stm32l4/Kconfig.defconfig.stm32l4*"
rsource "Kconfig.defconfig.stm32l4*"
config SOC_SERIES
default "stm32l4"

View File

@@ -5,9 +5,6 @@
if SOC_STM32L412XX
config SOC
default "stm32l412xx"
config NUM_IRQS
default 83

View File

@@ -5,9 +5,6 @@
if SOC_STM32L422XX
config SOC
default "stm32l422xx"
config NUM_IRQS
default 83

View File

@@ -5,9 +5,6 @@
if SOC_STM32L431XX
config SOC
default "stm32l431xx"
config NUM_IRQS
default 83

View File

@@ -6,9 +6,6 @@
if SOC_STM32L432XX
config SOC
default "stm32l432xx"
config NUM_IRQS
default 83

View File

@@ -5,9 +5,6 @@
if SOC_STM32L433XX
config SOC
default "stm32l433xx"
config NUM_IRQS
default 83

View File

@@ -5,9 +5,6 @@
if SOC_STM32L451XX
config SOC
default "stm32l451xx"
config NUM_IRQS
default 85

View File

@@ -5,9 +5,6 @@
if SOC_STM32L452XX
config SOC
default "stm32l452xx"
config NUM_IRQS
default 85

View File

@@ -5,9 +5,6 @@
if SOC_STM32L462XX
config SOC
default "stm32l462xx"
config NUM_IRQS
default 85

View File

@@ -5,9 +5,6 @@
if SOC_STM32L471XX
config SOC
default "stm32l471xx"
config NUM_IRQS
default 82

View File

@@ -5,9 +5,6 @@
if SOC_STM32L475XX
config SOC
default "stm32l475xx"
config NUM_IRQS
default 82

View File

@@ -6,9 +6,6 @@
if SOC_STM32L476XX
config SOC
default "stm32l476xx"
config NUM_IRQS
default 82

View File

@@ -7,9 +7,6 @@
if SOC_STM32L486XX
config SOC
default "stm32l486xx"
config NUM_IRQS
default 82

View File

@@ -7,9 +7,6 @@
if SOC_STM32L496XX
config SOC
default "stm32l496xx"
config NUM_IRQS
default 91

View File

@@ -8,9 +8,6 @@
if SOC_STM32L4A6XX
config SOC
default "stm32l4a6xx"
config NUM_IRQS
default 91

View File

@@ -5,9 +5,6 @@
if SOC_STM32L4P5XX
config SOC
default "stm32l4p5xx"
config NUM_IRQS
default 95

View File

@@ -5,9 +5,6 @@
if SOC_STM32L4Q5XX
config SOC
default "stm32l4q5xx"
config NUM_IRQS
default 95

View File

@@ -5,9 +5,6 @@
if SOC_STM32L4R5XX
config SOC
default "stm32l4r5xx"
config NUM_IRQS
default 95

View File

@@ -5,9 +5,6 @@
if SOC_STM32L4R9XX
config SOC
default "stm32l4r9xx"
config NUM_IRQS
default 95

View File

@@ -5,9 +5,6 @@
if SOC_STM32L4S5XX
config SOC
default "stm32l4s5xx"
config NUM_IRQS
default 95

View File

@@ -0,0 +1,111 @@
# ST Microelectronics STM32L4 MCU line
# Copyright (c) 2016 Open-RnD Sp. z o.o.
# Copyright (c) 2016 BayLibre, SAS
# Copyright (c) 2019 Centaur Analytics, Inc
# Copyright (c) 2019 STMicroelectronics
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32L4X
bool
select SOC_FAMILY_STM32
config SOC_SERIES
default "stm32l4" if SOC_SERIES_STM32L4X
config SOC_STM32L412XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L422XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L431XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L432XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L433XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L451XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L452XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L462XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L471XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L475XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L476XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L486XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L496XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4A6XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4P5XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4Q5XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4S5XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4R5XX
bool
select SOC_SERIES_STM32L4X
config SOC_STM32L4R9XX
bool
select SOC_SERIES_STM32L4X
config SOC
default "stm32l412xx" if SOC_STM32L412XX
default "stm32l422xx" if SOC_STM32L422XX
default "stm32l431xx" if SOC_STM32L431XX
default "stm32l432xx" if SOC_STM32L432XX
default "stm32l433xx" if SOC_STM32L433XX
default "stm32l451xx" if SOC_STM32L451XX
default "stm32l452xx" if SOC_STM32L452XX
default "stm32l462xx" if SOC_STM32L462XX
default "stm32l471xx" if SOC_STM32L471XX
default "stm32l475xx" if SOC_STM32L475XX
default "stm32l476xx" if SOC_STM32L476XX
default "stm32l486xx" if SOC_STM32L486XX
default "stm32l496xx" if SOC_STM32L496XX
default "stm32l4a6xx" if SOC_STM32L4A6XX
default "stm32l4p5xx" if SOC_STM32L4P5XX
default "stm32l4q5xx" if SOC_STM32L4Q5XX
default "stm32l4s5xx" if SOC_STM32L4S5XX
default "stm32l4r5xx" if SOC_STM32L4R5XX
default "stm32l4r9xx" if SOC_STM32L4R9XX