1 /* 2 * SPDX-FileCopyrightText: 2020-2022 Espressif Systems (Shanghai) CO LTD 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #pragma once 8 9 #ifdef __cplusplus 10 extern "C" { 11 #endif 12 13 /** 14 * @brief Type of eFuse blocks 15 */ 16 typedef enum { 17 EFUSE_BLK0 = 0, /**< Number of eFuse BLOCK0. REPEAT_DATA */ 18 19 EFUSE_BLK1 = 1, /**< Number of eFuse BLOCK1. SYS_DATA_PART0 */ 20 EFUSE_BLK_SYS_DATA_PART0 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART0 */ 21 22 EFUSE_BLK2 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */ 23 EFUSE_BLK_SYS_DATA_PART1 = 2, /**< Number of eFuse BLOCK2. SYS_DATA_PART1 */ 24 25 EFUSE_BLK3 = 3, /**< Number of eFuse BLOCK3. KEY0. whole block */ 26 EFUSE_BLK_KEY0 = 3, /**< Number of eFuse BLOCK3. KEY0. whole block */ 27 EFUSE_BLK_SECURE_BOOT = 3, 28 EFUSE_BLK_KEY_MAX = 4, 29 30 EFUSE_BLK_MAX = 4, /**< Number of eFuse blocks */ 31 } esp_efuse_block_t; 32 33 /** 34 * @brief Type of coding scheme 35 */ 36 typedef enum { 37 EFUSE_CODING_SCHEME_NONE = 0, /**< None */ 38 EFUSE_CODING_SCHEME_RS = 3, /**< Reed-Solomon coding */ 39 } esp_efuse_coding_scheme_t; 40 41 /** 42 * @brief Type of key purposes (they are virtual because this chip has only fixed purposes for block) 43 */ 44 typedef enum { 45 ESP_EFUSE_KEY_PURPOSE_USER = 0, /**< whole BLOCK3 */ 46 ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY = 1, /**< FE uses the whole BLOCK3 (key is 256-bits) */ 47 ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY_DERIVED_FROM_128_EFUSE_BITS = 2, /**< FE uses lower 128-bits of BLOCK3 (key is 128-bits) */ 48 ESP_EFUSE_KEY_PURPOSE_SECURE_BOOT_V2 = 3, /**< SB uses higher 128-bits of BLOCK3 (key is 128-bits) */ 49 ESP_EFUSE_KEY_PURPOSE_MAX, /**< MAX PURPOSE */ 50 } esp_efuse_purpose_t; 51 52 #ifdef __cplusplus 53 } 54 #endif 55