esp_efuse_chip.h 1.8 KB

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