Commit fcbb9476 authored by Gerard Marull-Paretas's avatar Gerard Marull-Paretas Committed by Carles Cufi
Browse files

soc: arm: gigadevice: use specific series for GD32F403



Despite the "F4" prefix, GD32F403 is an SoC with significant differences
compared to other F4 MCUs:

- It has a completely different HAL
- It has significant hardware differences, for example, the pinctrl
  mechanism uses AFIO (all others use AF)

The grouping principles applied to other similar vendors such as ST
can't be applied for GD32 due to these reasons, so the approach taken
here is to define series based on the used HAL. A different HAL likely
means that there are significant hardware differences between, e.g. F403
and F405. The vendor likely chose a confusing naming scheme, but we need
to deal with it.

Signed-off-by: default avatarGerard Marull-Paretas <gerard@teslabs.com>
parent 8fbbf2ba
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
# Copyright (c) 2021, ATL Electronics
# SPDX-License-Identifier: Apache-2.0

CONFIG_SOC_SERIES_GD32F4=y
CONFIG_SOC_SERIES_GD32F403=y
CONFIG_SOC_GD32F403Z=y
CONFIG_BOARD_GD32F403Z_EVAL=y

+0 −4
Original line number Diff line number Diff line
@@ -8,10 +8,6 @@ config SOC
	default	"gd32f403v" if SOC_GD32F403V
	default	"gd32f403z" if SOC_GD32F403Z

config SOC_SERIES_GD32F403
	bool
	default y

config SYS_CLOCK_HW_CYCLES_PER_SEC
	default 168000000

+11 −0
Original line number Diff line number Diff line
# Copyright (c) 2021, ATL Electronics
# SPDX-License-Identifier: Apache-2.0

if SOC_SERIES_GD32F4
if SOC_SERIES_GD32F403

source "soc/arm/gigadevice/gd32f4/Kconfig.defconfig.gd32f4*"
source "soc/arm/gigadevice/gd32f403/Kconfig.defconfig.gd32f403"

config SOC_SERIES
	default "gd32f4"
	default "gd32f403"

endif   # SOC_SERIES_GD32F4
endif   # SOC_SERIES_GD32F403
+3 −3
Original line number Diff line number Diff line
# Copyright (c) 2021, ATL Electronics
# SPDX-License-Identifier: Apache-2.0

config SOC_SERIES_GD32F4
	bool "GigaDevice GD32F4xxx series Cortex-M4F MCU"
config SOC_SERIES_GD32F403
	bool "GigaDevice GD32F403 series Cortex-M4F MCU"
	select ARM
	select CPU_HAS_ARM_MPU
	select CPU_HAS_FPU
@@ -11,4 +11,4 @@ config SOC_SERIES_GD32F4
	select CPU_CORTEX_M_HAS_VTOR
	select SOC_FAMILY_GD32_ARM
	help
	  Enable support for GigaDevice GD32F4xxx MCU series
	  Enable support for GigaDevice GD32F403 MCU series
Loading