18c2ecf20Sopenharmony_ci/* SPDX-License-Identifier: GPL-2.0-only */ 28c2ecf20Sopenharmony_ci/* 38c2ecf20Sopenharmony_ci * Copyright (c) 2012-2014, The Linux Foundation. All rights reserved. 48c2ecf20Sopenharmony_ci */ 58c2ecf20Sopenharmony_ci 68c2ecf20Sopenharmony_ci#ifndef _REGS_V5_H_ 78c2ecf20Sopenharmony_ci#define _REGS_V5_H_ 88c2ecf20Sopenharmony_ci 98c2ecf20Sopenharmony_ci#include <linux/bitops.h> 108c2ecf20Sopenharmony_ci 118c2ecf20Sopenharmony_ci#define REG_VERSION 0x000 128c2ecf20Sopenharmony_ci#define REG_STATUS 0x100 138c2ecf20Sopenharmony_ci#define REG_STATUS2 0x104 148c2ecf20Sopenharmony_ci#define REG_ENGINES_AVAIL 0x108 158c2ecf20Sopenharmony_ci#define REG_FIFO_SIZES 0x10c 168c2ecf20Sopenharmony_ci#define REG_SEG_SIZE 0x110 178c2ecf20Sopenharmony_ci#define REG_GOPROC 0x120 188c2ecf20Sopenharmony_ci#define REG_ENCR_SEG_CFG 0x200 198c2ecf20Sopenharmony_ci#define REG_ENCR_SEG_SIZE 0x204 208c2ecf20Sopenharmony_ci#define REG_ENCR_SEG_START 0x208 218c2ecf20Sopenharmony_ci#define REG_CNTR0_IV0 0x20c 228c2ecf20Sopenharmony_ci#define REG_CNTR1_IV1 0x210 238c2ecf20Sopenharmony_ci#define REG_CNTR2_IV2 0x214 248c2ecf20Sopenharmony_ci#define REG_CNTR3_IV3 0x218 258c2ecf20Sopenharmony_ci#define REG_CNTR_MASK 0x21C 268c2ecf20Sopenharmony_ci#define REG_ENCR_CCM_INT_CNTR0 0x220 278c2ecf20Sopenharmony_ci#define REG_ENCR_CCM_INT_CNTR1 0x224 288c2ecf20Sopenharmony_ci#define REG_ENCR_CCM_INT_CNTR2 0x228 298c2ecf20Sopenharmony_ci#define REG_ENCR_CCM_INT_CNTR3 0x22c 308c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_DU_SIZE 0x230 318c2ecf20Sopenharmony_ci#define REG_CNTR_MASK2 0x234 328c2ecf20Sopenharmony_ci#define REG_CNTR_MASK1 0x238 338c2ecf20Sopenharmony_ci#define REG_CNTR_MASK0 0x23c 348c2ecf20Sopenharmony_ci#define REG_AUTH_SEG_CFG 0x300 358c2ecf20Sopenharmony_ci#define REG_AUTH_SEG_SIZE 0x304 368c2ecf20Sopenharmony_ci#define REG_AUTH_SEG_START 0x308 378c2ecf20Sopenharmony_ci#define REG_AUTH_IV0 0x310 388c2ecf20Sopenharmony_ci#define REG_AUTH_IV1 0x314 398c2ecf20Sopenharmony_ci#define REG_AUTH_IV2 0x318 408c2ecf20Sopenharmony_ci#define REG_AUTH_IV3 0x31c 418c2ecf20Sopenharmony_ci#define REG_AUTH_IV4 0x320 428c2ecf20Sopenharmony_ci#define REG_AUTH_IV5 0x324 438c2ecf20Sopenharmony_ci#define REG_AUTH_IV6 0x328 448c2ecf20Sopenharmony_ci#define REG_AUTH_IV7 0x32c 458c2ecf20Sopenharmony_ci#define REG_AUTH_IV8 0x330 468c2ecf20Sopenharmony_ci#define REG_AUTH_IV9 0x334 478c2ecf20Sopenharmony_ci#define REG_AUTH_IV10 0x338 488c2ecf20Sopenharmony_ci#define REG_AUTH_IV11 0x33c 498c2ecf20Sopenharmony_ci#define REG_AUTH_IV12 0x340 508c2ecf20Sopenharmony_ci#define REG_AUTH_IV13 0x344 518c2ecf20Sopenharmony_ci#define REG_AUTH_IV14 0x348 528c2ecf20Sopenharmony_ci#define REG_AUTH_IV15 0x34c 538c2ecf20Sopenharmony_ci#define REG_AUTH_INFO_NONCE0 0x350 548c2ecf20Sopenharmony_ci#define REG_AUTH_INFO_NONCE1 0x354 558c2ecf20Sopenharmony_ci#define REG_AUTH_INFO_NONCE2 0x358 568c2ecf20Sopenharmony_ci#define REG_AUTH_INFO_NONCE3 0x35c 578c2ecf20Sopenharmony_ci#define REG_AUTH_BYTECNT0 0x390 588c2ecf20Sopenharmony_ci#define REG_AUTH_BYTECNT1 0x394 598c2ecf20Sopenharmony_ci#define REG_AUTH_BYTECNT2 0x398 608c2ecf20Sopenharmony_ci#define REG_AUTH_BYTECNT3 0x39c 618c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC0 0x3a0 628c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC1 0x3a4 638c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC2 0x3a8 648c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC3 0x3ac 658c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC4 0x3b0 668c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC5 0x3b4 678c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC6 0x3b8 688c2ecf20Sopenharmony_ci#define REG_AUTH_EXP_MAC7 0x3bc 698c2ecf20Sopenharmony_ci#define REG_CONFIG 0x400 708c2ecf20Sopenharmony_ci#define REG_GOPROC_QC_KEY 0x1000 718c2ecf20Sopenharmony_ci#define REG_GOPROC_OEM_KEY 0x2000 728c2ecf20Sopenharmony_ci#define REG_ENCR_KEY0 0x3000 738c2ecf20Sopenharmony_ci#define REG_ENCR_KEY1 0x3004 748c2ecf20Sopenharmony_ci#define REG_ENCR_KEY2 0x3008 758c2ecf20Sopenharmony_ci#define REG_ENCR_KEY3 0x300c 768c2ecf20Sopenharmony_ci#define REG_ENCR_KEY4 0x3010 778c2ecf20Sopenharmony_ci#define REG_ENCR_KEY5 0x3014 788c2ecf20Sopenharmony_ci#define REG_ENCR_KEY6 0x3018 798c2ecf20Sopenharmony_ci#define REG_ENCR_KEY7 0x301c 808c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY0 0x3020 818c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY1 0x3024 828c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY2 0x3028 838c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY3 0x302c 848c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY4 0x3030 858c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY5 0x3034 868c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY6 0x3038 878c2ecf20Sopenharmony_ci#define REG_ENCR_XTS_KEY7 0x303c 888c2ecf20Sopenharmony_ci#define REG_AUTH_KEY0 0x3040 898c2ecf20Sopenharmony_ci#define REG_AUTH_KEY1 0x3044 908c2ecf20Sopenharmony_ci#define REG_AUTH_KEY2 0x3048 918c2ecf20Sopenharmony_ci#define REG_AUTH_KEY3 0x304c 928c2ecf20Sopenharmony_ci#define REG_AUTH_KEY4 0x3050 938c2ecf20Sopenharmony_ci#define REG_AUTH_KEY5 0x3054 948c2ecf20Sopenharmony_ci#define REG_AUTH_KEY6 0x3058 958c2ecf20Sopenharmony_ci#define REG_AUTH_KEY7 0x305c 968c2ecf20Sopenharmony_ci#define REG_AUTH_KEY8 0x3060 978c2ecf20Sopenharmony_ci#define REG_AUTH_KEY9 0x3064 988c2ecf20Sopenharmony_ci#define REG_AUTH_KEY10 0x3068 998c2ecf20Sopenharmony_ci#define REG_AUTH_KEY11 0x306c 1008c2ecf20Sopenharmony_ci#define REG_AUTH_KEY12 0x3070 1018c2ecf20Sopenharmony_ci#define REG_AUTH_KEY13 0x3074 1028c2ecf20Sopenharmony_ci#define REG_AUTH_KEY14 0x3078 1038c2ecf20Sopenharmony_ci#define REG_AUTH_KEY15 0x307c 1048c2ecf20Sopenharmony_ci 1058c2ecf20Sopenharmony_ci/* Register bits - REG_VERSION */ 1068c2ecf20Sopenharmony_ci#define CORE_STEP_REV_SHIFT 0 1078c2ecf20Sopenharmony_ci#define CORE_STEP_REV_MASK GENMASK(15, 0) 1088c2ecf20Sopenharmony_ci#define CORE_MINOR_REV_SHIFT 16 1098c2ecf20Sopenharmony_ci#define CORE_MINOR_REV_MASK GENMASK(23, 16) 1108c2ecf20Sopenharmony_ci#define CORE_MAJOR_REV_SHIFT 24 1118c2ecf20Sopenharmony_ci#define CORE_MAJOR_REV_MASK GENMASK(31, 24) 1128c2ecf20Sopenharmony_ci 1138c2ecf20Sopenharmony_ci/* Register bits - REG_STATUS */ 1148c2ecf20Sopenharmony_ci#define MAC_FAILED_SHIFT 31 1158c2ecf20Sopenharmony_ci#define DOUT_SIZE_AVAIL_SHIFT 26 1168c2ecf20Sopenharmony_ci#define DOUT_SIZE_AVAIL_MASK GENMASK(30, 26) 1178c2ecf20Sopenharmony_ci#define DIN_SIZE_AVAIL_SHIFT 21 1188c2ecf20Sopenharmony_ci#define DIN_SIZE_AVAIL_MASK GENMASK(25, 21) 1198c2ecf20Sopenharmony_ci#define HSD_ERR_SHIFT 20 1208c2ecf20Sopenharmony_ci#define ACCESS_VIOL_SHIFT 19 1218c2ecf20Sopenharmony_ci#define PIPE_ACTIVE_ERR_SHIFT 18 1228c2ecf20Sopenharmony_ci#define CFG_CHNG_ERR_SHIFT 17 1238c2ecf20Sopenharmony_ci#define DOUT_ERR_SHIFT 16 1248c2ecf20Sopenharmony_ci#define DIN_ERR_SHIFT 15 1258c2ecf20Sopenharmony_ci#define AXI_ERR_SHIFT 14 1268c2ecf20Sopenharmony_ci#define CRYPTO_STATE_SHIFT 10 1278c2ecf20Sopenharmony_ci#define CRYPTO_STATE_MASK GENMASK(13, 10) 1288c2ecf20Sopenharmony_ci#define ENCR_BUSY_SHIFT 9 1298c2ecf20Sopenharmony_ci#define AUTH_BUSY_SHIFT 8 1308c2ecf20Sopenharmony_ci#define DOUT_INTR_SHIFT 7 1318c2ecf20Sopenharmony_ci#define DIN_INTR_SHIFT 6 1328c2ecf20Sopenharmony_ci#define OP_DONE_INTR_SHIFT 5 1338c2ecf20Sopenharmony_ci#define ERR_INTR_SHIFT 4 1348c2ecf20Sopenharmony_ci#define DOUT_RDY_SHIFT 3 1358c2ecf20Sopenharmony_ci#define DIN_RDY_SHIFT 2 1368c2ecf20Sopenharmony_ci#define OPERATION_DONE_SHIFT 1 1378c2ecf20Sopenharmony_ci#define SW_ERR_SHIFT 0 1388c2ecf20Sopenharmony_ci 1398c2ecf20Sopenharmony_ci/* Register bits - REG_STATUS2 */ 1408c2ecf20Sopenharmony_ci#define AXI_EXTRA_SHIFT 1 1418c2ecf20Sopenharmony_ci#define LOCKED_SHIFT 2 1428c2ecf20Sopenharmony_ci 1438c2ecf20Sopenharmony_ci/* Register bits - REG_CONFIG */ 1448c2ecf20Sopenharmony_ci#define REQ_SIZE_SHIFT 17 1458c2ecf20Sopenharmony_ci#define REQ_SIZE_MASK GENMASK(20, 17) 1468c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_1_BEAT 0 1478c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_2_BEAT 1 1488c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_3_BEAT 2 1498c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_4_BEAT 3 1508c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_5_BEAT 4 1518c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_6_BEAT 5 1528c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_7_BEAT 6 1538c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_8_BEAT 7 1548c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_9_BEAT 8 1558c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_10_BEAT 9 1568c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_11_BEAT 10 1578c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_12_BEAT 11 1588c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_13_BEAT 12 1598c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_14_BEAT 13 1608c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_15_BEAT 14 1618c2ecf20Sopenharmony_ci#define REQ_SIZE_ENUM_16_BEAT 15 1628c2ecf20Sopenharmony_ci 1638c2ecf20Sopenharmony_ci#define MAX_QUEUED_REQ_SHIFT 14 1648c2ecf20Sopenharmony_ci#define MAX_QUEUED_REQ_MASK GENMASK(24, 16) 1658c2ecf20Sopenharmony_ci#define ENUM_1_QUEUED_REQS 0 1668c2ecf20Sopenharmony_ci#define ENUM_2_QUEUED_REQS 1 1678c2ecf20Sopenharmony_ci#define ENUM_3_QUEUED_REQS 2 1688c2ecf20Sopenharmony_ci 1698c2ecf20Sopenharmony_ci#define IRQ_ENABLES_SHIFT 10 1708c2ecf20Sopenharmony_ci#define IRQ_ENABLES_MASK GENMASK(13, 10) 1718c2ecf20Sopenharmony_ci 1728c2ecf20Sopenharmony_ci#define LITTLE_ENDIAN_MODE_SHIFT 9 1738c2ecf20Sopenharmony_ci#define PIPE_SET_SELECT_SHIFT 5 1748c2ecf20Sopenharmony_ci#define PIPE_SET_SELECT_MASK GENMASK(8, 5) 1758c2ecf20Sopenharmony_ci 1768c2ecf20Sopenharmony_ci#define HIGH_SPD_EN_N_SHIFT 4 1778c2ecf20Sopenharmony_ci#define MASK_DOUT_INTR_SHIFT 3 1788c2ecf20Sopenharmony_ci#define MASK_DIN_INTR_SHIFT 2 1798c2ecf20Sopenharmony_ci#define MASK_OP_DONE_INTR_SHIFT 1 1808c2ecf20Sopenharmony_ci#define MASK_ERR_INTR_SHIFT 0 1818c2ecf20Sopenharmony_ci 1828c2ecf20Sopenharmony_ci/* Register bits - REG_AUTH_SEG_CFG */ 1838c2ecf20Sopenharmony_ci#define COMP_EXP_MAC_SHIFT 24 1848c2ecf20Sopenharmony_ci#define COMP_EXP_MAC_DISABLED 0 1858c2ecf20Sopenharmony_ci#define COMP_EXP_MAC_ENABLED 1 1868c2ecf20Sopenharmony_ci 1878c2ecf20Sopenharmony_ci#define F9_DIRECTION_SHIFT 23 1888c2ecf20Sopenharmony_ci#define F9_DIRECTION_UPLINK 0 1898c2ecf20Sopenharmony_ci#define F9_DIRECTION_DOWNLINK 1 1908c2ecf20Sopenharmony_ci 1918c2ecf20Sopenharmony_ci#define AUTH_NONCE_NUM_WORDS_SHIFT 20 1928c2ecf20Sopenharmony_ci#define AUTH_NONCE_NUM_WORDS_MASK GENMASK(22, 20) 1938c2ecf20Sopenharmony_ci 1948c2ecf20Sopenharmony_ci#define USE_PIPE_KEY_AUTH_SHIFT 19 1958c2ecf20Sopenharmony_ci#define USE_HW_KEY_AUTH_SHIFT 18 1968c2ecf20Sopenharmony_ci#define AUTH_FIRST_SHIFT 17 1978c2ecf20Sopenharmony_ci#define AUTH_LAST_SHIFT 16 1988c2ecf20Sopenharmony_ci 1998c2ecf20Sopenharmony_ci#define AUTH_POS_SHIFT 14 2008c2ecf20Sopenharmony_ci#define AUTH_POS_MASK GENMASK(15, 14) 2018c2ecf20Sopenharmony_ci#define AUTH_POS_BEFORE 0 2028c2ecf20Sopenharmony_ci#define AUTH_POS_AFTER 1 2038c2ecf20Sopenharmony_ci 2048c2ecf20Sopenharmony_ci#define AUTH_SIZE_SHIFT 9 2058c2ecf20Sopenharmony_ci#define AUTH_SIZE_MASK GENMASK(13, 9) 2068c2ecf20Sopenharmony_ci#define AUTH_SIZE_SHA1 0 2078c2ecf20Sopenharmony_ci#define AUTH_SIZE_SHA256 1 2088c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_1_BYTES 0 2098c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_2_BYTES 1 2108c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_3_BYTES 2 2118c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_4_BYTES 3 2128c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_5_BYTES 4 2138c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_6_BYTES 5 2148c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_7_BYTES 6 2158c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_8_BYTES 7 2168c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_9_BYTES 8 2178c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_10_BYTES 9 2188c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_11_BYTES 10 2198c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_12_BYTES 11 2208c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_13_BYTES 12 2218c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_14_BYTES 13 2228c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_15_BYTES 14 2238c2ecf20Sopenharmony_ci#define AUTH_SIZE_ENUM_16_BYTES 15 2248c2ecf20Sopenharmony_ci 2258c2ecf20Sopenharmony_ci#define AUTH_MODE_SHIFT 6 2268c2ecf20Sopenharmony_ci#define AUTH_MODE_MASK GENMASK(8, 6) 2278c2ecf20Sopenharmony_ci#define AUTH_MODE_HASH 0 2288c2ecf20Sopenharmony_ci#define AUTH_MODE_HMAC 1 2298c2ecf20Sopenharmony_ci#define AUTH_MODE_CCM 0 2308c2ecf20Sopenharmony_ci#define AUTH_MODE_CMAC 1 2318c2ecf20Sopenharmony_ci 2328c2ecf20Sopenharmony_ci#define AUTH_KEY_SIZE_SHIFT 3 2338c2ecf20Sopenharmony_ci#define AUTH_KEY_SIZE_MASK GENMASK(5, 3) 2348c2ecf20Sopenharmony_ci#define AUTH_KEY_SZ_AES128 0 2358c2ecf20Sopenharmony_ci#define AUTH_KEY_SZ_AES256 2 2368c2ecf20Sopenharmony_ci 2378c2ecf20Sopenharmony_ci#define AUTH_ALG_SHIFT 0 2388c2ecf20Sopenharmony_ci#define AUTH_ALG_MASK GENMASK(2, 0) 2398c2ecf20Sopenharmony_ci#define AUTH_ALG_NONE 0 2408c2ecf20Sopenharmony_ci#define AUTH_ALG_SHA 1 2418c2ecf20Sopenharmony_ci#define AUTH_ALG_AES 2 2428c2ecf20Sopenharmony_ci#define AUTH_ALG_KASUMI 3 2438c2ecf20Sopenharmony_ci#define AUTH_ALG_SNOW3G 4 2448c2ecf20Sopenharmony_ci#define AUTH_ALG_ZUC 5 2458c2ecf20Sopenharmony_ci 2468c2ecf20Sopenharmony_ci/* Register bits - REG_ENCR_XTS_DU_SIZE */ 2478c2ecf20Sopenharmony_ci#define ENCR_XTS_DU_SIZE_SHIFT 0 2488c2ecf20Sopenharmony_ci#define ENCR_XTS_DU_SIZE_MASK GENMASK(19, 0) 2498c2ecf20Sopenharmony_ci 2508c2ecf20Sopenharmony_ci/* Register bits - REG_ENCR_SEG_CFG */ 2518c2ecf20Sopenharmony_ci#define F8_KEYSTREAM_ENABLE_SHIFT 17 2528c2ecf20Sopenharmony_ci#define F8_KEYSTREAM_DISABLED 0 2538c2ecf20Sopenharmony_ci#define F8_KEYSTREAM_ENABLED 1 2548c2ecf20Sopenharmony_ci 2558c2ecf20Sopenharmony_ci#define F8_DIRECTION_SHIFT 16 2568c2ecf20Sopenharmony_ci#define F8_DIRECTION_UPLINK 0 2578c2ecf20Sopenharmony_ci#define F8_DIRECTION_DOWNLINK 1 2588c2ecf20Sopenharmony_ci 2598c2ecf20Sopenharmony_ci#define USE_PIPE_KEY_ENCR_SHIFT 15 2608c2ecf20Sopenharmony_ci#define USE_PIPE_KEY_ENCR_ENABLED 1 2618c2ecf20Sopenharmony_ci#define USE_KEY_REGISTERS 0 2628c2ecf20Sopenharmony_ci 2638c2ecf20Sopenharmony_ci#define USE_HW_KEY_ENCR_SHIFT 14 2648c2ecf20Sopenharmony_ci#define USE_KEY_REG 0 2658c2ecf20Sopenharmony_ci#define USE_HW_KEY 1 2668c2ecf20Sopenharmony_ci 2678c2ecf20Sopenharmony_ci#define LAST_CCM_SHIFT 13 2688c2ecf20Sopenharmony_ci#define LAST_CCM_XFR 1 2698c2ecf20Sopenharmony_ci#define INTERM_CCM_XFR 0 2708c2ecf20Sopenharmony_ci 2718c2ecf20Sopenharmony_ci#define CNTR_ALG_SHIFT 11 2728c2ecf20Sopenharmony_ci#define CNTR_ALG_MASK GENMASK(12, 11) 2738c2ecf20Sopenharmony_ci#define CNTR_ALG_NIST 0 2748c2ecf20Sopenharmony_ci 2758c2ecf20Sopenharmony_ci#define ENCODE_SHIFT 10 2768c2ecf20Sopenharmony_ci 2778c2ecf20Sopenharmony_ci#define ENCR_MODE_SHIFT 6 2788c2ecf20Sopenharmony_ci#define ENCR_MODE_MASK GENMASK(9, 6) 2798c2ecf20Sopenharmony_ci#define ENCR_MODE_ECB 0 2808c2ecf20Sopenharmony_ci#define ENCR_MODE_CBC 1 2818c2ecf20Sopenharmony_ci#define ENCR_MODE_CTR 2 2828c2ecf20Sopenharmony_ci#define ENCR_MODE_XTS 3 2838c2ecf20Sopenharmony_ci#define ENCR_MODE_CCM 4 2848c2ecf20Sopenharmony_ci 2858c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_SHIFT 3 2868c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_MASK GENMASK(5, 3) 2878c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_DES 0 2888c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_3DES 1 2898c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_AES128 0 2908c2ecf20Sopenharmony_ci#define ENCR_KEY_SZ_AES256 2 2918c2ecf20Sopenharmony_ci 2928c2ecf20Sopenharmony_ci#define ENCR_ALG_SHIFT 0 2938c2ecf20Sopenharmony_ci#define ENCR_ALG_MASK GENMASK(2, 0) 2948c2ecf20Sopenharmony_ci#define ENCR_ALG_NONE 0 2958c2ecf20Sopenharmony_ci#define ENCR_ALG_DES 1 2968c2ecf20Sopenharmony_ci#define ENCR_ALG_AES 2 2978c2ecf20Sopenharmony_ci#define ENCR_ALG_KASUMI 4 2988c2ecf20Sopenharmony_ci#define ENCR_ALG_SNOW_3G 5 2998c2ecf20Sopenharmony_ci#define ENCR_ALG_ZUC 6 3008c2ecf20Sopenharmony_ci 3018c2ecf20Sopenharmony_ci/* Register bits - REG_GOPROC */ 3028c2ecf20Sopenharmony_ci#define GO_SHIFT 0 3038c2ecf20Sopenharmony_ci#define CLR_CNTXT_SHIFT 1 3048c2ecf20Sopenharmony_ci#define RESULTS_DUMP_SHIFT 2 3058c2ecf20Sopenharmony_ci 3068c2ecf20Sopenharmony_ci/* Register bits - REG_ENGINES_AVAIL */ 3078c2ecf20Sopenharmony_ci#define ENCR_AES_SEL_SHIFT 0 3088c2ecf20Sopenharmony_ci#define DES_SEL_SHIFT 1 3098c2ecf20Sopenharmony_ci#define ENCR_SNOW3G_SEL_SHIFT 2 3108c2ecf20Sopenharmony_ci#define ENCR_KASUMI_SEL_SHIFT 3 3118c2ecf20Sopenharmony_ci#define SHA_SEL_SHIFT 4 3128c2ecf20Sopenharmony_ci#define SHA512_SEL_SHIFT 5 3138c2ecf20Sopenharmony_ci#define AUTH_AES_SEL_SHIFT 6 3148c2ecf20Sopenharmony_ci#define AUTH_SNOW3G_SEL_SHIFT 7 3158c2ecf20Sopenharmony_ci#define AUTH_KASUMI_SEL_SHIFT 8 3168c2ecf20Sopenharmony_ci#define BAM_PIPE_SETS_SHIFT 9 3178c2ecf20Sopenharmony_ci#define BAM_PIPE_SETS_MASK GENMASK(12, 9) 3188c2ecf20Sopenharmony_ci#define AXI_WR_BEATS_SHIFT 13 3198c2ecf20Sopenharmony_ci#define AXI_WR_BEATS_MASK GENMASK(18, 13) 3208c2ecf20Sopenharmony_ci#define AXI_RD_BEATS_SHIFT 19 3218c2ecf20Sopenharmony_ci#define AXI_RD_BEATS_MASK GENMASK(24, 19) 3228c2ecf20Sopenharmony_ci#define ENCR_ZUC_SEL_SHIFT 26 3238c2ecf20Sopenharmony_ci#define AUTH_ZUC_SEL_SHIFT 27 3248c2ecf20Sopenharmony_ci#define ZUC_ENABLE_SHIFT 28 3258c2ecf20Sopenharmony_ci 3268c2ecf20Sopenharmony_ci#endif /* _REGS_V5_H_ */ 327