Skip to content

Commit 7257ccb

Browse files
authored
Merge pull request #8 from os-fpga/virgo_pufs_support
Virgo pufs support
2 parents d677273 + 339cc6d commit 7257ccb

File tree

23 files changed

+4862
-250
lines changed

23 files changed

+4862
-250
lines changed

boards/rapidsilicon/virgo_proto/virgo_proto.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
/dts-v1/;
88

99
#include <rapidsilicon/rapidsi_virgo.dtsi>
10+
1011
/
1112
{
1213
model = "Rapid Silicon Virgo Proto";
@@ -50,6 +51,14 @@
5051
status = "okay";
5152
};
5253

54+
&pufs_otp {
55+
status = "okay";
56+
};
57+
58+
&pufs {
59+
status = "okay";
60+
};
61+
5362
&spi0 {
5463
status = "okay";
5564
clock-frequency = <26666667>;

boards/rapidsilicon/virgo_proto/virgo_proto_defconfig

Lines changed: 29 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,4 +34,32 @@ CONFIG_HWINFO_ANDES=n
3434
# CONFIG_SOC_ANDES_V5_EXECIT=y
3535

3636
# Sys Clock HW Cycles for Virgo Proto used by mtimer
37-
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=13333333
37+
CONFIG_SYS_CLOCK_HW_CYCLES_PER_SEC=13333333
38+
39+
# Enabling the SPI Peripheral
40+
CONFIG_SPI=y
41+
CONFIG_SPI_NOR=y
42+
43+
# Enabling the Crypto Peripheral
44+
CONFIG_CRYPTO=y
45+
CONFIG_PUFCC_SECURITY=y
46+
CONFIG_CRYPTO_PUF_SECURITY=y
47+
CONFIG_CRYPTO_PUF_SECURITY_OTP=y
48+
49+
# Enabling the DMA Peripheral
50+
CONFIG_DMA=y
51+
CONFIG_DMA_ANDES_ATCDMAC100=y
52+
53+
# Enabling the SPI and Flash Peripheral
54+
CONFIG_FLASH=y
55+
CONFIG_SPI_NOR_SFDP_DEVICETREE=y
56+
CONFIG_SPI_ANDES_ATCSPI200=y
57+
CONFIG_ANDES_SPI_DMA_MODE=n
58+
59+
# Enabling the Counter Peripheral
60+
CONFIG_COUNTER=y
61+
CONFIG_COUNTER_ANDES_ATCPIT100=y
62+
63+
# Enabling the Sensor Peripheral
64+
CONFIG_SENSOR=y
65+
CONFIG_DTI_PVT=y

drivers/crypto/CMakeLists.txt

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,4 +12,7 @@ zephyr_library_sources_ifdef(CONFIG_CRYPTO_NPCX_SHA crypto_npcx_sha.c)
1212
zephyr_library_sources_ifdef(CONFIG_CRYPTO_MCHP_XEC_SYMCR crypto_mchp_xec_symcr.c)
1313
zephyr_library_sources_ifdef(CONFIG_CRYPTO_IT8XXX2_SHA crypto_it8xxx2_sha.c)
1414
zephyr_library_sources_ifdef(CONFIG_CRYPTO_MCUX_DCP crypto_mcux_dcp.c)
15+
zephyr_library_sources_ifdef(CONFIG_PUFCC_SECURITY pufcc.c)
16+
zephyr_library_sources_ifdef(CONFIG_CRYPTO_PUF_SECURITY crypto_pufs.c)
17+
zephyr_library_sources_ifdef(CONFIG_CRYPTO_PUF_SECURITY_OTP crypto_pufs_otp.c)
1518
zephyr_library_link_libraries_ifdef(CONFIG_MBEDTLS mbedTLS)

drivers/crypto/Kconfig

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -77,6 +77,7 @@ source "drivers/crypto/Kconfig.stm32"
7777
source "drivers/crypto/Kconfig.nrf_ecb"
7878
source "drivers/crypto/Kconfig.intel"
7979
source "drivers/crypto/Kconfig.npcx"
80+
source "drivers/crypto/Kconfig.pufs"
8081
source "drivers/crypto/Kconfig.xec"
8182
source "drivers/crypto/Kconfig.it8xxx2"
8283
source "drivers/crypto/Kconfig.mcux_dcp"

drivers/crypto/Kconfig.pufs

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
# PUF Security Cryptographic Accelerator configuration options
2+
3+
# Copyright (c) 2024 Muhammad Junaid Aslam <[email protected]>
4+
# SPDX-License-Identifier: Apache-2.0
5+
6+
menuconfig PUFCC_SECURITY
7+
bool "PUF Security Hardware"
8+
depends on DT_HAS_PUFSECURITY_PUFCC_ENABLED
9+
help
10+
Enable PUF Security Hardware.
11+
12+
if PUFCC_SECURITY
13+
14+
config RS_RTOS_PORT
15+
bool
16+
17+
config CRYPTO_PUF_SECURITY
18+
bool "PUF security Cryptographic Accelerator driver"
19+
default n
20+
depends on DT_HAS_PUFSECURITY_PUFCC_ENABLED
21+
select RS_RTOS_PORT
22+
help
23+
Enable PUF Security based Cryptographic Accelerator driver.
24+
25+
config CRYPTO_PUF_SECURITY_OTP
26+
bool "PUF security One Time Programmable Memory"
27+
default n
28+
depends on DT_HAS_PUFSECURITY_OTP_ENABLED
29+
select RS_RTOS_PORT
30+
help
31+
Enable PUF Security based One Time Programmable Memory.
32+
33+
endif
34+

0 commit comments

Comments
 (0)