xref: /linux/drivers/crypto/caam/Kconfig (revision 9d9b14dbe077c8704d8c3546e38820d35aff2d35)
1618b5dc4SHoria Geantă# SPDX-License-Identifier: GPL-2.0
28d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_COMMON
38d818c10SHoria Geantă	tristate
48d818c10SHoria Geantă
51b46c90cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
61b46c90cSHoria Geantă	tristate
71b46c90cSHoria Geantă
81b46c90cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
91b46c90cSHoria Geantă	tristate
101b46c90cSHoria Geantă
118e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM
128d818c10SHoria Geantă	tristate "Freescale CAAM-Multicore platform driver backend"
139e217795SHoria Geantă	depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
14c056d910SHoria Geantă	select SOC_BUS
158d818c10SHoria Geantă	select CRYPTO_DEV_FSL_CAAM_COMMON
16358ba762SAndrey Smirnov	imply FSL_MC_BUS
178e8ec596SKim Phillips	help
188e8ec596SKim Phillips	  Enables the driver module for Freescale's Cryptographic Accelerator
198e8ec596SKim Phillips	  and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
20313ea293SRuchika Gupta	  This module creates job ring devices, and configures h/w
218e8ec596SKim Phillips	  to operate as a DPAA component automatically, depending
228e8ec596SKim Phillips	  on h/w feature availability.
238e8ec596SKim Phillips
248e8ec596SKim Phillips	  To compile this driver as a module, choose M here: the module
258e8ec596SKim Phillips	  will be called caam.
268e8ec596SKim Phillips
278d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM
288d818c10SHoria Geantă
298d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_DEBUG
308d818c10SHoria Geantă	bool "Enable debug output in CAAM driver"
318d818c10SHoria Geantă	help
328d818c10SHoria Geantă	  Selecting this will enable printing of various debug
338d818c10SHoria Geantă	  information in the CAAM driver.
348d818c10SHoria Geantă
351b46c90cSHoria Geantămenuconfig CRYPTO_DEV_FSL_CAAM_JR
36313ea293SRuchika Gupta	tristate "Freescale CAAM Job Ring driver backend"
37ee38767fSIuliana Prodan	select CRYPTO_ENGINE
38313ea293SRuchika Gupta	default y
39313ea293SRuchika Gupta	help
40313ea293SRuchika Gupta	  Enables the driver module for Job Rings which are part of
41313ea293SRuchika Gupta	  Freescale's Cryptographic Accelerator
42313ea293SRuchika Gupta	  and Assurance Module (CAAM). This module adds a job ring operation
43313ea293SRuchika Gupta	  interface.
44313ea293SRuchika Gupta
45313ea293SRuchika Gupta	  To compile this driver as a module, choose M here: the module
46313ea293SRuchika Gupta	  will be called caam_jr.
47313ea293SRuchika Gupta
488d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM_JR
498d818c10SHoria Geantă
508e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_RINGSIZE
518e8ec596SKim Phillips	int "Job Ring size"
528e8ec596SKim Phillips	range 2 9
538e8ec596SKim Phillips	default "9"
548e8ec596SKim Phillips	help
558e8ec596SKim Phillips	  Select size of Job Rings as a power of 2, within the
568e8ec596SKim Phillips	  range 2-9 (ring size 4-512).
578e8ec596SKim Phillips	  Examples:
588e8ec596SKim Phillips		2 => 4
598e8ec596SKim Phillips		3 => 8
608e8ec596SKim Phillips		4 => 16
618e8ec596SKim Phillips		5 => 32
628e8ec596SKim Phillips		6 => 64
638e8ec596SKim Phillips		7 => 128
648e8ec596SKim Phillips		8 => 256
658e8ec596SKim Phillips		9 => 512
668e8ec596SKim Phillips
678e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC
688e8ec596SKim Phillips	bool "Job Ring interrupt coalescing"
698e8ec596SKim Phillips	help
708e8ec596SKim Phillips	  Enable the Job Ring's interrupt coalescing feature.
718e8ec596SKim Phillips
721a076689SKim Phillips	  Note: the driver already provides adequate
731a076689SKim Phillips	  interrupt coalescing in software.
741a076689SKim Phillips
758e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
768e8ec596SKim Phillips	int "Job Ring interrupt coalescing count threshold"
778e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
788e8ec596SKim Phillips	range 1 255
798e8ec596SKim Phillips	default 255
808e8ec596SKim Phillips	help
818e8ec596SKim Phillips	  Select number of descriptor completions to queue before
828e8ec596SKim Phillips	  raising an interrupt, in the range 1-255. Note that a selection
838e8ec596SKim Phillips	  of 1 functionally defeats the coalescing feature, and a selection
848e8ec596SKim Phillips	  equal or greater than the job ring size will force timeouts.
858e8ec596SKim Phillips
868e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
878e8ec596SKim Phillips	int "Job Ring interrupt coalescing timer threshold"
888e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
898e8ec596SKim Phillips	range 1 65535
908e8ec596SKim Phillips	default 2048
918e8ec596SKim Phillips	help
928e8ec596SKim Phillips	  Select number of bus clocks/64 to timeout in the case that one or
938e8ec596SKim Phillips	  more descriptor completions are queued without reaching the count
948e8ec596SKim Phillips	  threshold. Range is 1-65535.
958e8ec596SKim Phillips
968e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API
971b46c90cSHoria Geantă	bool "Register algorithm implementations with the Crypto API"
988e8ec596SKim Phillips	default y
991b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
100596103cfSHerbert Xu	select CRYPTO_AEAD
1018e8ec596SKim Phillips	select CRYPTO_AUTHENC
102b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
10304007b0eSArd Biesheuvel	select CRYPTO_LIB_DES
104*9d9b14dbSAndrei Botila	select CRYPTO_XTS
1058e8ec596SKim Phillips	help
1068e8ec596SKim Phillips	  Selecting this will offload crypto for users of the
1078e8ec596SKim Phillips	  scatterlist crypto API (such as the linux native IPSec
1088e8ec596SKim Phillips	  stack) to the SEC4 via job ring.
1098e8ec596SKim Phillips
110b189817cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
1111b46c90cSHoria Geantă	bool "Queue Interface as Crypto API backend"
1128d818c10SHoria Geantă	depends on FSL_DPAA && NET
113b189817cSHoria Geantă	default y
1141b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
115b189817cSHoria Geantă	select CRYPTO_AUTHENC
116b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
117836d8f43SIuliana Prodan	select CRYPTO_DES
118b189817cSHoria Geantă	help
119b189817cSHoria Geantă	  Selecting this will use CAAM Queue Interface (QI) for sending
120b189817cSHoria Geantă	  & receiving crypto jobs to/from CAAM. This gives better performance
121b189817cSHoria Geantă	  than job ring interface when the number of cores are more than the
122b189817cSHoria Geantă	  number of job rings assigned to the kernel. The number of portals
123b189817cSHoria Geantă	  assigned to the kernel should also be more than the number of
124b189817cSHoria Geantă	  job rings.
125b189817cSHoria Geantă
126045e3678SYuan Kangconfig CRYPTO_DEV_FSL_CAAM_AHASH_API
1271b46c90cSHoria Geantă	bool "Register hash algorithm implementations with Crypto API"
128045e3678SYuan Kang	default y
1291b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
130ae8488a5SPaul Bolle	select CRYPTO_HASH
131045e3678SYuan Kang	help
132045e3678SYuan Kang	  Selecting this will offload ahash for users of the
133045e3678SYuan Kang	  scatterlist crypto API to the SEC4 via job ring.
134045e3678SYuan Kang
1358c419778STudor Ambarusconfig CRYPTO_DEV_FSL_CAAM_PKC_API
1361b46c90cSHoria Geantă	bool "Register public key cryptography implementations with Crypto API"
1378c419778STudor Ambarus	default y
1388c419778STudor Ambarus	select CRYPTO_RSA
1398c419778STudor Ambarus	help
1408c419778STudor Ambarus	  Selecting this will allow SEC Public key support for RSA.
1418c419778STudor Ambarus	  Supported cryptographic primitives: encryption, decryption,
1428c419778STudor Ambarus	  signature and verification.
1438c419778STudor Ambarus
144e24f7c9eSYuan Kangconfig CRYPTO_DEV_FSL_CAAM_RNG_API
1451b46c90cSHoria Geantă	bool "Register caam device for hwrng API"
146e24f7c9eSYuan Kang	default y
147e24f7c9eSYuan Kang	select CRYPTO_RNG
148e24f7c9eSYuan Kang	select HW_RANDOM
149e24f7c9eSYuan Kang	help
150e24f7c9eSYuan Kang	  Selecting this will register the SEC4 hardware rng to
15124c7bf08SHeinrich Schuchardt	  the hw_random API for supplying the kernel entropy pool.
152e24f7c9eSYuan Kang
1538d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM_JR
1548d818c10SHoria Geantă
1558d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM
1568d818c10SHoria Geantă
1578d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_DPAA2_CAAM
1588d818c10SHoria Geantă	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
1598d818c10SHoria Geantă	depends on FSL_MC_DPIO
16096808c59SArnd Bergmann	depends on NETDEVICES
1618d818c10SHoria Geantă	select CRYPTO_DEV_FSL_CAAM_COMMON
1621b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1631b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
164b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
1658d818c10SHoria Geantă	select CRYPTO_AUTHENC
1668d818c10SHoria Geantă	select CRYPTO_AEAD
1673f16f6c9SHoria Geantă	select CRYPTO_HASH
168836d8f43SIuliana Prodan	select CRYPTO_DES
169d4d8edf8SAlex Porosanu	help
1708d818c10SHoria Geantă	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
1718d818c10SHoria Geantă	  It handles DPSECI DPAA2 objects that sit on the Management Complex
1728d818c10SHoria Geantă	  (MC) fsl-mc bus.
1738d818c10SHoria Geantă
1748d818c10SHoria Geantă	  To compile this as a module, choose M here: the module
1758d818c10SHoria Geantă	  will be called dpaa2_caam.
176