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