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