18c2ecf20Sopenharmony_ci# SPDX-License-Identifier: GPL-2.0
28c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_COMMON
38c2ecf20Sopenharmony_ci	tristate
48c2ecf20Sopenharmony_ci
58c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
68c2ecf20Sopenharmony_ci	tristate
78c2ecf20Sopenharmony_ci
88c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
98c2ecf20Sopenharmony_ci	tristate
108c2ecf20Sopenharmony_ci
118c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM
128c2ecf20Sopenharmony_ci	tristate "Freescale CAAM-Multicore platform driver backend"
138c2ecf20Sopenharmony_ci	depends on FSL_SOC || ARCH_MXC || ARCH_LAYERSCAPE
148c2ecf20Sopenharmony_ci	select SOC_BUS
158c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_COMMON
168c2ecf20Sopenharmony_ci	imply FSL_MC_BUS
178c2ecf20Sopenharmony_ci	help
188c2ecf20Sopenharmony_ci	  Enables the driver module for Freescale's Cryptographic Accelerator
198c2ecf20Sopenharmony_ci	  and Assurance Module (CAAM), also known as the SEC version 4 (SEC4).
208c2ecf20Sopenharmony_ci	  This module creates job ring devices, and configures h/w
218c2ecf20Sopenharmony_ci	  to operate as a DPAA component automatically, depending
228c2ecf20Sopenharmony_ci	  on h/w feature availability.
238c2ecf20Sopenharmony_ci
248c2ecf20Sopenharmony_ci	  To compile this driver as a module, choose M here: the module
258c2ecf20Sopenharmony_ci	  will be called caam.
268c2ecf20Sopenharmony_ci
278c2ecf20Sopenharmony_ciif CRYPTO_DEV_FSL_CAAM
288c2ecf20Sopenharmony_ci
298c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_DEBUG
308c2ecf20Sopenharmony_ci	bool "Enable debug output in CAAM driver"
318c2ecf20Sopenharmony_ci	help
328c2ecf20Sopenharmony_ci	  Selecting this will enable printing of various debug
338c2ecf20Sopenharmony_ci	  information in the CAAM driver.
348c2ecf20Sopenharmony_ci
358c2ecf20Sopenharmony_cimenuconfig CRYPTO_DEV_FSL_CAAM_JR
368c2ecf20Sopenharmony_ci	tristate "Freescale CAAM Job Ring driver backend"
378c2ecf20Sopenharmony_ci	select CRYPTO_ENGINE
388c2ecf20Sopenharmony_ci	default y
398c2ecf20Sopenharmony_ci	help
408c2ecf20Sopenharmony_ci	  Enables the driver module for Job Rings which are part of
418c2ecf20Sopenharmony_ci	  Freescale's Cryptographic Accelerator
428c2ecf20Sopenharmony_ci	  and Assurance Module (CAAM). This module adds a job ring operation
438c2ecf20Sopenharmony_ci	  interface.
448c2ecf20Sopenharmony_ci
458c2ecf20Sopenharmony_ci	  To compile this driver as a module, choose M here: the module
468c2ecf20Sopenharmony_ci	  will be called caam_jr.
478c2ecf20Sopenharmony_ci
488c2ecf20Sopenharmony_ciif CRYPTO_DEV_FSL_CAAM_JR
498c2ecf20Sopenharmony_ci
508c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_RINGSIZE
518c2ecf20Sopenharmony_ci	int "Job Ring size"
528c2ecf20Sopenharmony_ci	range 2 9
538c2ecf20Sopenharmony_ci	default "9"
548c2ecf20Sopenharmony_ci	help
558c2ecf20Sopenharmony_ci	  Select size of Job Rings as a power of 2, within the
568c2ecf20Sopenharmony_ci	  range 2-9 (ring size 4-512).
578c2ecf20Sopenharmony_ci	  Examples:
588c2ecf20Sopenharmony_ci		2 => 4
598c2ecf20Sopenharmony_ci		3 => 8
608c2ecf20Sopenharmony_ci		4 => 16
618c2ecf20Sopenharmony_ci		5 => 32
628c2ecf20Sopenharmony_ci		6 => 64
638c2ecf20Sopenharmony_ci		7 => 128
648c2ecf20Sopenharmony_ci		8 => 256
658c2ecf20Sopenharmony_ci		9 => 512
668c2ecf20Sopenharmony_ci
678c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_INTC
688c2ecf20Sopenharmony_ci	bool "Job Ring interrupt coalescing"
698c2ecf20Sopenharmony_ci	help
708c2ecf20Sopenharmony_ci	  Enable the Job Ring's interrupt coalescing feature.
718c2ecf20Sopenharmony_ci
728c2ecf20Sopenharmony_ci	  Note: the driver already provides adequate
738c2ecf20Sopenharmony_ci	  interrupt coalescing in software.
748c2ecf20Sopenharmony_ci
758c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_INTC_COUNT_THLD
768c2ecf20Sopenharmony_ci	int "Job Ring interrupt coalescing count threshold"
778c2ecf20Sopenharmony_ci	depends on CRYPTO_DEV_FSL_CAAM_INTC
788c2ecf20Sopenharmony_ci	range 1 255
798c2ecf20Sopenharmony_ci	default 255
808c2ecf20Sopenharmony_ci	help
818c2ecf20Sopenharmony_ci	  Select number of descriptor completions to queue before
828c2ecf20Sopenharmony_ci	  raising an interrupt, in the range 1-255. Note that a selection
838c2ecf20Sopenharmony_ci	  of 1 functionally defeats the coalescing feature, and a selection
848c2ecf20Sopenharmony_ci	  equal or greater than the job ring size will force timeouts.
858c2ecf20Sopenharmony_ci
868c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_INTC_TIME_THLD
878c2ecf20Sopenharmony_ci	int "Job Ring interrupt coalescing timer threshold"
888c2ecf20Sopenharmony_ci	depends on CRYPTO_DEV_FSL_CAAM_INTC
898c2ecf20Sopenharmony_ci	range 1 65535
908c2ecf20Sopenharmony_ci	default 2048
918c2ecf20Sopenharmony_ci	help
928c2ecf20Sopenharmony_ci	  Select number of bus clocks/64 to timeout in the case that one or
938c2ecf20Sopenharmony_ci	  more descriptor completions are queued without reaching the count
948c2ecf20Sopenharmony_ci	  threshold. Range is 1-65535.
958c2ecf20Sopenharmony_ci
968c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API
978c2ecf20Sopenharmony_ci	bool "Register algorithm implementations with the Crypto API"
988c2ecf20Sopenharmony_ci	default y
998c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1008c2ecf20Sopenharmony_ci	select CRYPTO_AEAD
1018c2ecf20Sopenharmony_ci	select CRYPTO_AUTHENC
1028c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
1038c2ecf20Sopenharmony_ci	select CRYPTO_LIB_DES
1048c2ecf20Sopenharmony_ci	select CRYPTO_XTS
1058c2ecf20Sopenharmony_ci	help
1068c2ecf20Sopenharmony_ci	  Selecting this will offload crypto for users of the
1078c2ecf20Sopenharmony_ci	  scatterlist crypto API (such as the linux native IPSec
1088c2ecf20Sopenharmony_ci	  stack) to the SEC4 via job ring.
1098c2ecf20Sopenharmony_ci
1108c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_CRYPTO_API_QI
1118c2ecf20Sopenharmony_ci	bool "Queue Interface as Crypto API backend"
1128c2ecf20Sopenharmony_ci	depends on FSL_DPAA && NET
1138c2ecf20Sopenharmony_ci	default y
1148c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1158c2ecf20Sopenharmony_ci	select CRYPTO_AUTHENC
1168c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
1178c2ecf20Sopenharmony_ci	select CRYPTO_DES
1188c2ecf20Sopenharmony_ci	select CRYPTO_XTS
1198c2ecf20Sopenharmony_ci	help
1208c2ecf20Sopenharmony_ci	  Selecting this will use CAAM Queue Interface (QI) for sending
1218c2ecf20Sopenharmony_ci	  & receiving crypto jobs to/from CAAM. This gives better performance
1228c2ecf20Sopenharmony_ci	  than job ring interface when the number of cores are more than the
1238c2ecf20Sopenharmony_ci	  number of job rings assigned to the kernel. The number of portals
1248c2ecf20Sopenharmony_ci	  assigned to the kernel should also be more than the number of
1258c2ecf20Sopenharmony_ci	  job rings.
1268c2ecf20Sopenharmony_ci
1278c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_AHASH_API
1288c2ecf20Sopenharmony_ci	bool "Register hash algorithm implementations with Crypto API"
1298c2ecf20Sopenharmony_ci	default y
1308c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
1318c2ecf20Sopenharmony_ci	select CRYPTO_HASH
1328c2ecf20Sopenharmony_ci	help
1338c2ecf20Sopenharmony_ci	  Selecting this will offload ahash for users of the
1348c2ecf20Sopenharmony_ci	  scatterlist crypto API to the SEC4 via job ring.
1358c2ecf20Sopenharmony_ci
1368c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_PKC_API
1378c2ecf20Sopenharmony_ci	bool "Register public key cryptography implementations with Crypto API"
1388c2ecf20Sopenharmony_ci	default y
1398c2ecf20Sopenharmony_ci	select CRYPTO_RSA
1408c2ecf20Sopenharmony_ci	help
1418c2ecf20Sopenharmony_ci	  Selecting this will allow SEC Public key support for RSA.
1428c2ecf20Sopenharmony_ci	  Supported cryptographic primitives: encryption, decryption,
1438c2ecf20Sopenharmony_ci	  signature and verification.
1448c2ecf20Sopenharmony_ci
1458c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_CAAM_RNG_API
1468c2ecf20Sopenharmony_ci	bool "Register caam device for hwrng API"
1478c2ecf20Sopenharmony_ci	default y
1488c2ecf20Sopenharmony_ci	select CRYPTO_RNG
1498c2ecf20Sopenharmony_ci	select HW_RANDOM
1508c2ecf20Sopenharmony_ci	help
1518c2ecf20Sopenharmony_ci	  Selecting this will register the SEC4 hardware rng to
1528c2ecf20Sopenharmony_ci	  the hw_random API for supplying the kernel entropy pool.
1538c2ecf20Sopenharmony_ci
1548c2ecf20Sopenharmony_ciendif # CRYPTO_DEV_FSL_CAAM_JR
1558c2ecf20Sopenharmony_ci
1568c2ecf20Sopenharmony_ciendif # CRYPTO_DEV_FSL_CAAM
1578c2ecf20Sopenharmony_ci
1588c2ecf20Sopenharmony_ciconfig CRYPTO_DEV_FSL_DPAA2_CAAM
1598c2ecf20Sopenharmony_ci	tristate "QorIQ DPAA2 CAAM (DPSECI) driver"
1608c2ecf20Sopenharmony_ci	depends on FSL_MC_DPIO
1618c2ecf20Sopenharmony_ci	depends on NETDEVICES
1628c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_COMMON
1638c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_CRYPTO_API_DESC
1648c2ecf20Sopenharmony_ci	select CRYPTO_DEV_FSL_CAAM_AHASH_API_DESC
1658c2ecf20Sopenharmony_ci	select CRYPTO_SKCIPHER
1668c2ecf20Sopenharmony_ci	select CRYPTO_AUTHENC
1678c2ecf20Sopenharmony_ci	select CRYPTO_AEAD
1688c2ecf20Sopenharmony_ci	select CRYPTO_HASH
1698c2ecf20Sopenharmony_ci	select CRYPTO_DES
1708c2ecf20Sopenharmony_ci	select CRYPTO_XTS
1718c2ecf20Sopenharmony_ci	help
1728c2ecf20Sopenharmony_ci	  CAAM driver for QorIQ Data Path Acceleration Architecture 2.
1738c2ecf20Sopenharmony_ci	  It handles DPSECI DPAA2 objects that sit on the Management Complex
1748c2ecf20Sopenharmony_ci	  (MC) fsl-mc bus.
1758c2ecf20Sopenharmony_ci
1768c2ecf20Sopenharmony_ci	  To compile this as a module, choose M here: the module
1778c2ecf20Sopenharmony_ci	  will be called dpaa2_caam.
178