soc: riscv: Add initial support for Efinix Sapphire SoC
- It's a riscv privilege spec SoC Signed-off-by: Manojkumar Subramaniam <manoj@electrolance.com>
This commit is contained in:
parent
80fda53492
commit
6e887e3f61
6 changed files with 82 additions and 0 deletions
|
@ -0,0 +1,4 @@
|
|||
# Copyright (c) 2023 Efinix Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
zephyr_include_directories(.)
|
|
@ -0,0 +1,30 @@
|
|||
# Copyright (c) 2023 Efinix Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
if SOC_SERIES_EFINIX_SAPPHIRE
|
||||
|
||||
config SOC_SERIES
|
||||
default "efinix-sapphire"
|
||||
|
||||
config SYS_CLOCK_HW_CYCLES_PER_SEC
|
||||
default 100000000
|
||||
|
||||
config RISCV_HAS_CPU_IDLE
|
||||
bool
|
||||
|
||||
config RISCV_SOC_INTERRUPT_INIT
|
||||
bool
|
||||
default y
|
||||
|
||||
config RISCV_HAS_PLIC
|
||||
bool
|
||||
default y
|
||||
|
||||
config NUM_IRQS
|
||||
int
|
||||
default 36
|
||||
|
||||
config 2ND_LVL_INTR_00_OFFSET
|
||||
default 11
|
||||
|
||||
endif # SOC_SERIES_EFINIX_SAPPHIRE
|
|
@ -0,0 +1,9 @@
|
|||
# Copyright (c) 2023 Efinix Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
config SOC_SERIES_EFINIX_SAPPHIRE
|
||||
bool "Efinix Sapphire SOC implementation"
|
||||
select RISCV
|
||||
select SOC_FAMILY_RISCV_PRIVILEGED
|
||||
help
|
||||
Enable support for Efinix Sapphire SOC implementation
|
18
soc/riscv/riscv-privileged/efinix-sapphire/Kconfig.soc
Normal file
18
soc/riscv/riscv-privileged/efinix-sapphire/Kconfig.soc
Normal file
|
@ -0,0 +1,18 @@
|
|||
# Copyright (c) 2023 Efinix Inc.
|
||||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
choice
|
||||
prompt "Efinix SoC selection"
|
||||
depends on SOC_SERIES_EFINIX_SAPPHIRE
|
||||
|
||||
config SOC_RISCV32_EFINIX_SAPPHIRE
|
||||
bool "Efinix Sapphire VexRiscv system implementation"
|
||||
select ATOMIC_OPERATIONS_BUILTIN
|
||||
select INCLUDE_RESET_VECTOR
|
||||
select RISCV_ISA_RV32I
|
||||
select RISCV_ISA_EXT_M
|
||||
select RISCV_ISA_EXT_A
|
||||
select RISCV_ISA_EXT_ZICSR
|
||||
select RISCV_ISA_EXT_ZIFENCEI
|
||||
|
||||
endchoice
|
3
soc/riscv/riscv-privileged/efinix-sapphire/linker.ld
Normal file
3
soc/riscv/riscv-privileged/efinix-sapphire/linker.ld
Normal file
|
@ -0,0 +1,3 @@
|
|||
# SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
#include <zephyr/arch/riscv/common/linker.ld>
|
18
soc/riscv/riscv-privileged/efinix-sapphire/soc.h
Normal file
18
soc/riscv/riscv-privileged/efinix-sapphire/soc.h
Normal file
|
@ -0,0 +1,18 @@
|
|||
/*
|
||||
* Copyright (c) 2023 Efinix Inc.
|
||||
*
|
||||
* SPDX-License-Identifier: Apache-2.0
|
||||
*/
|
||||
|
||||
#ifndef __RISCV32_EFINIX_SAPPHIRE_SOC_H_
|
||||
#define __RISCV32_EFINIX_SAPPHIRE_SOC_H_
|
||||
|
||||
#include "soc_common.h"
|
||||
#include <zephyr/arch/common/sys_io.h>
|
||||
#include <zephyr/devicetree.h>
|
||||
|
||||
#ifndef _ASMLANGUAGE
|
||||
|
||||
#endif /* _ASMLANGUAGE */
|
||||
|
||||
#endif /* __RISCV32_EFINIX_SAPPHIRE_SOC_H_ */
|
Loading…
Add table
Add a link
Reference in a new issue