Skip to contentSkip to conversation

drivers/crypto: aspeed: Add Caliptra SHA ACC support

PATCH In review Chia-Wei Wang 2 participants 2 messages Aug 30, 2024 – Sep 17, 2024

Subsystems (3)
lore
Share & tools
lore
#0 lore raw

PATCH 1/1 drivers/crypto: aspeed: Add Caliptra SHA ACC support

Aspeed AST27xx SoCs integrate the CPTRA 1.0 secure IP, which export a SHA accelerator interface for SoC to use.

Note that CPTRA 1.0 supports only SHA384 and SHA512 and this patch is verified by the 'hash test sha384/sha512' commands.

---
 drivers/crypto/aspeed/Kconfig     |  10 ++
 drivers/crypto/aspeed/Makefile    |   1 +
 drivers/crypto/aspeed/cptra_sha.c | 258 ++++++++++++++++++++++++++++++
 3 files changed, 269 insertions(+)
 create mode 100644 drivers/crypto/aspeed/cptra_sha.c
drivers/crypto/aspeed/Kconfig +10 -0
index 9bf317177aa..473e3e5a863 100644
@@ -18,3 +18,13 @@ config ASPEED_ACRY
 
 	 Enabling this allows the use of RSA/ECC operations in hardware without requiring the
 	 software implementations. It also improves performance and saves code size.
+
+config ASPEED_CPTRA_SHA
+	bool "Caliptra SHA ACC for Aspeed AST27xx SoCs"
+	depends on DM_HASH
+	help
+	  Select this option to enable a driver for using the SHA accelerator provided
+	  by Caliptra 1.0, which is integrated in AST27xx BMC SoCs.
+
+	  Enabling this allows the use of SHA operations in hardware. Note that only
+	  SHA384 and SHA512 are supported by Caliptra 1.0.
drivers/crypto/aspeed/Makefile +1 -0
index 58b55fc46e4..570587e744f 100644
@@ -1,2 +1,3 @@
 obj-$(CONFIG_ASPEED_HACE) += aspeed_hace.o
 obj-$(CONFIG_ASPEED_ACRY) += aspeed_acry.o
+obj-$(CONFIG_ASPEED_CPTRA_SHA) += cptra_sha.o
drivers/crypto/aspeed/cptra_sha.c new file +258 -0

258 lines not on this page · raw message

Signature · 1 line
2.25.1
#1 lore raw
Quoted 8 lines · Chia-Wei Wang

Aspeed AST27xx SoCs integrate the CPTRA 1.0 secure IP, which export a SHA accelerator interface for SoC to use.

Note that CPTRA 1.0 supports only SHA384 and SHA512 and this patch is verified by the 'hash test sha384/sha512' commands.

[...]

Applied to u-boot/next, thanks!

Signature · 1 line
Tom