xref: /linux/drivers/crypto/caam/Kconfig (revision 618b5dc48365cecc03daffa46800f20ab11e3f80)
1*618b5dc4SHoria Geantă# SPDX-License-Identifier: GPL-2.0
28d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_COMMON
38d818c10SHoria Geantă	tristate
48d818c10SHoria Geantă
58e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM
68d818c10SHoria Geantă	tristate "Freescale CAAM-Multicore platform driver backend"
79e217795SHoria Geantă	depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
8c056d910SHoria Geantă	select SOC_BUS
98d818c10SHoria Geantă	select CRYPTO_DEV_FSL_CAAM_COMMON
108e8ec596SKim Phillips	help
118e8ec596SKim Phillips	  Enables the driver module for Freescale's Cryptographic Accelerator
128e8ec596SKim Phillips	  and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
13313ea293SRuchika Gupta	  This module creates job ring devices, and configures h/w
148e8ec596SKim Phillips	  to operate as a DPAA component automatically, depending
158e8ec596SKim Phillips	  on h/w feature availability.
168e8ec596SKim Phillips
178e8ec596SKim Phillips	  To compile this driver as a module, choose M here: the module
188e8ec596SKim Phillips	  will be called caam.
198e8ec596SKim Phillips
208d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM
218d818c10SHoria Geantă
228d818c10SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_DEBUG
238d818c10SHoria Geantă	bool "Enable debug output in CAAM driver"
248d818c10SHoria Geantă	help
258d818c10SHoria Geantă	  Selecting this will enable printing of various debug
268d818c10SHoria Geantă	  information in the CAAM driver.
278d818c10SHoria Geantă
28313ea293SRuchika Guptaconfig CRYPTO_DEV_FSL_CAAM_JR
29313ea293SRuchika Gupta	tristate "Freescale CAAM Job Ring driver backend"
30313ea293SRuchika Gupta	default y
31313ea293SRuchika Gupta	help
32313ea293SRuchika Gupta	  Enables the driver module for Job Rings which are part of
33313ea293SRuchika Gupta	  Freescale's Cryptographic Accelerator
34313ea293SRuchika Gupta	  and Assurance Module (CAAM). This module adds a job ring operation
35313ea293SRuchika Gupta	  interface.
36313ea293SRuchika Gupta
37313ea293SRuchika Gupta	  To compile this driver as a module, choose M here: the module
38313ea293SRuchika Gupta	  will be called caam_jr.
39313ea293SRuchika Gupta
408d818c10SHoria Geantăif CRYPTO_DEV_FSL_CAAM_JR
418d818c10SHoria Geantă
428e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_RINGSIZE
438e8ec596SKim Phillips	int "Job Ring size"
448e8ec596SKim Phillips	range 2 9
458e8ec596SKim Phillips	default "9"
468e8ec596SKim Phillips	help
478e8ec596SKim Phillips	  Select size of Job Rings as a power of 2, within the
488e8ec596SKim Phillips	  range 2-9 (ring size 4-512).
498e8ec596SKim Phillips	  Examples:
508e8ec596SKim Phillips		2 => 4
518e8ec596SKim Phillips		3 => 8
528e8ec596SKim Phillips		4 => 16
538e8ec596SKim Phillips		5 => 32
548e8ec596SKim Phillips		6 => 64
558e8ec596SKim Phillips		7 => 128
568e8ec596SKim Phillips		8 => 256
578e8ec596SKim Phillips		9 => 512
588e8ec596SKim Phillips
598e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC
608e8ec596SKim Phillips	bool "Job Ring interrupt coalescing"
618e8ec596SKim Phillips	help
628e8ec596SKim Phillips	  Enable the Job Ring's interrupt coalescing feature.
638e8ec596SKim Phillips
641a076689SKim Phillips	  Note: the driver already provides adequate
651a076689SKim Phillips	  interrupt coalescing in software.
661a076689SKim Phillips
678e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
688e8ec596SKim Phillips	int "Job Ring interrupt coalescing count threshold"
698e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
708e8ec596SKim Phillips	range 1 255
718e8ec596SKim Phillips	default 255
728e8ec596SKim Phillips	help
738e8ec596SKim Phillips	  Select number of descriptor completions to queue before
748e8ec596SKim Phillips	  raising an interrupt, in the range 1-255. Note that a selection
758e8ec596SKim Phillips	  of 1 functionally defeats the coalescing feature, and a selection
768e8ec596SKim Phillips	  equal or greater than the job ring size will force timeouts.
778e8ec596SKim Phillips
788e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
798e8ec596SKim Phillips	int "Job Ring interrupt coalescing timer threshold"
808e8ec596SKim Phillips	depends on CRYPTO_DEV_FSL_CAAM_INTC
818e8ec596SKim Phillips	range 1 65535
828e8ec596SKim Phillips	default 2048
838e8ec596SKim Phillips	help
848e8ec596SKim Phillips	  Select number of bus clocks/64 to timeout in the case that one or
858e8ec596SKim Phillips	  more descriptor completions are queued without reaching the count
868e8ec596SKim Phillips	  threshold. Range is 1-65535.
878e8ec596SKim Phillips
888e8ec596SKim Phillipsconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API
898e8ec596SKim Phillips	tristate "Register algorithm implementations with the Crypto API"
908e8ec596SKim Phillips	default y
91596103cfSHerbert Xu	select CRYPTO_AEAD
928e8ec596SKim Phillips	select CRYPTO_AUTHENC
93596103cfSHerbert Xu	select CRYPTO_BLKCIPHER
948e8ec596SKim Phillips	help
958e8ec596SKim Phillips	  Selecting this will offload crypto for users of the
968e8ec596SKim Phillips	  scatterlist crypto API (such as the linux native IPSec
978e8ec596SKim Phillips	  stack) to the SEC4 via job ring.
988e8ec596SKim Phillips
998e8ec596SKim Phillips	  To compile this as a module, choose M here: the module
1008e8ec596SKim Phillips	  will be called caamalg.
101045e3678SYuan Kang
102b189817cSHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
103b189817cSHoria Geantă	tristate "Queue Interface as Crypto API backend"
1048d818c10SHoria Geantă	depends on FSL_DPAA && NET
105b189817cSHoria Geantă	default y
106b189817cSHoria Geantă	select CRYPTO_AUTHENC
107b189817cSHoria Geantă	select CRYPTO_BLKCIPHER
108b189817cSHoria Geantă	help
109b189817cSHoria Geantă	  Selecting this will use CAAM Queue Interface (QI) for sending
110b189817cSHoria Geantă	  & receiving crypto jobs to/from CAAM. This gives better performance
111b189817cSHoria Geantă	  than job ring interface when the number of cores are more than the
112b189817cSHoria Geantă	  number of job rings assigned to the kernel. The number of portals
113b189817cSHoria Geantă	  assigned to the kernel should also be more than the number of
114b189817cSHoria Geantă	  job rings.
115b189817cSHoria Geantă
116b189817cSHoria Geantă	  To compile this as a module, choose M here: the module
117b189817cSHoria Geantă	  will be called caamalg_qi.
118b189817cSHoria Geantă
119045e3678SYuan Kangconfig CRYPTO_DEV_FSL_CAAM_AHASH_API
120045e3678SYuan Kang	tristate "Register hash algorithm implementations with Crypto API"
121045e3678SYuan Kang	default y
122ae8488a5SPaul Bolle	select CRYPTO_HASH
123045e3678SYuan Kang	help
124045e3678SYuan Kang	  Selecting this will offload ahash for users of the
125045e3678SYuan Kang	  scatterlist crypto API to the SEC4 via job ring.
126045e3678SYuan Kang
127045e3678SYuan Kang	  To compile this as a module, choose M here: the module
128045e3678SYuan Kang	  will be called caamhash.
129e24f7c9eSYuan Kang
1308c419778STudor Ambarusconfig CRYPTO_DEV_FSL_CAAM_PKC_API
1318c419778STudor Ambarus        tristate "Register public key cryptography implementations with Crypto API"
1328c419778STudor Ambarus        default y
1338c419778STudor Ambarus        select CRYPTO_RSA
1348c419778STudor Ambarus        help
1358c419778STudor Ambarus          Selecting this will allow SEC Public key support for RSA.
1368c419778STudor Ambarus          Supported cryptographic primitives: encryption, decryption,
1378c419778STudor Ambarus          signature and verification.
1388c419778STudor Ambarus          To compile this as a module, choose M here: the module
1398c419778STudor Ambarus          will be called caam_pkc.
1408c419778STudor Ambarus
141e24f7c9eSYuan Kangconfig CRYPTO_DEV_FSL_CAAM_RNG_API
142e24f7c9eSYuan Kang	tristate "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
150e24f7c9eSYuan Kang	  To compile this as a module, choose M here: the module
151e24f7c9eSYuan Kang	  will be called caamrng.
152d4d8edf8SAlex Porosanu
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
162226853acSHoria Geantă	select CRYPTO_BLKCIPHER
1638d818c10SHoria Geantă	select CRYPTO_AUTHENC
1648d818c10SHoria Geantă	select CRYPTO_AEAD
1653f16f6c9SHoria Geantă	select CRYPTO_HASH
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.
1738cea7b66SHoria Geantă
1748cea7b66SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
175b189817cSHoria Geantă	def_tristate (CRYPTO_DEV_FSL_CAAM_CRYPTO_API || \
1768d818c10SHoria Geantă		      CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI || \
1778d818c10SHoria Geantă		      CRYPTO_DEV_FSL_DPAA2_CAAM)
1780efa7579SHoria Geantă
1790efa7579SHoria Geantăconfig CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
1803f16f6c9SHoria Geantă	def_tristate (CRYPTO_DEV_FSL_CAAM_AHASH_API || \
1813f16f6c9SHoria Geantă		      CRYPTO_DEV_FSL_DPAA2_CAAM)
182