xref: /linux/drivers/crypto/caam/Kconfig (revision ee38767f152a3310aabee7074848911f43bf5d69)
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"
36*ee38767fSIuliana Prodan	select CRYPTO_ENGINE
37313ea293SRuchika Gupta	default y
38313ea293SRuchika Gupta	help
39313ea293SRuchika Gupta	  Enables the driver module for Job Rings which are part of
40313ea293SRuchika Gupta	  Freescale's Cryptographic Accelerator
41313ea293SRuchika Gupta	  and Assurance Module (CAAM). This module adds a job ring operation
42313ea293SRuchika Gupta	  interface.
43313ea293SRuchika Gupta
44313ea293SRuchika Gupta	  To compile this driver as a module, choose M here: the module
45313ea293SRuchika Gupta	  will be called caam_jr.
46313ea293SRuchika Gupta
478d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM_JR
488d818c10SHoria Geantă
498e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_RINGSIZE
508e8ec596SKim Phillips	int "Job Ring size"
518e8ec596SKim Phillips	range 2 9
528e8ec596SKim Phillips	default "9"
538e8ec596SKim Phillips	help
548e8ec596SKim Phillips	  Select size of Job Rings as a power of 2, within the
558e8ec596SKim Phillips	  range 2-9 (ring size 4-512).
568e8ec596SKim Phillips	  Examples:
578e8ec596SKim Phillips		2 => 4
588e8ec596SKim Phillips		3 => 8
598e8ec596SKim Phillips		4 => 16
608e8ec596SKim Phillips		5 => 32
618e8ec596SKim Phillips		6 => 64
628e8ec596SKim Phillips		7 => 128
638e8ec596SKim Phillips		8 => 256
648e8ec596SKim Phillips		9 => 512
658e8ec596SKim Phillips
668e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC
678e8ec596SKim Phillips	bool "Job Ring interrupt coalescing"
688e8ec596SKim Phillips	help
698e8ec596SKim Phillips	  Enable the Job Ring's interrupt coalescing feature.
708e8ec596SKim Phillips
711a076689SKim Phillips	  Note: the driver already provides adequate
721a076689SKim Phillips	  interrupt coalescing in software.
731a076689SKim Phillips
748e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
758e8ec596SKim Phillips	int "Job Ring interrupt coalescing count threshold"
768e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
778e8ec596SKim Phillips	range 1 255
788e8ec596SKim Phillips	default 255
798e8ec596SKim Phillips	help
808e8ec596SKim Phillips	  Select number of descriptor completions to queue before
818e8ec596SKim Phillips	  raising an interrupt, in the range 1-255. Note that a selection
828e8ec596SKim Phillips	  of 1 functionally defeats the coalescing feature, and a selection
838e8ec596SKim Phillips	  equal or greater than the job ring size will force timeouts.
848e8ec596SKim Phillips
858e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
868e8ec596SKim Phillips	int "Job Ring interrupt coalescing timer threshold"
878e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
888e8ec596SKim Phillips	range 1 65535
898e8ec596SKim Phillips	default 2048
908e8ec596SKim Phillips	help
918e8ec596SKim Phillips	  Select number of bus clocks/64 to timeout in the case that one or
928e8ec596SKim Phillips	  more descriptor completions are queued without reaching the count
938e8ec596SKim Phillips	  threshold. Range is 1-65535.
948e8ec596SKim Phillips
958e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API
961b46c90cSHoria Geantă	bool "Register algorithm implementations with the Crypto API"
978e8ec596SKim Phillips	default y
981b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
99596103cfSHerbert Xu	select CRYPTO_AEAD
1008e8ec596SKim Phillips	select CRYPTO_AUTHENC
101b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
10204007b0eSArd Biesheuvel	select CRYPTO_LIB_DES
1038e8ec596SKim Phillips	help
1048e8ec596SKim Phillips	  Selecting this will offload crypto for users of the
1058e8ec596SKim Phillips	  scatterlist crypto API (such as the linux native IPSec
1068e8ec596SKim Phillips	  stack) to the SEC4 via job ring.
1078e8ec596SKim Phillips
108b189817cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
1091b46c90cSHoria Geantă	bool "Queue Interface as Crypto API backend"
1108d818c10SHoria Geantă	depends on FSL_DPAA && NET
111b189817cSHoria Geantă	default y
1121b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
113b189817cSHoria Geantă	select CRYPTO_AUTHENC
114b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
115836d8f43SIuliana Prodan	select CRYPTO_DES
116b189817cSHoria Geantă	help
117b189817cSHoria Geantă	  Selecting this will use CAAM Queue Interface (QI) for sending
118b189817cSHoria Geantă	  & receiving crypto jobs to/from CAAM. This gives better performance
119b189817cSHoria Geantă	  than job ring interface when the number of cores are more than the
120b189817cSHoria Geantă	  number of job rings assigned to the kernel. The number of portals
121b189817cSHoria Geantă	  assigned to the kernel should also be more than the number of
122b189817cSHoria Geantă	  job rings.
123b189817cSHoria Geantă
124045e3678SYuan Kangconfig CRYPTO_DEV_FSL_CAAM_AHASH_API
1251b46c90cSHoria Geantă	bool "Register hash algorithm implementations with Crypto API"
126045e3678SYuan Kang	default y
1271b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
128ae8488a5SPaul Bolle	select CRYPTO_HASH
129045e3678SYuan Kang	help
130045e3678SYuan Kang	  Selecting this will offload ahash for users of the
131045e3678SYuan Kang	  scatterlist crypto API to the SEC4 via job ring.
132045e3678SYuan Kang
1338c419778STudor Ambarusconfig CRYPTO_DEV_FSL_CAAM_PKC_API
1341b46c90cSHoria Geantă	bool "Register public key cryptography implementations with Crypto API"
1358c419778STudor Ambarus	default y
1368c419778STudor Ambarus	select CRYPTO_RSA
1378c419778STudor Ambarus	help
1388c419778STudor Ambarus	  Selecting this will allow SEC Public key support for RSA.
1398c419778STudor Ambarus	  Supported cryptographic primitives: encryption, decryption,
1408c419778STudor Ambarus	  signature and verification.
1418c419778STudor Ambarus
142e24f7c9eSYuan Kangconfig CRYPTO_DEV_FSL_CAAM_RNG_API
1431b46c90cSHoria Geantă	bool "Register caam device for hwrng API"
144e24f7c9eSYuan Kang	default y
145e24f7c9eSYuan Kang	select CRYPTO_RNG
146e24f7c9eSYuan Kang	select HW_RANDOM
147e24f7c9eSYuan Kang	help
148e24f7c9eSYuan Kang	  Selecting this will register the SEC4 hardware rng to
149e24f7c9eSYuan Kang	  the hw_random API for suppying the kernel entropy pool.
150e24f7c9eSYuan Kang
1518d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM_JR
1528d818c10SHoria Geantă
1538d818c10SHoria Geantăendif # CRYPTO_DEV_FSL_CAAM
1548d818c10SHoria Geantă
1558d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_DPAA2_CAAM
1568d818c10SHoria Geantă	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
1578d818c10SHoria Geantă	depends on FSL_MC_DPIO
15896808c59SArnd Bergmann	depends on NETDEVICES
1598d818c10SHoria Geantă	select CRYPTO_DEV_FSL_CAAM_COMMON
1601b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1611b46c90cSHoria Geantă	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
162b95bba5dSEric Biggers	select CRYPTO_SKCIPHER
1638d818c10SHoria Geantă	select CRYPTO_AUTHENC
1648d818c10SHoria Geantă	select CRYPTO_AEAD
1653f16f6c9SHoria Geantă	select CRYPTO_HASH
166836d8f43SIuliana Prodan	select CRYPTO_DES
167d4d8edf8SAlex Porosanu	help
1688d818c10SHoria Geantă	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
1698d818c10SHoria Geantă	  It handles DPSECI DPAA2 objects that sit on the Management Complex
1708d818c10SHoria Geantă	  (MC) fsl-mc bus.
1718d818c10SHoria Geantă
1728d818c10SHoria Geantă	  To compile this as a module, choose M here: the module
1738d818c10SHoria Geantă	  will be called dpaa2_caam.
174