esp_efuse_table.c 11 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390
  1. /*
  2. * SPDX-FileCopyrightText: 2017-2021 Espressif Systems (Shanghai) CO LTD
  3. *
  4. * SPDX-License-Identifier: Apache-2.0
  5. */
  6. #include "sdkconfig.h"
  7. #include "esp_efuse.h"
  8. #include <assert.h>
  9. #include "esp_efuse_table.h"
  10. // md5_digest_table 3bf086fa10d850cbaeccbd70fcba1c2f
  11. // This file was generated from the file esp_efuse_table.csv. DO NOT CHANGE THIS FILE MANUALLY.
  12. // If you want to change some fields, you need to change esp_efuse_table.csv file
  13. // then run `efuse_common_table` or `efuse_custom_table` command it will generate this file.
  14. // To show efuse_table run the command 'show_efuse_table'.
  15. static const esp_efuse_desc_t WR_DIS[] = {
  16. {EFUSE_BLK0, 0, 8}, // Write protection,
  17. };
  18. static const esp_efuse_desc_t WR_DIS_KEY0_RD_DIS[] = {
  19. {EFUSE_BLK0, 0, 1}, // Write protection for KEY0_RD_DIS,
  20. };
  21. static const esp_efuse_desc_t WR_DIS_GROUP_1[] = {
  22. {EFUSE_BLK0, 1, 1}, // Write protection for WDT_DELAY DIS_PAD_JTAG,
  23. };
  24. static const esp_efuse_desc_t WR_DIS_GROUP_2[] = {
  25. {EFUSE_BLK0, 2, 1}, // Write protection for DOWNLOAD_DIS_MANUAL_ENCRYPT SPI_BOOT_ENCRYPT_DECRYPT_CNT XTS_KEY_LENGTH_256,
  26. };
  27. static const esp_efuse_desc_t WR_DIS_GROUP_3[] = {
  28. {EFUSE_BLK0, 3, 1}, // Write protection for UART_PRINT_CONTROL FORCE_SEND_RESUME DIS_DOWNLOAD_MODE DIS_DIRECT_BOOT ENABLE_SECURITY_DOWNLOAD FLASH_TPUW SECURE_BOOT_EN,
  29. };
  30. static const esp_efuse_desc_t WR_DIS_BLK0_RESERVED[] = {
  31. {EFUSE_BLK0, 4, 1}, // Write protection for BLK0_RESERVED,
  32. };
  33. static const esp_efuse_desc_t WR_DIS_SYS_DATA_PART0[] = {
  34. {EFUSE_BLK0, 5, 1}, // Write protection for EFUSE_BLK1. SYS_DATA_PART0,
  35. };
  36. static const esp_efuse_desc_t WR_DIS_SYS_DATA_PART1[] = {
  37. {EFUSE_BLK0, 6, 1}, // Write protection for EFUSE_BLK2. SYS_DATA_PART2,
  38. };
  39. static const esp_efuse_desc_t WR_DIS_KEY0[] = {
  40. {EFUSE_BLK0, 7, 1}, // Write protection for EFUSE_BLK3. KEY0,
  41. };
  42. static const esp_efuse_desc_t RD_DIS[] = {
  43. {EFUSE_BLK0, 8, 2}, // Read protection,
  44. };
  45. static const esp_efuse_desc_t RD_DIS_KEY0[] = {
  46. {EFUSE_BLK0, 32, 2}, // Read protection for EFUSE_BLK3. KEY0,
  47. };
  48. static const esp_efuse_desc_t WDT_DELAY_SEL[] = {
  49. {EFUSE_BLK0, 34, 2}, // /* TODO: Need Description*/,
  50. };
  51. static const esp_efuse_desc_t DIS_PAD_JTAG[] = {
  52. {EFUSE_BLK0, 36, 1}, // /* TODO: Need Description*/,
  53. };
  54. static const esp_efuse_desc_t EFUSE_DIS_DOWNLOAD_ICACHE[] = {
  55. {EFUSE_BLK0, 37, 1}, // /* TODO: Need Description*/,
  56. };
  57. static const esp_efuse_desc_t DIS_DOWNLOAD_MANUAL_ENCRYPT[] = {
  58. {EFUSE_BLK0, 38, 1}, // /* TODO: Need Description*/,
  59. };
  60. static const esp_efuse_desc_t SPI_BOOT_ENCRYPT_DECRYPT_CNT[] = {
  61. {EFUSE_BLK0, 39, 3}, // /* TODO: Need Description*/,
  62. };
  63. static const esp_efuse_desc_t XTS_KEY_LENGTH_256[] = {
  64. {EFUSE_BLK0, 42, 1}, // /* TODO: Need Description*/,
  65. };
  66. static const esp_efuse_desc_t UART_PRINT_CONTROL[] = {
  67. {EFUSE_BLK0, 43, 2}, // /* TODO: Need Description*/,
  68. };
  69. static const esp_efuse_desc_t FORCE_SEND_RESUME[] = {
  70. {EFUSE_BLK0, 45, 1}, // /* TODO: Need Description*/,
  71. };
  72. static const esp_efuse_desc_t DIS_DOWNLOAD_MODE[] = {
  73. {EFUSE_BLK0, 46, 1}, // /* TODO: Need Description*/,
  74. };
  75. static const esp_efuse_desc_t DIS_DIRECT_BOOT[] = {
  76. {EFUSE_BLK0, 47, 1}, // /* TODO: Need Description*/,
  77. };
  78. static const esp_efuse_desc_t ENABLE_SECURITY_DOWNLOAD[] = {
  79. {EFUSE_BLK0, 48, 1}, // /* TODO: Need Description*/,
  80. };
  81. static const esp_efuse_desc_t FLASH_TPUW[] = {
  82. {EFUSE_BLK0, 49, 4}, // /* TODO: Need Description*/,
  83. };
  84. static const esp_efuse_desc_t SECURE_BOOT_EN[] = {
  85. {EFUSE_BLK0, 53, 1}, // /* TODO: Need Description*/,
  86. };
  87. static const esp_efuse_desc_t SYSTEM_DATA0[] = {
  88. {EFUSE_BLK1, 0, 32}, // EFUSE_SYSTEM_DATA0,
  89. };
  90. static const esp_efuse_desc_t SYSTEM_DATA1[] = {
  91. {EFUSE_BLK1, 32, 32}, // EFUSE_SYSTEM_DATA1,
  92. };
  93. static const esp_efuse_desc_t SYSTEM_DATA2[] = {
  94. {EFUSE_BLK1, 64, 23}, // EFUSE_SYSTEM_DATA2,
  95. };
  96. static const esp_efuse_desc_t MAC_FACTORY[] = {
  97. {EFUSE_BLK2, 40, 8}, // Factory MAC addr [0],
  98. {EFUSE_BLK2, 32, 8}, // Factory MAC addr [1],
  99. {EFUSE_BLK2, 24, 8}, // Factory MAC addr [2],
  100. {EFUSE_BLK2, 16, 8}, // Factory MAC addr [3],
  101. {EFUSE_BLK2, 8, 8}, // Factory MAC addr [4],
  102. {EFUSE_BLK2, 0, 8}, // Factory MAC addr [5],
  103. };
  104. static const esp_efuse_desc_t WAFER_VERSION[] = {
  105. {EFUSE_BLK2, 48, 3}, // EFUSE_WAFER_VERSION,
  106. };
  107. static const esp_efuse_desc_t PKG_VERSION[] = {
  108. {EFUSE_BLK2, 51, 3}, // EFUSE_PKG_VERSION,
  109. };
  110. static const esp_efuse_desc_t BLOCK2_VERSION[] = {
  111. {EFUSE_BLK2, 54, 3}, // EFUSE_BLOCK2_VERSION,
  112. };
  113. static const esp_efuse_desc_t RF_REF_I_BIAS_CONFIG[] = {
  114. {EFUSE_BLK2, 57, 4}, // EFUSE_RF_REF_I_BIAS_CONFIG,
  115. };
  116. static const esp_efuse_desc_t LDO_VOL_BIAS_CONFIG_LOW[] = {
  117. {EFUSE_BLK2, 61, 3}, // EFUSE_LDO_VOL_BIAS_CONFIG_LOW,
  118. };
  119. static const esp_efuse_desc_t LDO_VOL_BIAS_CONFIG_HIGH[] = {
  120. {EFUSE_BLK2, 64, 27}, // EFUSE_LDO_VOL_BIAS_CONFIG_HIGH,
  121. };
  122. static const esp_efuse_desc_t PVT_LOW[] = {
  123. {EFUSE_BLK2, 91, 5}, // EFUSE_PVT_LOW,
  124. };
  125. static const esp_efuse_desc_t PVT_HIGH[] = {
  126. {EFUSE_BLK2, 96, 10}, // EFUSE_PVT_HIGH,
  127. };
  128. static const esp_efuse_desc_t ADC_CALIBRATION_0[] = {
  129. {EFUSE_BLK2, 106, 22}, // EFUSE_ADC_CALIBRATION_0,
  130. };
  131. static const esp_efuse_desc_t ADC_CALIBRATION_1[] = {
  132. {EFUSE_BLK2, 128, 32}, // EFUSE_ADC_CALIBRATION_1,
  133. };
  134. static const esp_efuse_desc_t ADC_CALIBRATION_2[] = {
  135. {EFUSE_BLK2, 160, 32}, // EFUSE_ADC_CALIBRATION_2,
  136. };
  137. static const esp_efuse_desc_t KEY0[] = {
  138. {EFUSE_BLK3, 0, 256}, // Key0 or user data,
  139. };
  140. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS[] = {
  141. &WR_DIS[0], // Write protection
  142. NULL
  143. };
  144. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY0_RD_DIS[] = {
  145. &WR_DIS_KEY0_RD_DIS[0], // Write protection for KEY0_RD_DIS
  146. NULL
  147. };
  148. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_1[] = {
  149. &WR_DIS_GROUP_1[0], // Write protection for WDT_DELAY DIS_PAD_JTAG
  150. NULL
  151. };
  152. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_2[] = {
  153. &WR_DIS_GROUP_2[0], // Write protection for DOWNLOAD_DIS_MANUAL_ENCRYPT SPI_BOOT_ENCRYPT_DECRYPT_CNT XTS_KEY_LENGTH_256
  154. NULL
  155. };
  156. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_3[] = {
  157. &WR_DIS_GROUP_3[0], // Write protection for UART_PRINT_CONTROL FORCE_SEND_RESUME DIS_DOWNLOAD_MODE DIS_DIRECT_BOOT ENABLE_SECURITY_DOWNLOAD FLASH_TPUW SECURE_BOOT_EN
  158. NULL
  159. };
  160. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK0_RESERVED[] = {
  161. &WR_DIS_BLK0_RESERVED[0], // Write protection for BLK0_RESERVED
  162. NULL
  163. };
  164. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART0[] = {
  165. &WR_DIS_SYS_DATA_PART0[0], // Write protection for EFUSE_BLK1. SYS_DATA_PART0
  166. NULL
  167. };
  168. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[] = {
  169. &WR_DIS_SYS_DATA_PART1[0], // Write protection for EFUSE_BLK2. SYS_DATA_PART2
  170. NULL
  171. };
  172. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY0[] = {
  173. &WR_DIS_KEY0[0], // Write protection for EFUSE_BLK3. KEY0
  174. NULL
  175. };
  176. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS[] = {
  177. &RD_DIS[0], // Read protection
  178. NULL
  179. };
  180. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY0[] = {
  181. &RD_DIS_KEY0[0], // Read protection for EFUSE_BLK3. KEY0
  182. NULL
  183. };
  184. const esp_efuse_desc_t* ESP_EFUSE_WDT_DELAY_SEL[] = {
  185. &WDT_DELAY_SEL[0], // /* TODO: Need Description*/
  186. NULL
  187. };
  188. const esp_efuse_desc_t* ESP_EFUSE_DIS_PAD_JTAG[] = {
  189. &DIS_PAD_JTAG[0], // /* TODO: Need Description*/
  190. NULL
  191. };
  192. const esp_efuse_desc_t* ESP_EFUSE_EFUSE_DIS_DOWNLOAD_ICACHE[] = {
  193. &EFUSE_DIS_DOWNLOAD_ICACHE[0], // /* TODO: Need Description*/
  194. NULL
  195. };
  196. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT[] = {
  197. &DIS_DOWNLOAD_MANUAL_ENCRYPT[0], // /* TODO: Need Description*/
  198. NULL
  199. };
  200. const esp_efuse_desc_t* ESP_EFUSE_SPI_BOOT_ENCRYPT_DECRYPT_CNT[] = {
  201. &SPI_BOOT_ENCRYPT_DECRYPT_CNT[0], // /* TODO: Need Description*/
  202. NULL
  203. };
  204. const esp_efuse_desc_t* ESP_EFUSE_XTS_KEY_LENGTH_256[] = {
  205. &XTS_KEY_LENGTH_256[0], // /* TODO: Need Description*/
  206. NULL
  207. };
  208. const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CONTROL[] = {
  209. &UART_PRINT_CONTROL[0], // /* TODO: Need Description*/
  210. NULL
  211. };
  212. const esp_efuse_desc_t* ESP_EFUSE_FORCE_SEND_RESUME[] = {
  213. &FORCE_SEND_RESUME[0], // /* TODO: Need Description*/
  214. NULL
  215. };
  216. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_MODE[] = {
  217. &DIS_DOWNLOAD_MODE[0], // /* TODO: Need Description*/
  218. NULL
  219. };
  220. const esp_efuse_desc_t* ESP_EFUSE_DIS_DIRECT_BOOT[] = {
  221. &DIS_DIRECT_BOOT[0], // /* TODO: Need Description*/
  222. NULL
  223. };
  224. const esp_efuse_desc_t* ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD[] = {
  225. &ENABLE_SECURITY_DOWNLOAD[0], // /* TODO: Need Description*/
  226. NULL
  227. };
  228. const esp_efuse_desc_t* ESP_EFUSE_FLASH_TPUW[] = {
  229. &FLASH_TPUW[0], // /* TODO: Need Description*/
  230. NULL
  231. };
  232. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_EN[] = {
  233. &SECURE_BOOT_EN[0], // /* TODO: Need Description*/
  234. NULL
  235. };
  236. const esp_efuse_desc_t* ESP_EFUSE_SYSTEM_DATA0[] = {
  237. &SYSTEM_DATA0[0], // EFUSE_SYSTEM_DATA0
  238. NULL
  239. };
  240. const esp_efuse_desc_t* ESP_EFUSE_SYSTEM_DATA1[] = {
  241. &SYSTEM_DATA1[0], // EFUSE_SYSTEM_DATA1
  242. NULL
  243. };
  244. const esp_efuse_desc_t* ESP_EFUSE_SYSTEM_DATA2[] = {
  245. &SYSTEM_DATA2[0], // EFUSE_SYSTEM_DATA2
  246. NULL
  247. };
  248. const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = {
  249. &MAC_FACTORY[0], // Factory MAC addr [0]
  250. &MAC_FACTORY[1], // Factory MAC addr [1]
  251. &MAC_FACTORY[2], // Factory MAC addr [2]
  252. &MAC_FACTORY[3], // Factory MAC addr [3]
  253. &MAC_FACTORY[4], // Factory MAC addr [4]
  254. &MAC_FACTORY[5], // Factory MAC addr [5]
  255. NULL
  256. };
  257. const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION[] = {
  258. &WAFER_VERSION[0], // EFUSE_WAFER_VERSION
  259. NULL
  260. };
  261. const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[] = {
  262. &PKG_VERSION[0], // EFUSE_PKG_VERSION
  263. NULL
  264. };
  265. const esp_efuse_desc_t* ESP_EFUSE_BLOCK2_VERSION[] = {
  266. &BLOCK2_VERSION[0], // EFUSE_BLOCK2_VERSION
  267. NULL
  268. };
  269. const esp_efuse_desc_t* ESP_EFUSE_RF_REF_I_BIAS_CONFIG[] = {
  270. &RF_REF_I_BIAS_CONFIG[0], // EFUSE_RF_REF_I_BIAS_CONFIG
  271. NULL
  272. };
  273. const esp_efuse_desc_t* ESP_EFUSE_LDO_VOL_BIAS_CONFIG_LOW[] = {
  274. &LDO_VOL_BIAS_CONFIG_LOW[0], // EFUSE_LDO_VOL_BIAS_CONFIG_LOW
  275. NULL
  276. };
  277. const esp_efuse_desc_t* ESP_EFUSE_LDO_VOL_BIAS_CONFIG_HIGH[] = {
  278. &LDO_VOL_BIAS_CONFIG_HIGH[0], // EFUSE_LDO_VOL_BIAS_CONFIG_HIGH
  279. NULL
  280. };
  281. const esp_efuse_desc_t* ESP_EFUSE_PVT_LOW[] = {
  282. &PVT_LOW[0], // EFUSE_PVT_LOW
  283. NULL
  284. };
  285. const esp_efuse_desc_t* ESP_EFUSE_PVT_HIGH[] = {
  286. &PVT_HIGH[0], // EFUSE_PVT_HIGH
  287. NULL
  288. };
  289. const esp_efuse_desc_t* ESP_EFUSE_ADC_CALIBRATION_0[] = {
  290. &ADC_CALIBRATION_0[0], // EFUSE_ADC_CALIBRATION_0
  291. NULL
  292. };
  293. const esp_efuse_desc_t* ESP_EFUSE_ADC_CALIBRATION_1[] = {
  294. &ADC_CALIBRATION_1[0], // EFUSE_ADC_CALIBRATION_1
  295. NULL
  296. };
  297. const esp_efuse_desc_t* ESP_EFUSE_ADC_CALIBRATION_2[] = {
  298. &ADC_CALIBRATION_2[0], // EFUSE_ADC_CALIBRATION_2
  299. NULL
  300. };
  301. const esp_efuse_desc_t* ESP_EFUSE_KEY0[] = {
  302. &KEY0[0], // Key0 or user data
  303. NULL
  304. };