Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

hwmv2: Port STM32G4X SoCs & boards #68754

Merged
merged 6 commits into from
Feb 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 0 additions & 8 deletions boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.board

This file was deleted.

11 changes: 0 additions & 11 deletions boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.defconfig

This file was deleted.

8 changes: 0 additions & 8 deletions boards/boards_legacy/arm/nucleo_g474re/Kconfig.board

This file was deleted.

12 changes: 0 additions & 12 deletions boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.defconfig

This file was deleted.

5 changes: 5 additions & 0 deletions boards/st/b_g474e_dpow1/Kconfig.b_g474e_dpow1
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2022 The Chromium OS Authors
# SPDX-License-Identifier: Apache-2.0

config BOARD_B_G474E_DPOW1
select SOC_STM32G474XX
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
#
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_STM32G4X=y
CONFIG_SOC_STM32G474XX=y

# Serial Drivers
CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
Expand Down
5 changes: 5 additions & 0 deletions boards/st/b_g474e_dpow1/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: b_g474e_dpow1
vendor: st
socs:
- name: stm32g474xx
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if BOARD_NUCLEO_G431RB

config BOARD
default "nucleo_g431rb"

config SPI_STM32_INTERRUPT
default y
depends on SPI
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# STM32G431RB Nucleo board configuration

# Copyright (c) 2019 Richard Osterloh <[email protected]>
# SPDX-License-Identifier: Apache-2.0

config BOARD_NUCLEO_G431RB
bool "Nucleo G431RB Development Board"
depends on SOC_STM32G431XX
select SOC_STM32G431XX
5 changes: 5 additions & 0 deletions boards/st/nucleo_g431rb/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: nucleo_g431rb
vendor: st
socs:
- name: stm32g431xx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_STM32G4X=y
CONFIG_SOC_STM32G431XX=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if BOARD_NUCLEO_G474RE

config BOARD
default "nucleo_g474re"

config SPI_STM32_INTERRUPT
default y
depends on SPI
Expand Down
5 changes: 5 additions & 0 deletions boards/st/nucleo_g474re/Kconfig.nucleo_g474re
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright (c) 2019 STMicroelectronics.
# SPDX-License-Identifier: Apache-2.0

config BOARD_NUCLEO_G474RE
select SOC_STM32G474XX
5 changes: 5 additions & 0 deletions boards/st/nucleo_g474re/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: nucleo_g474re
vendor: st
socs:
- name: stm32g474xx
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_STM32G4X=y
CONFIG_SOC_STM32G474XX=y

# enable uart driver
CONFIG_SERIAL=y

Expand Down
Original file line number Diff line number Diff line change
@@ -1,9 +1,5 @@
#
# Copyright (c) 2023 Andreas Sandberg
#
# SPDX-License-Identifier: Apache-2.0
#

config BOARD_WEACT_STM32G431_CORE
bool "WeAct Studio STM32G431 Core Board"
depends on SOC_STM32G431XX
select SOC_STM32G431XX
5 changes: 5 additions & 0 deletions boards/weact/weact_stm32g431_core/board.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
board:
name: weact_stm32g431_core
vendor: weact
socs:
- name: stm32g431xx
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,6 @@
# SPDX-License-Identifier: Apache-2.0
#

CONFIG_SOC_SERIES_STM32G4X=y
CONFIG_SOC_STM32G431XX=y

CONFIG_CLOCK_CONTROL=y
CONFIG_PINCTRL=y

Expand Down
34 changes: 0 additions & 34 deletions soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.soc

This file was deleted.

10 changes: 10 additions & 0 deletions soc/st/stm32/soc.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -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 "")
Original file line number Diff line number Diff line change
Expand Up @@ -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
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
Original file line number Diff line number Diff line change
@@ -1,13 +1,10 @@
# STMicroelectronics STM32G431RB MCU
# STMicroelectronics STM32G431XX MCU

# Copyright (c) 2019 Richard Osterloh <[email protected]>
# SPDX-License-Identifier: Apache-2.0

if SOC_STM32G431XX

config SOC
default "stm32g431xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G441XX

config SOC
default "stm32g441xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G473XX

config SOC
default "stm32g473xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
@@ -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

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G483XX

config SOC
default "stm32g483xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G484XX

config SOC
default "stm32g484xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G491XX

config SOC
default "stm32g491xx"

config NUM_IRQS
default 102

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -5,9 +5,6 @@

if SOC_STM32G4A1XX

config SOC
default "stm32g4a1xx"

config NUM_IRQS
default 102

Expand Down
53 changes: 53 additions & 0 deletions soc/st/stm32/stm32g4/Kconfig.soc
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
# STMicroelectronics STM32G4 MCU line

# Copyright (c) 2019 Richard Osterloh <[email protected]>
# 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
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,7 @@
#include <zephyr/device.h>
#include <zephyr/init.h>
#include <stm32_ll_system.h>
#include <soc.h>

#include <cmsis_core.h>
#if defined(PWR_CR3_UCPD_DBDIS)
Expand Down
File renamed without changes.
Loading