Browse Source

soc/sifive/sifive_freedom: add SiFive Freedom E310 SoC

This commit adds support for the SiFive Freedom E310 SoC for the Zephyr
Hardware Model v2.

Signed-off-by: Filip Kokosinski <fkokosinski@antmicro.com>
pull/69687/head
Filip Kokosinski 1 year ago committed by Carles Cufi
parent
commit
b9e06f4c38
  1. 0
      soc/sifive/sifive_freedom/CMakeLists.txt
  2. 9
      soc/sifive/sifive_freedom/Kconfig
  3. 9
      soc/sifive/sifive_freedom/Kconfig.defconfig
  4. 11
      soc/sifive/sifive_freedom/Kconfig.soc
  5. 0
      soc/sifive/sifive_freedom/common/CMakeLists.txt
  6. 0
      soc/sifive/sifive_freedom/common/pinctrl_soc.h
  7. 1
      soc/sifive/sifive_freedom/fe300/CMakeLists.txt
  8. 19
      soc/sifive/sifive_freedom/fe300/Kconfig
  9. 10
      soc/sifive/sifive_freedom/fe300/Kconfig.defconfig
  10. 16
      soc/sifive/sifive_freedom/fe300/Kconfig.soc
  11. 0
      soc/sifive/sifive_freedom/fe300/clock.c
  12. 0
      soc/sifive/sifive_freedom/fe300/prci.h
  13. 0
      soc/sifive/sifive_freedom/fe300/soc.h
  14. 6
      soc/sifive/sifive_freedom/soc.yml
  15. 5
      soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.defconfig.e340
  16. 13
      soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.series

0
soc/soc_legacy/riscv/sifive_freedom/CMakeLists.txt → soc/sifive/sifive_freedom/CMakeLists.txt

9
soc/sifive/sifive_freedom/Kconfig

@ -0,0 +1,9 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_SIFIVE_FREEDOM
rsource "*/Kconfig"
endif # SOC_FAMILY_SIFIVE_FREEDOM

9
soc/sifive/sifive_freedom/Kconfig.defconfig

@ -0,0 +1,9 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
if SOC_FAMILY_SIFIVE_FREEDOM
rsource "*/Kconfig.defconfig"
endif # SOC_FAMILY_SIFIVE_FREEDOM

11
soc/sifive/sifive_freedom/Kconfig.soc

@ -0,0 +1,11 @@
# Copyright (c) 2024 Nordic Semiconductor ASA
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_FAMILY_SIFIVE_FREEDOM
bool
config SOC_FAMILY
default "sifive_freedom" if SOC_FAMILY_SIFIVE_FREEDOM
rsource "*/Kconfig.soc"

0
soc/soc_legacy/riscv/sifive_freedom/common/CMakeLists.txt → soc/sifive/sifive_freedom/common/CMakeLists.txt

0
soc/soc_legacy/riscv/sifive_freedom/common/pinctrl_soc.h → soc/sifive/sifive_freedom/common/pinctrl_soc.h

1
soc/soc_legacy/riscv/sifive_freedom/e300/CMakeLists.txt → soc/sifive/sifive_freedom/fe300/CMakeLists.txt

@ -1,5 +1,6 @@
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
zephyr_sources(clock.c) zephyr_sources(clock.c)
zephyr_include_directories(.)
set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/riscv/common/linker.ld CACHE INTERNAL "") set(SOC_LINKER_SCRIPT ${ZEPHYR_BASE}/include/zephyr/arch/riscv/common/linker.ld CACHE INTERNAL "")

19
soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.soc → soc/sifive/sifive_freedom/fe300/Kconfig

@ -1,20 +1,19 @@
# RISCV_SIFIVE_FREEDOM SOC configuration options
# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com> # Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
choice config SOC_SERIES_SIFIVE_FREEDOM_FE300
prompt "SiFive Freedom SOC implementation" bool
depends on SOC_SERIES_SIFIVE_FREEDOM_E300
config SOC_SIFIVE_FREEDOM_E340 # RISC-V options
bool "SiFive Freedom SOC implementation" select RISCV
select ATOMIC_OPERATIONS_C select RISCV_PRIVILEGED
select INCLUDE_RESET_VECTOR select RISCV_HAS_PLIC
select RISCV_ISA_RV32I select RISCV_ISA_RV32I
select RISCV_ISA_EXT_M select RISCV_ISA_EXT_M
select RISCV_ISA_EXT_A select RISCV_ISA_EXT_A
select RISCV_ISA_EXT_ZICSR select RISCV_ISA_EXT_ZICSR
select RISCV_ISA_EXT_ZIFENCEI select RISCV_ISA_EXT_ZIFENCEI
endchoice select ATOMIC_OPERATIONS_C
select INCLUDE_RESET_VECTOR

10
soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.defconfig.series → soc/sifive/sifive_freedom/fe300/Kconfig.defconfig

@ -1,10 +1,8 @@
# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com> # Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0 # SPDX-License-Identifier: Apache-2.0
if SOC_SERIES_SIFIVE_FREEDOM_E300 if SOC_SERIES_SIFIVE_FREEDOM_FE300
config SOC_SERIES
default "e300"
config SYS_CLOCK_HW_CYCLES_PER_SEC config SYS_CLOCK_HW_CYCLES_PER_SEC
default 32768 default 32768
@ -27,6 +25,4 @@ config MAX_IRQ_PER_AGGREGATOR
config NUM_IRQS config NUM_IRQS
default 64 default 64
source "soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.defconfig.e*" endif # SOC_SERIES_SIFIVE_FREEDOM_FE300
endif # SOC_SERIES_SIFIVE_FREEDOM_E300

16
soc/sifive/sifive_freedom/fe300/Kconfig.soc

@ -0,0 +1,16 @@
# Copyright (c) 2024 Antmicro <www.antmicro.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_SIFIVE_FREEDOM_FE300
bool
select SOC_FAMILY_SIFIVE_FREEDOM
config SOC_SERIES
default "fe300" if SOC_SERIES_SIFIVE_FREEDOM_FE300
config SOC_SIFIVE_FREEDOM_FE310
bool
select SOC_SERIES_SIFIVE_FREEDOM_FE300
config SOC
default "fe310" if SOC_SIFIVE_FREEDOM_FE310

0
soc/soc_legacy/riscv/sifive_freedom/e300/clock.c → soc/sifive/sifive_freedom/fe300/clock.c

0
soc/soc_legacy/riscv/sifive_freedom/e300/prci.h → soc/sifive/sifive_freedom/fe300/prci.h

0
soc/soc_legacy/riscv/sifive_freedom/e300/soc.h → soc/sifive/sifive_freedom/fe300/soc.h

6
soc/sifive/sifive_freedom/soc.yml

@ -0,0 +1,6 @@
family:
- name: sifive_freedom
series:
- name: fe300
socs:
- name: fe310

5
soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.defconfig.e340

@ -1,5 +0,0 @@
# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config SOC
default "e340" if SOC_SIFIVE_FREEDOM_E340

13
soc/soc_legacy/riscv/sifive_freedom/e300/Kconfig.series

@ -1,13 +0,0 @@
# RISCV_SIFIVE_FREEDOM SOC implementation
# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
# SPDX-License-Identifier: Apache-2.0
config SOC_SERIES_SIFIVE_FREEDOM_E300
bool "SiFive Freedom E300 SOC implementation"
select RISCV
select RISCV_PRIVILEGED
select RISCV_HAS_PLIC
select SOC_FAMILY_SIFIVE_FREEDOM
help
Enable support for SiFive Freedom FE300 SOC
Loading…
Cancel
Save