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