xref: /openbmc/linux/drivers/crypto/caam/Kconfig (revision b830f94f)
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_BLKCIPHER
101	select CRYPTO_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_BLKCIPHER
114	help
115	  Selecting this will use CAAM Queue Interface (QI) for sending
116	  & receiving crypto jobs to/from CAAM. This gives better performance
117	  than job ring interface when the number of cores are more than the
118	  number of job rings assigned to the kernel. The number of portals
119	  assigned to the kernel should also be more than the number of
120	  job rings.
121
122config CRYPTO_DEV_FSL_CAAM_AHASH_API
123	bool "Register hash algorithm implementations with Crypto API"
124	default y
125	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
126	select CRYPTO_HASH
127	help
128	  Selecting this will offload ahash for users of the
129	  scatterlist crypto API to the SEC4 via job ring.
130
131config CRYPTO_DEV_FSL_CAAM_PKC_API
132        bool "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
140config CRYPTO_DEV_FSL_CAAM_RNG_API
141	bool "Register caam device for hwrng API"
142	default y
143	select CRYPTO_RNG
144	select HW_RANDOM
145	help
146	  Selecting this will register the SEC4 hardware rng to
147	  the hw_random API for suppying the kernel entropy pool.
148
149endif # CRYPTO_DEV_FSL_CAAM_JR
150
151endif # CRYPTO_DEV_FSL_CAAM
152
153config CRYPTO_DEV_FSL_DPAA2_CAAM
154	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
155	depends on FSL_MC_DPIO
156	depends on NETDEVICES
157	select CRYPTO_DEV_FSL_CAAM_COMMON
158	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
159	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
160	select CRYPTO_BLKCIPHER
161	select CRYPTO_AUTHENC
162	select CRYPTO_AEAD
163	select CRYPTO_HASH
164	help
165	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
166	  It handles DPSECI DPAA2 objects that sit on the Management Complex
167	  (MC) fsl-mc bus.
168
169	  To compile this as a module, choose M here: the module
170	  will be called dpaa2_caam.
171