xref: /linux/drivers/crypto/caam/Kconfig (revision b95bba5d01141ba919c99ea6fde206727f3b3eb4)
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
168e8ec596SKim Phillips	help
178e8ec596SKim Phillips	  Enables the driver module for Freescale's Cryptographic Accelerator
188e8ec596SKim Phillips	  and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
19313ea293SRuchika Gupta	  This module creates job ring devices, and configures h/w
208e8ec596SKim Phillips	  to operate as a DPAA component automatically, depending
218e8ec596SKim Phillips	  on h/w feature availability.
228e8ec596SKim Phillips
238e8ec596SKim Phillips	  To compile this driver as a module, choose M here: the module
248e8ec596SKim Phillips	  will be called caam.
258e8ec596SKim Phillips
268d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM
278d818c10SHoria Geantă
288d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_DEBUG
298d818c10SHoria Geantă	bool "Enable debug output in CAAM driver"
308d818c10SHoria Geantă	help
318d818c10SHoria Geantă	  Selecting this will enable printing of various debug
328d818c10SHoria Geantă	  information in the CAAM driver.
338d818c10SHoria Geantă
341b46c90cSHoria Geantămenuconfig CRYPTO_DEV_FSL_CAAM_JR
35313ea293SRuchika Gupta	tristate "Freescale CAAM Job Ring driver backend"
36313ea293SRuchika Gupta	default y
37313ea293SRuchika Gupta	help
38313ea293SRuchika Gupta	  Enables the driver module for Job Rings which are part of
39313ea293SRuchika Gupta	  Freescale's Cryptographic Accelerator
40313ea293SRuchika Gupta	  and Assurance Module (CAAM). This module adds a job ring operation
41313ea293SRuchika Gupta	  interface.
42313ea293SRuchika Gupta
43313ea293SRuchika Gupta	  To compile this driver as a module, choose M here: the module
44313ea293SRuchika Gupta	  will be called caam_jr.
45313ea293SRuchika Gupta
468d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM_JR
478d818c10SHoria Geantă
488e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_RINGSIZE
498e8ec596SKim Phillips	int "Job Ring size"
508e8ec596SKim Phillips	range 2 9
518e8ec596SKim Phillips	default "9"
528e8ec596SKim Phillips	help
538e8ec596SKim Phillips	  Select size of Job Rings as a power of 2, within the
548e8ec596SKim Phillips	  range 2-9 (ring size 4-512).
558e8ec596SKim Phillips	  Examples:
568e8ec596SKim Phillips		2 => 4
578e8ec596SKim Phillips		3 => 8
588e8ec596SKim Phillips		4 => 16
598e8ec596SKim Phillips		5 => 32
608e8ec596SKim Phillips		6 => 64
618e8ec596SKim Phillips		7 => 128
628e8ec596SKim Phillips		8 => 256
638e8ec596SKim Phillips		9 => 512
648e8ec596SKim Phillips
658e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC
668e8ec596SKim Phillips	bool "Job Ring interrupt coalescing"
678e8ec596SKim Phillips	help
688e8ec596SKim Phillips	  Enable the Job Ring's interrupt coalescing feature.
698e8ec596SKim Phillips
701a076689SKim Phillips	  Note: the driver already provides adequate
711a076689SKim Phillips	  interrupt coalescing in software.
721a076689SKim Phillips
738e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
748e8ec596SKim Phillips	int "Job Ring interrupt coalescing count threshold"
758e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
768e8ec596SKim Phillips	range 1 255
778e8ec596SKim Phillips	default 255
788e8ec596SKim Phillips	help
798e8ec596SKim Phillips	  Select number of descriptor completions to queue before
808e8ec596SKim Phillips	  raising an interrupt, in the range 1-255. Note that a selection
818e8ec596SKim Phillips	  of 1 functionally defeats the coalescing feature, and a selection
828e8ec596SKim Phillips	  equal or greater than the job ring size will force timeouts.
838e8ec596SKim Phillips
848e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
858e8ec596SKim Phillips	int "Job Ring interrupt coalescing timer threshold"
868e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
878e8ec596SKim Phillips	range 1 65535
888e8ec596SKim Phillips	default 2048
898e8ec596SKim Phillips	help
908e8ec596SKim Phillips	  Select number of bus clocks/64 to timeout in the case that one or
918e8ec596SKim Phillips	  more descriptor completions are queued without reaching the count
928e8ec596SKim Phillips	  threshold. Range is 1-65535.
938e8ec596SKim Phillips
948e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API
951b46c90cSHoria Geantă	bool "Register algorithm implementations with the Crypto API"
968e8ec596SKim Phillips	default y
971b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
98596103cfSHerbert Xu	select CRYPTO_AEAD
998e8ec596SKim Phillips	select CRYPTO_AUTHENC
100*b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
10104007b0eSArd Biesheuvel	select CRYPTO_LIB_DES
1028e8ec596SKim Phillips	help
1038e8ec596SKim Phillips	  Selecting this will offload crypto for users of the
1048e8ec596SKim Phillips	  scatterlist crypto API (such as the linux native IPSec
1058e8ec596SKim Phillips	  stack) to the SEC4 via job ring.
1068e8ec596SKim Phillips
107b189817cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
1081b46c90cSHoria Geantă	bool "Queue Interface as Crypto API backend"
1098d818c10SHoria Geantă	depends on FSL_DPAA && NET
110b189817cSHoria Geantă	default y
1111b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
112b189817cSHoria Geantă	select CRYPTO_AUTHENC
113*b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
114836d8f43SIuliana Prodan	select CRYPTO_DES
115b189817cSHoria Geantă	help
116b189817cSHoria Geantă	  Selecting this will use CAAM Queue Interface (QI) for sending
117b189817cSHoria Geantă	  & receiving crypto jobs to/from CAAM. This gives better performance
118b189817cSHoria Geantă	  than job ring interface when the number of cores are more than the
119b189817cSHoria Geantă	  number of job rings assigned to the kernel. The number of portals
120b189817cSHoria Geantă	  assigned to the kernel should also be more than the number of
121b189817cSHoria Geantă	  job rings.
122b189817cSHoria Geantă
123045e3678SYuan Kangconfig CRYPTO_DEV_FSL_CAAM_AHASH_API
1241b46c90cSHoria Geantă	bool "Register hash algorithm implementations with Crypto API"
125045e3678SYuan Kang	default y
1261b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
127ae8488a5SPaul Bolle	select CRYPTO_HASH
128045e3678SYuan Kang	help
129045e3678SYuan Kang	  Selecting this will offload ahash for users of the
130045e3678SYuan Kang	  scatterlist crypto API to the SEC4 via job ring.
131045e3678SYuan Kang
1328c419778STudor Ambarusconfig CRYPTO_DEV_FSL_CAAM_PKC_API
1331b46c90cSHoria Geantă        bool "Register public key cryptography implementations with Crypto API"
1348c419778STudor Ambarus        default y
1358c419778STudor Ambarus        select CRYPTO_RSA
1368c419778STudor Ambarus        help
1378c419778STudor Ambarus          Selecting this will allow SEC Public key support for RSA.
1388c419778STudor Ambarus          Supported cryptographic primitives: encryption, decryption,
1398c419778STudor Ambarus          signature and verification.
1408c419778STudor Ambarus
141e24f7c9eSYuan Kangconfig CRYPTO_DEV_FSL_CAAM_RNG_API
1421b46c90cSHoria Geantă	bool "Register caam device for hwrng API"
143e24f7c9eSYuan Kang	default y
144e24f7c9eSYuan Kang	select CRYPTO_RNG
145e24f7c9eSYuan Kang	select HW_RANDOM
146e24f7c9eSYuan Kang	help
147e24f7c9eSYuan Kang	  Selecting this will register the SEC4 hardware rng to
148e24f7c9eSYuan Kang	  the hw_random API for suppying the kernel entropy pool.
149e24f7c9eSYuan Kang
1508d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM_JR
1518d818c10SHoria Geantă
1528d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM
1538d818c10SHoria Geantă
1548d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_DPAA2_CAAM
1558d818c10SHoria Geantă	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
1568d818c10SHoria Geantă	depends on FSL_MC_DPIO
15796808c59SArnd Bergmann	depends on NETDEVICES
1588d818c10SHoria Geantă	select CRYPTO_DEV_FSL_CAAM_COMMON
1591b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1601b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
161*b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
1628d818c10SHoria Geantă	select CRYPTO_AUTHENC
1638d818c10SHoria Geantă	select CRYPTO_AEAD
1643f16f6c9SHoria Geantă	select CRYPTO_HASH
165836d8f43SIuliana Prodan	select CRYPTO_DES
166d4d8edf8SAlex Porosanu	help
1678d818c10SHoria Geantă	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
1688d818c10SHoria Geantă	  It handles DPSECI DPAA2 objects that sit on the Management Complex
1698d818c10SHoria Geantă	  (MC) fsl-mc bus.
1708d818c10SHoria Geantă
1718d818c10SHoria Geantă	  To compile this as a module, choose M here: the module
1728d818c10SHoria Geantă	  will be called dpaa2_caam.
173