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