Skip to content

Commit 785e5c6

Browse files
ryderlee1110herbertx
authored andcommitted
crypto: mediatek - Add crypto driver support for some MediaTek chips
This adds support for the MediaTek hardware accelerator on mt7623/mt2701/mt8521p SoC. This driver currently implement: - SHA1 and SHA2 family(HMAC) hash algorithms. - AES block cipher in CBC/ECB mode with 128/196/256 bits keys. Signed-off-by: Ryder Lee <ryder.lee@mediatek.com> Signed-off-by: Herbert Xu <herbert@gondor.apana.org.au>
1 parent 6207119 commit 785e5c6

8 files changed

Lines changed: 3258 additions & 0 deletions

File tree

‎drivers/crypto/Kconfig‎

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -553,6 +553,23 @@ config CRYPTO_DEV_ROCKCHIP
553553
This driver interfaces with the hardware crypto accelerator.
554554
Supporting cbc/ecb chainmode, and aes/des/des3_ede cipher mode.
555555

556+
config CRYPTO_DEV_MEDIATEK
557+
tristate "MediaTek's EIP97 Cryptographic Engine driver"
558+
depends on ARM && (ARCH_MEDIATEK || COMPILE_TEST)
559+
select NEON
560+
select KERNEL_MODE_NEON
561+
select ARM_CRYPTO
562+
select CRYPTO_AES
563+
select CRYPTO_BLKCIPHER
564+
select CRYPTO_SHA1_ARM_NEON
565+
select CRYPTO_SHA256_ARM
566+
select CRYPTO_SHA512_ARM
567+
select CRYPTO_HMAC
568+
help
569+
This driver allows you to utilize the hardware crypto accelerator
570+
EIP97 which can be found on the MT7623 MT2701, MT8521p, etc ....
571+
Select this if you want to use it for AES/SHA1/SHA2 algorithms.
572+
556573
source "drivers/crypto/chelsio/Kconfig"
557574

558575
source "drivers/crypto/virtio/Kconfig"

‎drivers/crypto/Makefile‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,7 @@ obj-$(CONFIG_CRYPTO_DEV_IMGTEC_HASH) += img-hash.o
1111
obj-$(CONFIG_CRYPTO_DEV_IXP4XX) += ixp4xx_crypto.o
1212
obj-$(CONFIG_CRYPTO_DEV_MV_CESA) += mv_cesa.o
1313
obj-$(CONFIG_CRYPTO_DEV_MARVELL_CESA) += marvell/
14+
obj-$(CONFIG_CRYPTO_DEV_MEDIATEK) += mediatek/
1415
obj-$(CONFIG_CRYPTO_DEV_MXS_DCP) += mxs-dcp.o
1516
obj-$(CONFIG_CRYPTO_DEV_MXC_SCC) += mxc-scc.o
1617
obj-$(CONFIG_CRYPTO_DEV_NIAGARA2) += n2_crypto.o

‎drivers/crypto/mediatek/Makefile‎

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
obj-$(CONFIG_CRYPTO_DEV_MEDIATEK) += mtk-crypto.o
2+
mtk-crypto-objs:= mtk-platform.o mtk-aes.o mtk-sha.o

0 commit comments

Comments
 (0)