diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.board b/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.board deleted file mode 100644 index 405ce71cb7bb..000000000000 --- a/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# B-G474E-DPOW1 Discovery board configuration - -# Copyright 2022 The Chromium OS Authors -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_B_G474E_DPOW1 - bool "B-G474E-DPOW1 Discovery Board" - depends on SOC_STM32G474XX diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.defconfig b/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.defconfig deleted file mode 100644 index 88bcf7695280..000000000000 --- a/boards/boards_legacy/arm/b_g474e_dpow1/Kconfig.defconfig +++ /dev/null @@ -1,11 +0,0 @@ -# B-G474E-DPOW1 Discovery board configuration - -# Copyright 2022 The Chromium OS Authors -# SPDX-License-Identifier: Apache-2.0 - -if BOARD_B_G474E_DPOW1 - -config BOARD - default "b_g474e_bpow1" - -endif # BOARD_B_G474E_DPOW1 diff --git a/boards/boards_legacy/arm/nucleo_g474re/Kconfig.board b/boards/boards_legacy/arm/nucleo_g474re/Kconfig.board deleted file mode 100644 index 157e93af1ec6..000000000000 --- a/boards/boards_legacy/arm/nucleo_g474re/Kconfig.board +++ /dev/null @@ -1,8 +0,0 @@ -# STM32G474RE Nucleo board configuration - -# Copyright (c) 2019 STMicroelectronics. -# SPDX-License-Identifier: Apache-2.0 - -config BOARD_NUCLEO_G474RE - bool "Nucleo G474RE Development Board" - depends on SOC_STM32G474XX diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.defconfig b/boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.defconfig deleted file mode 100644 index 25d654550135..000000000000 --- a/boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.defconfig +++ /dev/null @@ -1,12 +0,0 @@ -# -# Copyright (c) 2023 Andreas Sandberg -# -# SPDX-License-Identifier: Apache-2.0 -# - -if BOARD_WEACT_STM32G431_CORE - -config BOARD - default "weact_stm32g431_core" - -endif diff --git a/boards/st/b_g474e_dpow1/Kconfig.b_g474e_dpow1 b/boards/st/b_g474e_dpow1/Kconfig.b_g474e_dpow1 new file mode 100644 index 000000000000..75a8d42b2ee6 --- /dev/null +++ b/boards/st/b_g474e_dpow1/Kconfig.b_g474e_dpow1 @@ -0,0 +1,5 @@ +# Copyright 2022 The Chromium OS Authors +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_B_G474E_DPOW1 + select SOC_STM32G474XX diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1.dts b/boards/st/b_g474e_dpow1/b_g474e_dpow1.dts similarity index 100% rename from boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1.dts rename to boards/st/b_g474e_dpow1/b_g474e_dpow1.dts diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1.yaml b/boards/st/b_g474e_dpow1/b_g474e_dpow1.yaml similarity index 100% rename from boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1.yaml rename to boards/st/b_g474e_dpow1/b_g474e_dpow1.yaml diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1_defconfig b/boards/st/b_g474e_dpow1/b_g474e_dpow1_defconfig similarity index 88% rename from boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1_defconfig rename to boards/st/b_g474e_dpow1/b_g474e_dpow1_defconfig index 6e0659f281d7..3da57c5589e1 100644 --- a/boards/boards_legacy/arm/b_g474e_dpow1/b_g474e_dpow1_defconfig +++ b/boards/st/b_g474e_dpow1/b_g474e_dpow1_defconfig @@ -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 diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/board.cmake b/boards/st/b_g474e_dpow1/board.cmake similarity index 100% rename from boards/boards_legacy/arm/b_g474e_dpow1/board.cmake rename to boards/st/b_g474e_dpow1/board.cmake diff --git a/boards/st/b_g474e_dpow1/board.yml b/boards/st/b_g474e_dpow1/board.yml new file mode 100644 index 000000000000..06d037f81a0f --- /dev/null +++ b/boards/st/b_g474e_dpow1/board.yml @@ -0,0 +1,5 @@ +board: + name: b_g474e_dpow1 + vendor: st + socs: + - name: stm32g474xx diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/doc/img/b_g474e_dpow1.jpg b/boards/st/b_g474e_dpow1/doc/img/b_g474e_dpow1.jpg similarity index 100% rename from boards/boards_legacy/arm/b_g474e_dpow1/doc/img/b_g474e_dpow1.jpg rename to boards/st/b_g474e_dpow1/doc/img/b_g474e_dpow1.jpg diff --git a/boards/boards_legacy/arm/b_g474e_dpow1/doc/index.rst b/boards/st/b_g474e_dpow1/doc/index.rst similarity index 100% rename from boards/boards_legacy/arm/b_g474e_dpow1/doc/index.rst rename to boards/st/b_g474e_dpow1/doc/index.rst diff --git a/boards/boards_legacy/arm/nucleo_g431rb/Kconfig.defconfig b/boards/st/nucleo_g431rb/Kconfig.defconfig similarity index 86% rename from boards/boards_legacy/arm/nucleo_g431rb/Kconfig.defconfig rename to boards/st/nucleo_g431rb/Kconfig.defconfig index 62c8e061965f..9d0323049ba8 100644 --- a/boards/boards_legacy/arm/nucleo_g431rb/Kconfig.defconfig +++ b/boards/st/nucleo_g431rb/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_NUCLEO_G431RB -config BOARD - default "nucleo_g431rb" - config SPI_STM32_INTERRUPT default y depends on SPI diff --git a/boards/boards_legacy/arm/nucleo_g431rb/Kconfig.board b/boards/st/nucleo_g431rb/Kconfig.nucleo_g431rb similarity index 54% rename from boards/boards_legacy/arm/nucleo_g431rb/Kconfig.board rename to boards/st/nucleo_g431rb/Kconfig.nucleo_g431rb index 27de2edbdad4..304e9cc08881 100644 --- a/boards/boards_legacy/arm/nucleo_g431rb/Kconfig.board +++ b/boards/st/nucleo_g431rb/Kconfig.nucleo_g431rb @@ -1,8 +1,5 @@ -# STM32G431RB Nucleo board configuration - # Copyright (c) 2019 Richard Osterloh # SPDX-License-Identifier: Apache-2.0 config BOARD_NUCLEO_G431RB - bool "Nucleo G431RB Development Board" - depends on SOC_STM32G431XX + select SOC_STM32G431XX diff --git a/boards/boards_legacy/arm/nucleo_g431rb/arduino_r3_connector.dtsi b/boards/st/nucleo_g431rb/arduino_r3_connector.dtsi similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/arduino_r3_connector.dtsi rename to boards/st/nucleo_g431rb/arduino_r3_connector.dtsi diff --git a/boards/boards_legacy/arm/nucleo_g431rb/board.cmake b/boards/st/nucleo_g431rb/board.cmake similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/board.cmake rename to boards/st/nucleo_g431rb/board.cmake diff --git a/boards/st/nucleo_g431rb/board.yml b/boards/st/nucleo_g431rb/board.yml new file mode 100644 index 000000000000..460dcf740e85 --- /dev/null +++ b/boards/st/nucleo_g431rb/board.yml @@ -0,0 +1,5 @@ +board: + name: nucleo_g431rb + vendor: st + socs: + - name: stm32g431xx diff --git a/boards/boards_legacy/arm/nucleo_g431rb/doc/img/nucleo_g431rb.jpg b/boards/st/nucleo_g431rb/doc/img/nucleo_g431rb.jpg similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/doc/img/nucleo_g431rb.jpg rename to boards/st/nucleo_g431rb/doc/img/nucleo_g431rb.jpg diff --git a/boards/boards_legacy/arm/nucleo_g431rb/doc/index.rst b/boards/st/nucleo_g431rb/doc/index.rst similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/doc/index.rst rename to boards/st/nucleo_g431rb/doc/index.rst diff --git a/boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb.dts b/boards/st/nucleo_g431rb/nucleo_g431rb.dts similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb.dts rename to boards/st/nucleo_g431rb/nucleo_g431rb.dts diff --git a/boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb.yaml b/boards/st/nucleo_g431rb/nucleo_g431rb.yaml similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb.yaml rename to boards/st/nucleo_g431rb/nucleo_g431rb.yaml diff --git a/boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb_defconfig b/boards/st/nucleo_g431rb/nucleo_g431rb_defconfig similarity index 85% rename from boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb_defconfig rename to boards/st/nucleo_g431rb/nucleo_g431rb_defconfig index 92c2363d2d8f..5bd145ba76ca 100644 --- a/boards/boards_legacy/arm/nucleo_g431rb/nucleo_g431rb_defconfig +++ b/boards/st/nucleo_g431rb/nucleo_g431rb_defconfig @@ -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 diff --git a/boards/boards_legacy/arm/nucleo_g431rb/st_morpho_connector.dtsi b/boards/st/nucleo_g431rb/st_morpho_connector.dtsi similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/st_morpho_connector.dtsi rename to boards/st/nucleo_g431rb/st_morpho_connector.dtsi diff --git a/boards/boards_legacy/arm/nucleo_g431rb/support/openocd.cfg b/boards/st/nucleo_g431rb/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/nucleo_g431rb/support/openocd.cfg rename to boards/st/nucleo_g431rb/support/openocd.cfg diff --git a/boards/boards_legacy/arm/nucleo_g474re/Kconfig.defconfig b/boards/st/nucleo_g474re/Kconfig.defconfig similarity index 85% rename from boards/boards_legacy/arm/nucleo_g474re/Kconfig.defconfig rename to boards/st/nucleo_g474re/Kconfig.defconfig index 5af458d22620..fb93e1098d1a 100644 --- a/boards/boards_legacy/arm/nucleo_g474re/Kconfig.defconfig +++ b/boards/st/nucleo_g474re/Kconfig.defconfig @@ -5,9 +5,6 @@ if BOARD_NUCLEO_G474RE -config BOARD - default "nucleo_g474re" - config SPI_STM32_INTERRUPT default y depends on SPI diff --git a/boards/st/nucleo_g474re/Kconfig.nucleo_g474re b/boards/st/nucleo_g474re/Kconfig.nucleo_g474re new file mode 100644 index 000000000000..bf6ef1999713 --- /dev/null +++ b/boards/st/nucleo_g474re/Kconfig.nucleo_g474re @@ -0,0 +1,5 @@ +# Copyright (c) 2019 STMicroelectronics. +# SPDX-License-Identifier: Apache-2.0 + +config BOARD_NUCLEO_G474RE + select SOC_STM32G474XX diff --git a/boards/boards_legacy/arm/nucleo_g474re/arduino_r3_connector.dtsi b/boards/st/nucleo_g474re/arduino_r3_connector.dtsi similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/arduino_r3_connector.dtsi rename to boards/st/nucleo_g474re/arduino_r3_connector.dtsi diff --git a/boards/boards_legacy/arm/nucleo_g474re/board.cmake b/boards/st/nucleo_g474re/board.cmake similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/board.cmake rename to boards/st/nucleo_g474re/board.cmake diff --git a/boards/st/nucleo_g474re/board.yml b/boards/st/nucleo_g474re/board.yml new file mode 100644 index 000000000000..7cf7857f5270 --- /dev/null +++ b/boards/st/nucleo_g474re/board.yml @@ -0,0 +1,5 @@ +board: + name: nucleo_g474re + vendor: st + socs: + - name: stm32g474xx diff --git a/boards/boards_legacy/arm/nucleo_g474re/doc/img/nucleo_g474re.jpg b/boards/st/nucleo_g474re/doc/img/nucleo_g474re.jpg similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/doc/img/nucleo_g474re.jpg rename to boards/st/nucleo_g474re/doc/img/nucleo_g474re.jpg diff --git a/boards/boards_legacy/arm/nucleo_g474re/doc/index.rst b/boards/st/nucleo_g474re/doc/index.rst similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/doc/index.rst rename to boards/st/nucleo_g474re/doc/index.rst diff --git a/boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re.dts b/boards/st/nucleo_g474re/nucleo_g474re.dts similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re.dts rename to boards/st/nucleo_g474re/nucleo_g474re.dts diff --git a/boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re.yaml b/boards/st/nucleo_g474re/nucleo_g474re.yaml similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re.yaml rename to boards/st/nucleo_g474re/nucleo_g474re.yaml diff --git a/boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re_defconfig b/boards/st/nucleo_g474re/nucleo_g474re_defconfig similarity index 85% rename from boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re_defconfig rename to boards/st/nucleo_g474re/nucleo_g474re_defconfig index 15b382fefaec..b22a31b2f201 100644 --- a/boards/boards_legacy/arm/nucleo_g474re/nucleo_g474re_defconfig +++ b/boards/st/nucleo_g474re/nucleo_g474re_defconfig @@ -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 diff --git a/boards/boards_legacy/arm/nucleo_g474re/support/openocd.cfg b/boards/st/nucleo_g474re/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/nucleo_g474re/support/openocd.cfg rename to boards/st/nucleo_g474re/support/openocd.cfg diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.board b/boards/weact/weact_stm32g431_core/Kconfig.weact_stm32g431_core similarity index 59% rename from boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.board rename to boards/weact/weact_stm32g431_core/Kconfig.weact_stm32g431_core index 9886fd647027..2bd370e9311d 100644 --- a/boards/boards_legacy/arm/weact_stm32g431_core/Kconfig.board +++ b/boards/weact/weact_stm32g431_core/Kconfig.weact_stm32g431_core @@ -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 diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/board.cmake b/boards/weact/weact_stm32g431_core/board.cmake similarity index 100% rename from boards/boards_legacy/arm/weact_stm32g431_core/board.cmake rename to boards/weact/weact_stm32g431_core/board.cmake diff --git a/boards/weact/weact_stm32g431_core/board.yml b/boards/weact/weact_stm32g431_core/board.yml new file mode 100644 index 000000000000..359e74ed0d75 --- /dev/null +++ b/boards/weact/weact_stm32g431_core/board.yml @@ -0,0 +1,5 @@ +board: + name: weact_stm32g431_core + vendor: weact + socs: + - name: stm32g431xx diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/doc/index.rst b/boards/weact/weact_stm32g431_core/doc/index.rst similarity index 100% rename from boards/boards_legacy/arm/weact_stm32g431_core/doc/index.rst rename to boards/weact/weact_stm32g431_core/doc/index.rst diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/support/openocd.cfg b/boards/weact/weact_stm32g431_core/support/openocd.cfg similarity index 100% rename from boards/boards_legacy/arm/weact_stm32g431_core/support/openocd.cfg rename to boards/weact/weact_stm32g431_core/support/openocd.cfg diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core.dts b/boards/weact/weact_stm32g431_core/weact_stm32g431_core.dts similarity index 100% rename from boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core.dts rename to boards/weact/weact_stm32g431_core/weact_stm32g431_core.dts diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core.yaml b/boards/weact/weact_stm32g431_core/weact_stm32g431_core.yaml similarity index 100% rename from boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core.yaml rename to boards/weact/weact_stm32g431_core/weact_stm32g431_core.yaml diff --git a/boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core_defconfig b/boards/weact/weact_stm32g431_core/weact_stm32g431_core_defconfig similarity index 83% rename from boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core_defconfig rename to boards/weact/weact_stm32g431_core/weact_stm32g431_core_defconfig index 0c9d0e2a1856..19919b198ca2 100644 --- a/boards/boards_legacy/arm/weact_stm32g431_core/weact_stm32g431_core_defconfig +++ b/boards/weact/weact_stm32g431_core/weact_stm32g431_core_defconfig @@ -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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.soc b/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.soc deleted file mode 100644 index 9868522fc311..000000000000 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.soc +++ /dev/null @@ -1,34 +0,0 @@ -# STMicroelectronics STM32G4 MCU line - -# Copyright (c) 2019 Richard Osterloh -# 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 diff --git a/soc/st/stm32/soc.yml b/soc/st/stm32/soc.yml index b9483d17af83..6a34a7a0db26 100644 --- a/soc/st/stm32/soc.yml +++ b/soc/st/stm32/soc.yml @@ -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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/CMakeLists.txt b/soc/st/stm32/stm32g4/CMakeLists.txt similarity index 89% rename from soc/soc_legacy/arm/st_stm32/stm32g4/CMakeLists.txt rename to soc/st/stm32/stm32g4/CMakeLists.txt index 04911a6a2e47..cfbedf4ff854 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/CMakeLists.txt +++ b/soc/st/stm32/stm32g4/CMakeLists.txt @@ -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 "") diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.series b/soc/st/stm32/stm32g4/Kconfig similarity index 79% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.series rename to soc/st/stm32/stm32g4/Kconfig index f04432c3ee30..50aecbbca3c6 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.series +++ b/soc/st/stm32/stm32g4/Kconfig @@ -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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.series b/soc/st/stm32/stm32g4/Kconfig.defconfig similarity index 71% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.series rename to soc/st/stm32/stm32g4/Kconfig.defconfig index fd4f2a792dd2..0a9488d7e4c0 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.series +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig @@ -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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g431rb b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g431xx similarity index 71% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g431rb rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g431xx index 90a68ce0b6d1..73d1c70368e3 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g431rb +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g431xx @@ -1,13 +1,10 @@ -# STMicroelectronics STM32G431RB MCU +# STMicroelectronics STM32G431XX MCU # Copyright (c) 2019 Richard Osterloh # SPDX-License-Identifier: Apache-2.0 if SOC_STM32G431XX -config SOC - default "stm32g431xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g441xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g441xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g441xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g441xx index 3630ac865d22..ec5a0092cd0f 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g441xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g441xx @@ -5,9 +5,6 @@ if SOC_STM32G441XX -config SOC - default "stm32g441xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g473xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g473xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g473xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g473xx index 108ca2aecf1c..46caf1f4bc0b 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g473xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g473xx @@ -5,9 +5,6 @@ if SOC_STM32G473XX -config SOC - default "stm32g473xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g474re b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g474xx similarity index 68% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g474re rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g474xx index 78bca517cc13..dac9df141e10 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g474re +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g474xx @@ -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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g483xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g483xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g483xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g483xx index 5564372b3bbe..b0cd7a2b55df 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g483xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g483xx @@ -5,9 +5,6 @@ if SOC_STM32G483XX -config SOC - default "stm32g483xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g484xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g484xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g484xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g484xx index 2c5b500833c6..ed1165bef1f1 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g484xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g484xx @@ -5,9 +5,6 @@ if SOC_STM32G484XX -config SOC - default "stm32g484xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g491xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g491xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g491xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g491xx index a8cbbe859f0a..33a14e1c58e2 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g491xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g491xx @@ -5,9 +5,6 @@ if SOC_STM32G491XX -config SOC - default "stm32g491xx" - config NUM_IRQS default 102 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx similarity index 84% rename from soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx rename to soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx index 280eb0790a2a..f472e8323e62 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx +++ b/soc/st/stm32/stm32g4/Kconfig.defconfig.stm32g4a1xx @@ -5,9 +5,6 @@ if SOC_STM32G4A1XX -config SOC - default "stm32g4a1xx" - config NUM_IRQS default 102 diff --git a/soc/st/stm32/stm32g4/Kconfig.soc b/soc/st/stm32/stm32g4/Kconfig.soc new file mode 100644 index 000000000000..ff8a40f927c2 --- /dev/null +++ b/soc/st/stm32/stm32g4/Kconfig.soc @@ -0,0 +1,53 @@ +# STMicroelectronics STM32G4 MCU line + +# Copyright (c) 2019 Richard Osterloh +# 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 diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/power.c b/soc/st/stm32/stm32g4/power.c similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32g4/power.c rename to soc/st/stm32/stm32g4/power.c diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/soc.c b/soc/st/stm32/stm32g4/soc.c similarity index 98% rename from soc/soc_legacy/arm/st_stm32/stm32g4/soc.c rename to soc/st/stm32/stm32g4/soc.c index 94600c48327d..c8d41f474f94 100644 --- a/soc/soc_legacy/arm/st_stm32/stm32g4/soc.c +++ b/soc/st/stm32/stm32g4/soc.c @@ -12,6 +12,7 @@ #include #include #include +#include #include #if defined(PWR_CR3_UCPD_DBDIS) diff --git a/soc/soc_legacy/arm/st_stm32/stm32g4/soc.h b/soc/st/stm32/stm32g4/soc.h similarity index 100% rename from soc/soc_legacy/arm/st_stm32/stm32g4/soc.h rename to soc/st/stm32/stm32g4/soc.h