soc: ae350: Port to HWMv2

Ports the ae350 SoC configuration to hardware model version 2

Signed-off-by: Jamie McCrae <jamie.mccrae@nordicsemi.no>
This commit is contained in:
Jamie McCrae
2024-02-15 08:58:40 +00:00
committed by Carles Cufi
parent 282204758a
commit ef82a8255c
33 changed files with 55 additions and 39 deletions

View File

@@ -9,6 +9,8 @@ if(_SOC_IS_IN_TREE)
endif()
unset(_SOC_IS_IN_TREE)
add_subdirectory(common)
if(HWMv1)
if(EXISTS ${SOC_DIR}/${ARCH}/CMakeLists.txt)
add_subdirectory(${SOC_DIR}/${ARCH} soc/${ARCH})

View File

@@ -15,6 +15,9 @@ osource "soc/soc_legacy/$(ARCH)/Kconfig"
# Source Zephyr Kconfig specifics from SoC roots.
osource "$(KCONFIG_BINARY_DIR)/soc/Kconfig"
# Source common Kconfig file
osource "soc/common/Kconfig"
module = SOC
module-str = SOC
source "subsys/logging/Kconfig.template.log_config"

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.series"
rsource "*/Kconfig"

View File

@@ -1,15 +1,8 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config SOC_FAMILY_ANDES_V5
bool
if SOC_FAMILY_ANDES_V5
config SOC_FAMILY
string
default "andes_v5"
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.soc"
rsource "*/Kconfig.defconfig"
endif # SOC_FAMILY_ANDES_V5

10
soc/andes/Kconfig.soc Normal file
View File

@@ -0,0 +1,10 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
config SOC_FAMILY_ANDES_V5
bool
config SOC_FAMILY
default "andes_v5" if SOC_FAMILY_ANDES_V5
rsource "*/Kconfig.soc"

View File

@@ -1,12 +1,12 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0
choice
prompt "Andes V5 SoC Selection"
depends on SOC_SERIES_ANDES_AE350
config SOC_SERIES_ANDES_AE350
select RISCV
select RISCV_PRIVILEGED
select RISCV_HAS_PLIC
config SOC_ANDES_AE350
bool "Andes AE350 SoC implementation"
select ATOMIC_OPERATIONS_BUILTIN
select INCLUDE_RESET_VECTOR
select RISCV_ISA_EXT_M
@@ -16,8 +16,6 @@ config SOC_ANDES_AE350
select CPU_HAS_ICACHE
select RISCV_PMP
endchoice
if SOC_SERIES_ANDES_AE350
choice

View File

@@ -6,10 +6,7 @@ if SOC_SERIES_ANDES_AE350
# Kconfig picks the first default with a satisfied condition.
# SoC defaults should be parsed before SoC Series defaults, because SoCs usually
# overrides SoC Series values.
source "soc/soc_legacy/riscv/andes_v5/ae350/Kconfig.defconfig.ae*"
config SOC_SERIES
default "ae350"
rsource "Kconfig.defconfig.ae*"
config SYS_CLOCK_HW_CYCLES_PER_SEC
default 60000000

View File

@@ -3,9 +3,6 @@
if SOC_ANDES_AE350
config SOC
default "ae350"
config SYS_CLOCK_TICKS_PER_SEC
default 100 if (!ICACHE || XIP)

View File

@@ -0,0 +1,20 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_ANDES_AE350
bool
select SOC_FAMILY_ANDES_V5
help
Andes V5 AE350 SoC Series Implementation"
config SOC_ANDES_AE350
bool
select SOC_SERIES_ANDES_AE350
help
Andes AE350 SoC implementation"
config SOC_SERIES
default "ae350" if SOC_SERIES_ANDES_AE350
config SOC
default "ae350" if SOC_ANDES_AE350

6
soc/andes/soc.yml Normal file
View File

@@ -0,0 +1,6 @@
family:
- name: andes_v5
series:
- name: ae350
socs:
- name: ae350

View File

@@ -1,4 +1,4 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
source "soc/soc_legacy/riscv/andes_v5/*/Kconfig.defconfig.series"
add_subdirectory_ifdef(CONFIG_RISCV_PRIVILEGED riscv-privileged)

View File

@@ -1,4 +1,8 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# SPDX-License-Identifier: Apache-2.0
#
source "soc/soc_legacy/riscv/common/riscv-privileged/Kconfig"
if RISCV_PRIVILEGED
rsource "riscv-privileged/Kconfig"
endif # RISCV_PRIVILEGED

View File

@@ -1,7 +1,5 @@
# SPDX-License-Identifier: Apache-2.0
add_subdirectory(common)
if(SOC_FAMILY)
add_subdirectory(${SOC_FAMILY})
else()

View File

@@ -1,11 +0,0 @@
# Copyright (c) 2021 Andes Technology Corporation
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_ANDES_AE350
bool "Andes V5 AE350 SoC Series Implementation"
select RISCV
select RISCV_PRIVILEGED
select RISCV_HAS_PLIC
select SOC_FAMILY_ANDES_V5
help
Enable support for Andes V5 AE350 SoC Series

View File

@@ -1 +0,0 @@
add_subdirectory_ifdef(CONFIG_RISCV_PRIVILEGED riscv-privileged)