xref: /linux-6.15/drivers/crypto/caam/Kconfig (revision ee38767f)
1# SPDX-License-Identifier: GPL-2.0
2config CRYPTO_DEV_FSL_CAAM_COMMON
3	tristate
4
5config CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
6	tristate
7
8config CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
9	tristate
10
11config CRYPTO_DEV_FSL_CAAM
12	tristate "Freescale CAAM-Multicore platform driver backend"
13	depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
14	select SOC_BUS
15	select CRYPTO_DEV_FSL_CAAM_COMMON
16	help
17	  Enables the driver module for Freescale's Cryptographic Accelerator
18	  and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
19	  This module creates job ring devices, and configures h/w
20	  to operate as a DPAA component automatically, depending
21	  on h/w feature availability.
22
23	  To compile this driver as a module, choose M here: the module
24	  will be called caam.
25
26if CRYPTO_DEV_FSL_CAAM
27
28config CRYPTO_DEV_FSL_CAAM_DEBUG
29	bool "Enable debug output in CAAM driver"
30	help
31	  Selecting this will enable printing of various debug
32	  information in the CAAM driver.
33
34menuconfig CRYPTO_DEV_FSL_CAAM_JR
35	tristate "Freescale CAAM Job Ring driver backend"
36	select CRYPTO_ENGINE
37	default y
38	help
39	  Enables the driver module for Job Rings which are part of
40	  Freescale's Cryptographic Accelerator
41	  and Assurance Module (CAAM). This module adds a job ring operation
42	  interface.
43
44	  To compile this driver as a module, choose M here: the module
45	  will be called caam_jr.
46
47if CRYPTO_DEV_FSL_CAAM_JR
48
49config CRYPTO_DEV_FSL_CAAM_RINGSIZE
50	int "Job Ring size"
51	range 2 9
52	default "9"
53	help
54	  Select size of Job Rings as a power of 2, within the
55	  range 2-9 (ring size 4-512).
56	  Examples:
57		2 => 4
58		3 => 8
59		4 => 16
60		5 => 32
61		6 => 64
62		7 => 128
63		8 => 256
64		9 => 512
65
66config CRYPTO_DEV_FSL_CAAM_INTC
67	bool "Job Ring interrupt coalescing"
68	help
69	  Enable the Job Ring's interrupt coalescing feature.
70
71	  Note: the driver already provides adequate
72	  interrupt coalescing in software.
73
74config CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
75	int "Job Ring interrupt coalescing count threshold"
76	depends on CRYPTO_DEV_FSL_CAAM_INTC
77	range 1 255
78	default 255
79	help
80	  Select number of descriptor completions to queue before
81	  raising an interrupt, in the range 1-255. Note that a selection
82	  of 1 functionally defeats the coalescing feature, and a selection
83	  equal or greater than the job ring size will force timeouts.
84
85config CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
86	int "Job Ring interrupt coalescing timer threshold"
87	depends on CRYPTO_DEV_FSL_CAAM_INTC
88	range 1 65535
89	default 2048
90	help
91	  Select number of bus clocks/64 to timeout in the case that one or
92	  more descriptor completions are queued without reaching the count
93	  threshold. Range is 1-65535.
94
95config CRYPTO_DEV_FSL_CAAM_CRYPTO_API
96	bool "Register algorithm implementations with the Crypto API"
97	default y
98	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
99	select CRYPTO_AEAD
100	select CRYPTO_AUTHENC
101	select CRYPTO_SKCIPHER
102	select CRYPTO_LIB_DES
103	help
104	  Selecting this will offload crypto for users of the
105	  scatterlist crypto API (such as the linux native IPSec
106	  stack) to the SEC4 via job ring.
107
108config CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
109	bool "Queue Interface as Crypto API backend"
110	depends on FSL_DPAA && NET
111	default y
112	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
113	select CRYPTO_AUTHENC
114	select CRYPTO_SKCIPHER
115	select CRYPTO_DES
116	help
117	  Selecting this will use CAAM Queue Interface (QI) for sending
118	  & receiving crypto jobs to/from CAAM. This gives better performance
119	  than job ring interface when the number of cores are more than the
120	  number of job rings assigned to the kernel. The number of portals
121	  assigned to the kernel should also be more than the number of
122	  job rings.
123
124config CRYPTO_DEV_FSL_CAAM_AHASH_API
125	bool "Register hash algorithm implementations with Crypto API"
126	default y
127	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
128	select CRYPTO_HASH
129	help
130	  Selecting this will offload ahash for users of the
131	  scatterlist crypto API to the SEC4 via job ring.
132
133config CRYPTO_DEV_FSL_CAAM_PKC_API
134	bool "Register public key cryptography implementations with Crypto API"
135	default y
136	select CRYPTO_RSA
137	help
138	  Selecting this will allow SEC Public key support for RSA.
139	  Supported cryptographic primitives: encryption, decryption,
140	  signature and verification.
141
142config CRYPTO_DEV_FSL_CAAM_RNG_API
143	bool "Register caam device for hwrng API"
144	default y
145	select CRYPTO_RNG
146	select HW_RANDOM
147	help
148	  Selecting this will register the SEC4 hardware rng to
149	  the hw_random API for suppying the kernel entropy pool.
150
151endif # CRYPTO_DEV_FSL_CAAM_JR
152
153endif # CRYPTO_DEV_FSL_CAAM
154
155config CRYPTO_DEV_FSL_DPAA2_CAAM
156	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
157	depends on FSL_MC_DPIO
158	depends on NETDEVICES
159	select CRYPTO_DEV_FSL_CAAM_COMMON
160	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
161	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
162	select CRYPTO_SKCIPHER
163	select CRYPTO_AUTHENC
164	select CRYPTO_AEAD
165	select CRYPTO_HASH
166	select CRYPTO_DES
167	help
168	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
169	  It handles DPSECI DPAA2 objects that sit on the Management Complex
170	  (MC) fsl-mc bus.
171
172	  To compile this as a module, choose M here: the module
173	  will be called dpaa2_caam.
174