soc: st: stm32: Migrate STM32G4 series

Port STM32G4 series to HW model v2

Signed-off-by: Guillaume Gautier <guillaume.gautier-ext@st.com>
This commit is contained in:
Guillaume Gautier
2024-02-08 15:14:35 +01:00
committed by Jamie McCrae
parent ada469f237
commit eb8a7e3441
17 changed files with 68 additions and 68 deletions

View File

@@ -1,34 +0,0 @@
# STMicroelectronics STM32G4 MCU line
# Copyright (c) 2019 Richard Osterloh <richard.osterloh@gmail.com>
# SPDX-License-Identifier: Apache-2.0
choice
prompt "STM32G4x MCU Selection"
depends on SOC_SERIES_STM32G4X
config SOC_STM32G4A1XX
bool "STM32G4A1XX"
config SOC_STM32G431XX
bool "STM32G431XX"
config SOC_STM32G441XX
bool "STM32G441XX"
config SOC_STM32G473XX
bool "STM32G473XX"
config SOC_STM32G474XX
bool "STM32G474XX"
config SOC_STM32G483XX
bool "STM32G483XX"
config SOC_STM32G484XX
bool "STM32G484XX"
config SOC_STM32G491XX
bool "STM32G491XX"
endchoice

View File

@@ -70,6 +70,16 @@ family:
- name: stm32g0b0xx
- name: stm32g0b1xx
- name: stm32g0c1xx
- name: stm32g4x
socs:
- name: stm32g431xx
- name: stm32g441xx
- name: stm32g473xx
- name: stm32g474xx
- name: stm32g483xx
- name: stm32g484xx
- name: stm32g491xx
- name: stm32g4a1xx
- name: stm32l1x
socs:
- name: stm32l151xb

View File

@@ -8,4 +8,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 "")

View File

@@ -4,16 +4,12 @@
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32G4X
bool "STM32G4x 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 CLOCK_CONTROL_STM32_CUBE if CLOCK_CONTROL
select HAS_PM
select HAS_SWO
help
Enable support for STM32G4 MCU series

View File

@@ -5,10 +5,7 @@
if SOC_SERIES_STM32G4X
source "soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g4*"
config SOC_SERIES
default "stm32g4"
rsource "Kconfig.defconfig.stm32g4*"
if PM
config PM_DEVICE

View File

@@ -1,13 +1,10 @@
# STMicroelectronics STM32G431RB MCU
# STMicroelectronics STM32G431XX MCU
# Copyright (c) 2019 Richard Osterloh <richard.osterloh@gmail.com>
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32G431XX
config SOC
default "stm32g431xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G441XX
config SOC
default "stm32g441xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G473XX
config SOC
default "stm32g473xx"
config NUM_IRQS
default 102

View File

@@ -1,13 +1,10 @@
# STMicroelectronics STM32G474RE MCU
# STMicroelectronics STM32G474XX MCU
# Copyright (c) 2019 STMicroelectronics.
# SPDX-License-Identifier: Apache-2.0
if SOC_STM32G474XX
config SOC
default "stm32g474xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G483XX
config SOC
default "stm32g483xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G484XX
config SOC
default "stm32g484xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G491XX
config SOC
default "stm32g491xx"
config NUM_IRQS
default 102

View File

@@ -5,9 +5,6 @@
if SOC_STM32G4A1XX
config SOC
default "stm32g4a1xx"
config NUM_IRQS
default 102

View File

@@ -0,0 +1,53 @@
# STMicroelectronics STM32G4 MCU line
# Copyright (c) 2019 Richard Osterloh <richard.osterloh@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_STM32G4X
bool
select SOC_FAMILY_STM32
config SOC_SERIES
default "stm32g4" if SOC_SERIES_STM32G4X
config SOC_STM32G431XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G441XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G473XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G474XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G483XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G484XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G491XX
bool
select SOC_SERIES_STM32G4X
config SOC_STM32G4A1XX
bool
select SOC_SERIES_STM32G4X
config SOC
default "stm32g431xx" if SOC_STM32G431XX
default "stm32g441xx" if SOC_STM32G441XX
default "stm32g473xx" if SOC_STM32G473XX
default "stm32g474xx" if SOC_STM32G474XX
default "stm32g483xx" if SOC_STM32G483XX
default "stm32g484xx" if SOC_STM32G484XX
default "stm32g491xx" if SOC_STM32G491XX
default "stm32g4a1xx" if SOC_STM32G4A1XX