esp_efuse_table.c 37 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273747576777879808182838485868788899091929394959697989910010110210310410510610710810911011111211311411511611711811912012112212312412512612712812913013113213313413513613713813914014114214314414514614714814915015115215315415515615715815916016116216316416516616716816917017117217317417517617717817918018118218318418518618718818919019119219319419519619719819920020120220320420520620720820921021121221321421521621721821922022122222322422522622722822923023123223323423523623723823924024124224324424524624724824925025125225325425525625725825926026126226326426526626726826927027127227327427527627727827928028128228328428528628728828929029129229329429529629729829930030130230330430530630730830931031131231331431531631731831932032132232332432532632732832933033133233333433533633733833934034134234334434534634734834935035135235335435535635735835936036136236336436536636736836937037137237337437537637737837938038138238338438538638738838939039139239339439539639739839940040140240340440540640740840941041141241341441541641741841942042142242342442542642742842943043143243343443543643743843944044144244344444544644744844945045145245345445545645745845946046146246346446546646746846947047147247347447547647747847948048148248348448548648748848949049149249349449549649749849950050150250350450550650750850951051151251351451551651751851952052152252352452552652752852953053153253353453553653753853954054154254354454554654754854955055155255355455555655755855956056156256356456556656756856957057157257357457557657757857958058158258358458558658758858959059159259359459559659759859960060160260360460560660760860961061161261361461561661761861962062162262362462562662762862963063163263363463563663763863964064164264364464564664764864965065165265365465565665765865966066166266366466566666766866967067167267367467567667767867968068168268368468568668768868969069169269369469569669769869970070170270370470570670770870971071171271371471571671771871972072172272372472572672772872973073173273373473573673773873974074174274374474574674774874975075175275375475575675775875976076176276376476576676776876977077177277377477577677777877978078178278378478578678778878979079179279379479579679779879980080180280380480580680780880981081181281381481581681781881982082182282382482582682782882983083183283383483583683783883984084184284384484584684784884985085185285385485585685785885986086186286386486586686786886987087187287387487587687787887988088188288388488588688788888989089189289389489589689789889990090190290390490590690790890991091191291391491591691791891992092192292392492592692792892993093193293393493593693793893994094194294394494594694794894995095195295395495595695795895996096196296396496596696796896997097197297397497597697797897998098198298398498598698798898999099199299399499599699799899910001001100210031004100510061007100810091010101110121013101410151016101710181019102010211022102310241025102610271028102910301031103210331034103510361037103810391040104110421043104410451046104710481049105010511052105310541055105610571058105910601061106210631064106510661067106810691070107110721073107410751076107710781079108010811082108310841085108610871088108910901091109210931094109510961097109810991100110111021103110411051106110711081109111011111112111311141115111611171118111911201121112211231124112511261127112811291130113111321133113411351136113711381139114011411142114311441145114611471148114911501151115211531154115511561157115811591160116111621163116411651166116711681169117011711172117311741175117611771178117911801181118211831184118511861187118811891190119111921193119411951196119711981199120012011202120312041205120612071208120912101211121212131214121512161217121812191220122112221223122412251226122712281229123012311232123312341235123612371238123912401241124212431244124512461247124812491250125112521253125412551256125712581259126012611262126312641265
  1. /*
  2. * SPDX-FileCopyrightText: 2017-2022 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 87c5ae68b74dbafb114e14f6febff9e2
  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, 32}, // Write protection,
  17. };
  18. static const esp_efuse_desc_t WR_DIS_RD_DIS[] = {
  19. {EFUSE_BLK0, 0, 1}, // Write protection for RD_DIS_KEY0 RD_DIS_KEY1 RD_DIS_KEY2 RD_DIS_KEY3 RD_DIS_KEY4 RD_DIS_KEY5 RD_DIS_SYS_DATA_PART2,
  20. };
  21. static const esp_efuse_desc_t WR_DIS_GROUP_1[] = {
  22. {EFUSE_BLK0, 2, 1}, // Write protection for DIS_ICACHE DIS_DCACHE DIS_DOWNLOAD_ICACHE DIS_DOWNLOAD_DCACHE DIS_FORCE_DOWNLOAD DIS_USB DIS_CAN SOFT_DIS_JTAG HARD_DIS_JTAG DIS_DOWNLOAD_MANUAL_ENCRYPT,
  23. };
  24. static const esp_efuse_desc_t WR_DIS_GROUP_2[] = {
  25. {EFUSE_BLK0, 3, 1}, // Write protection for VDD_SPI_XPD VDD_SPI_TIEH VDD_SPI_FORCE VDD_SPI_INIT VDD_SPI_DCAP WDT_DELAY_SEL,
  26. };
  27. static const esp_efuse_desc_t WR_DIS_SPI_BOOT_CRYPT_CNT[] = {
  28. {EFUSE_BLK0, 4, 1}, // Write protection for SPI_BOOT_CRYPT_CNT,
  29. };
  30. static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_KEY_REVOKE0[] = {
  31. {EFUSE_BLK0, 5, 1}, // Write protection for SECURE_BOOT_KEY_REVOKE0,
  32. };
  33. static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_KEY_REVOKE1[] = {
  34. {EFUSE_BLK0, 6, 1}, // Write protection for SECURE_BOOT_KEY_REVOKE1,
  35. };
  36. static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_KEY_REVOKE2[] = {
  37. {EFUSE_BLK0, 7, 1}, // Write protection for SECURE_BOOT_KEY_REVOKE2,
  38. };
  39. static const esp_efuse_desc_t WR_DIS_KEY0_PURPOSE[] = {
  40. {EFUSE_BLK0, 8, 1}, // Write protection for key_purpose. KEY0,
  41. };
  42. static const esp_efuse_desc_t WR_DIS_KEY1_PURPOSE[] = {
  43. {EFUSE_BLK0, 9, 1}, // Write protection for key_purpose. KEY1,
  44. };
  45. static const esp_efuse_desc_t WR_DIS_KEY2_PURPOSE[] = {
  46. {EFUSE_BLK0, 10, 1}, // Write protection for key_purpose. KEY2,
  47. };
  48. static const esp_efuse_desc_t WR_DIS_KEY3_PURPOSE[] = {
  49. {EFUSE_BLK0, 11, 1}, // Write protection for key_purpose. KEY3,
  50. };
  51. static const esp_efuse_desc_t WR_DIS_KEY4_PURPOSE[] = {
  52. {EFUSE_BLK0, 12, 1}, // Write protection for key_purpose. KEY4,
  53. };
  54. static const esp_efuse_desc_t WR_DIS_KEY5_PURPOSE[] = {
  55. {EFUSE_BLK0, 13, 1}, // Write protection for key_purpose. KEY5,
  56. };
  57. static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_EN[] = {
  58. {EFUSE_BLK0, 15, 1}, // Write protection for SECURE_BOOT_EN,
  59. };
  60. static const esp_efuse_desc_t WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE[] = {
  61. {EFUSE_BLK0, 16, 1}, // Write protection for SECURE_BOOT_AGGRESSIVE_REVOKE,
  62. };
  63. static const esp_efuse_desc_t WR_DIS_GROUP_3[] = {
  64. {EFUSE_BLK0, 18, 1}, // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_DIRECT_BOOT DIS_USB_SERIAL_JTAG_ROM_PRINT DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION,
  65. };
  66. static const esp_efuse_desc_t WR_DIS_BLK1[] = {
  67. {EFUSE_BLK0, 20, 1}, // Write protection for EFUSE_BLK1. MAC_SPI_8M_SYS,
  68. };
  69. static const esp_efuse_desc_t WR_DIS_SYS_DATA_PART1[] = {
  70. {EFUSE_BLK0, 21, 1}, // Write protection for EFUSE_BLK2. SYS_DATA_PART1,
  71. };
  72. static const esp_efuse_desc_t WR_DIS_USER_DATA[] = {
  73. {EFUSE_BLK0, 22, 1}, // Write protection for EFUSE_BLK3. USER_DATA,
  74. };
  75. static const esp_efuse_desc_t WR_DIS_KEY0[] = {
  76. {EFUSE_BLK0, 23, 1}, // Write protection for EFUSE_BLK4. KEY0,
  77. };
  78. static const esp_efuse_desc_t WR_DIS_KEY1[] = {
  79. {EFUSE_BLK0, 24, 1}, // Write protection for EFUSE_BLK5. KEY1,
  80. };
  81. static const esp_efuse_desc_t WR_DIS_KEY2[] = {
  82. {EFUSE_BLK0, 25, 1}, // Write protection for EFUSE_BLK6. KEY2,
  83. };
  84. static const esp_efuse_desc_t WR_DIS_KEY3[] = {
  85. {EFUSE_BLK0, 26, 1}, // Write protection for EFUSE_BLK7. KEY3,
  86. };
  87. static const esp_efuse_desc_t WR_DIS_KEY4[] = {
  88. {EFUSE_BLK0, 27, 1}, // Write protection for EFUSE_BLK8. KEY4,
  89. };
  90. static const esp_efuse_desc_t WR_DIS_KEY5[] = {
  91. {EFUSE_BLK0, 28, 1}, // Write protection for EFUSE_BLK9. KEY5,
  92. };
  93. static const esp_efuse_desc_t WR_DIS_SYS_DATA_PART2[] = {
  94. {EFUSE_BLK0, 29, 1}, // Write protection for EFUSE_BLK10. SYS_DATA_PART2,
  95. };
  96. static const esp_efuse_desc_t WR_DIS_USB_EXCHG_PINS[] = {
  97. {EFUSE_BLK0, 30, 1}, // Write protection for USB_EXCHG_PINS,
  98. };
  99. static const esp_efuse_desc_t RD_DIS[] = {
  100. {EFUSE_BLK0, 32, 7}, // Read protection,
  101. };
  102. static const esp_efuse_desc_t RD_DIS_KEY0[] = {
  103. {EFUSE_BLK0, 32, 1}, // Read protection for EFUSE_BLK4. KEY0,
  104. };
  105. static const esp_efuse_desc_t RD_DIS_KEY1[] = {
  106. {EFUSE_BLK0, 33, 1}, // Read protection for EFUSE_BLK5. KEY1,
  107. };
  108. static const esp_efuse_desc_t RD_DIS_KEY2[] = {
  109. {EFUSE_BLK0, 34, 1}, // Read protection for EFUSE_BLK6. KEY2,
  110. };
  111. static const esp_efuse_desc_t RD_DIS_KEY3[] = {
  112. {EFUSE_BLK0, 35, 1}, // Read protection for EFUSE_BLK7. KEY3,
  113. };
  114. static const esp_efuse_desc_t RD_DIS_KEY4[] = {
  115. {EFUSE_BLK0, 36, 1}, // Read protection for EFUSE_BLK8. KEY4,
  116. };
  117. static const esp_efuse_desc_t RD_DIS_KEY5[] = {
  118. {EFUSE_BLK0, 37, 1}, // Read protection for EFUSE_BLK9. KEY5,
  119. };
  120. static const esp_efuse_desc_t RD_DIS_SYS_DATA_PART2[] = {
  121. {EFUSE_BLK0, 38, 1}, // Read protection for EFUSE_BLK10. SYS_DATA_PART2,
  122. };
  123. static const esp_efuse_desc_t DIS_ICACHE[] = {
  124. {EFUSE_BLK0, 40, 1}, // Disable Icache,
  125. };
  126. static const esp_efuse_desc_t DIS_DCACHE[] = {
  127. {EFUSE_BLK0, 41, 1}, // Disable Dcace,
  128. };
  129. static const esp_efuse_desc_t DIS_DOWNLOAD_ICACHE[] = {
  130. {EFUSE_BLK0, 42, 1}, // Disable Icache in download mode include boot_mode 0 1 2 3 6 7,
  131. };
  132. static const esp_efuse_desc_t DIS_DOWNLOAD_DCACHE[] = {
  133. {EFUSE_BLK0, 43, 1}, // Disable Dcache in download mode include boot_mode 0 1 2 3 6 7,
  134. };
  135. static const esp_efuse_desc_t DIS_FORCE_DOWNLOAD[] = {
  136. {EFUSE_BLK0, 44, 1}, // Disable force chip go to download mode function,
  137. };
  138. static const esp_efuse_desc_t DIS_USB[] = {
  139. {EFUSE_BLK0, 45, 1}, // Disable USB function,
  140. };
  141. static const esp_efuse_desc_t DIS_CAN[] = {
  142. {EFUSE_BLK0, 46, 1}, // Disable CAN function,
  143. };
  144. static const esp_efuse_desc_t DIS_APP_CPU[] = {
  145. {EFUSE_BLK0, 47, 1}, // Disables APP CPU,
  146. };
  147. static const esp_efuse_desc_t SOFT_DIS_JTAG[] = {
  148. {EFUSE_BLK0, 48, 3}, // Software disables JTAG by programming odd number of 1 bit(s). JTAG can be re-enabled via HMAC peripheral,
  149. };
  150. static const esp_efuse_desc_t HARD_DIS_JTAG[] = {
  151. {EFUSE_BLK0, 51, 1}, // Hardware disable jtag permanently disable jtag function,
  152. };
  153. static const esp_efuse_desc_t DIS_DOWNLOAD_MANUAL_ENCRYPT[] = {
  154. {EFUSE_BLK0, 52, 1}, // Disable flash encrypt function,
  155. };
  156. static const esp_efuse_desc_t USB_EXCHG_PINS[] = {
  157. {EFUSE_BLK0, 57, 1}, // Exchange D+ D- pins,
  158. };
  159. static const esp_efuse_desc_t USB_EXT_PHY_ENABLE[] = {
  160. {EFUSE_BLK0, 58, 1}, // Enable external PHY,
  161. };
  162. static const esp_efuse_desc_t BTLC_GPIO_ENABLE[] = {
  163. {EFUSE_BLK0, 59, 2}, // Enables BTLC GPIO,
  164. };
  165. static const esp_efuse_desc_t VDD_SPI_XPD[] = {
  166. {EFUSE_BLK0, 68, 1}, // VDD_SPI regulator power up,
  167. };
  168. static const esp_efuse_desc_t VDD_SPI_TIEH[] = {
  169. {EFUSE_BLK0, 69, 1}, // VDD_SPI regulator tie high to vdda,
  170. };
  171. static const esp_efuse_desc_t VDD_SPI_FORCE[] = {
  172. {EFUSE_BLK0, 70, 1}, // Force using eFuse configuration of VDD_SPI,
  173. };
  174. static const esp_efuse_desc_t WDT_DELAY_SEL[] = {
  175. {EFUSE_BLK0, 80, 2}, // Select RTC WDT time out threshold,
  176. };
  177. static const esp_efuse_desc_t SPI_BOOT_CRYPT_CNT[] = {
  178. {EFUSE_BLK0, 82, 3}, // SPI boot encrypt decrypt enable. odd number 1 enable. even number 1 disable,
  179. };
  180. static const esp_efuse_desc_t SECURE_BOOT_KEY_REVOKE0[] = {
  181. {EFUSE_BLK0, 85, 1}, // Enable revoke first secure boot key,
  182. };
  183. static const esp_efuse_desc_t SECURE_BOOT_KEY_REVOKE1[] = {
  184. {EFUSE_BLK0, 86, 1}, // Enable revoke second secure boot key,
  185. };
  186. static const esp_efuse_desc_t SECURE_BOOT_KEY_REVOKE2[] = {
  187. {EFUSE_BLK0, 87, 1}, // Enable revoke third secure boot key,
  188. };
  189. static const esp_efuse_desc_t KEY_PURPOSE_0[] = {
  190. {EFUSE_BLK0, 88, 4}, // Key0 purpose,
  191. };
  192. static const esp_efuse_desc_t KEY_PURPOSE_1[] = {
  193. {EFUSE_BLK0, 92, 4}, // Key1 purpose,
  194. };
  195. static const esp_efuse_desc_t KEY_PURPOSE_2[] = {
  196. {EFUSE_BLK0, 96, 4}, // Key2 purpose,
  197. };
  198. static const esp_efuse_desc_t KEY_PURPOSE_3[] = {
  199. {EFUSE_BLK0, 100, 4}, // Key3 purpose,
  200. };
  201. static const esp_efuse_desc_t KEY_PURPOSE_4[] = {
  202. {EFUSE_BLK0, 104, 4}, // Key4 purpose,
  203. };
  204. static const esp_efuse_desc_t KEY_PURPOSE_5[] = {
  205. {EFUSE_BLK0, 108, 4}, // Key5 purpose,
  206. };
  207. static const esp_efuse_desc_t SECURE_BOOT_EN[] = {
  208. {EFUSE_BLK0, 116, 1}, // Secure boot enable,
  209. };
  210. static const esp_efuse_desc_t SECURE_BOOT_AGGRESSIVE_REVOKE[] = {
  211. {EFUSE_BLK0, 117, 1}, // Enable aggressive secure boot revoke,
  212. };
  213. static const esp_efuse_desc_t DIS_USB_JTAG[] = {
  214. {EFUSE_BLK0, 118, 1}, // Set to disable usb_serial_jtag-to-jtag function,
  215. };
  216. static const esp_efuse_desc_t DIS_USB_SERIAL_JTAG[] = {
  217. {EFUSE_BLK0, 119, 1}, // Set to disable usb_serial_jtag module,
  218. };
  219. static const esp_efuse_desc_t STRAP_JTAG_SEL[] = {
  220. {EFUSE_BLK0, 120, 1}, // Enable selection between usb_to_jtag or pad_to_jtag through gpio10,
  221. };
  222. static const esp_efuse_desc_t USB_PHY_SEL[] = {
  223. {EFUSE_BLK0, 121, 1}, // Select internal/external PHY for USB OTG and usb_serial_jtag,
  224. };
  225. static const esp_efuse_desc_t FLASH_TPUW[] = {
  226. {EFUSE_BLK0, 124, 4}, // Flash wait time after power up. (unit is ms). When value is 15. the time is 30 ms,
  227. };
  228. static const esp_efuse_desc_t DIS_DOWNLOAD_MODE[] = {
  229. {EFUSE_BLK0, 128, 1}, // Disble download mode include boot_mode[3:0] is 0 1 2 3 6 7,
  230. };
  231. static const esp_efuse_desc_t DIS_DIRECT_BOOT[] = {
  232. {EFUSE_BLK0, 129, 1}, // Disable direct boot mode,
  233. };
  234. static const esp_efuse_desc_t DIS_USB_SERIAL_JTAG_ROM_PRINT[] = {
  235. {EFUSE_BLK0, 130, 1}, // Disable usb serial jtag print during rom boot,
  236. };
  237. static const esp_efuse_desc_t FLASH_ECC_MODE[] = {
  238. {EFUSE_BLK0, 131, 1}, // Configures the ECC mode for SPI flash. 0:16-byte to 18-byte mode. 1:16-byte to 17-byte mode,
  239. };
  240. static const esp_efuse_desc_t DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE[] = {
  241. {EFUSE_BLK0, 132, 1}, // Set this bit to disable download through USB-Serial-JTAG,
  242. };
  243. static const esp_efuse_desc_t ENABLE_SECURITY_DOWNLOAD[] = {
  244. {EFUSE_BLK0, 133, 1}, // Enable security download mode,
  245. };
  246. static const esp_efuse_desc_t UART_PRINT_CONTROL[] = {
  247. {EFUSE_BLK0, 134, 2}, // b00:force print. b01:control by GPIO46 - low level print. b10:control by GPIO46 - high level print. b11:force disable print.,
  248. };
  249. static const esp_efuse_desc_t PIN_POWER_SELECTION[] = {
  250. {EFUSE_BLK0, 136, 1}, // GPIO33-GPIO37 power supply selection in ROM code. 0:VDD3P3_CPU. 1:VDD_SPI.,
  251. };
  252. static const esp_efuse_desc_t FLASH_TYPE[] = {
  253. {EFUSE_BLK0, 137, 1}, // Connected Flash interface type. 0: 4 data line. 1: 8 data line,
  254. };
  255. static const esp_efuse_desc_t FLASH_PAGE_SIZE[] = {
  256. {EFUSE_BLK0, 138, 2}, // Sets the size of flash page,
  257. };
  258. static const esp_efuse_desc_t FLASH_ECC_EN[] = {
  259. {EFUSE_BLK0, 140, 1}, // Enables ECC in Flash boot mode,
  260. };
  261. static const esp_efuse_desc_t FORCE_SEND_RESUME[] = {
  262. {EFUSE_BLK0, 141, 1}, // Force ROM code to send a resume command during SPI boot,
  263. };
  264. static const esp_efuse_desc_t SECURE_VERSION[] = {
  265. {EFUSE_BLK0, 142, 16}, // Secure version for anti-rollback,
  266. };
  267. static const esp_efuse_desc_t DIS_USB_OTG_DOWNLOAD_MODE[] = {
  268. {EFUSE_BLK0, 159, 1}, // Set this bit to disable download through USB-OTG,
  269. };
  270. static const esp_efuse_desc_t DISABLE_WAFER_VERSION_MAJOR[] = {
  271. {EFUSE_BLK0, 160, 1}, // Disables check of wafer version major,
  272. };
  273. static const esp_efuse_desc_t DISABLE_BLK_VERSION_MAJOR[] = {
  274. {EFUSE_BLK0, 161, 1}, // Disables check of blk version major,
  275. };
  276. static const esp_efuse_desc_t MAC_FACTORY[] = {
  277. {EFUSE_BLK1, 40, 8}, // Factory MAC addr [0],
  278. {EFUSE_BLK1, 32, 8}, // Factory MAC addr [1],
  279. {EFUSE_BLK1, 24, 8}, // Factory MAC addr [2],
  280. {EFUSE_BLK1, 16, 8}, // Factory MAC addr [3],
  281. {EFUSE_BLK1, 8, 8}, // Factory MAC addr [4],
  282. {EFUSE_BLK1, 0, 8}, // Factory MAC addr [5],
  283. };
  284. static const esp_efuse_desc_t SPI_PAD_CONFIG_CLK[] = {
  285. {EFUSE_BLK1, 48, 6}, // SPI_PAD_configure CLK,
  286. };
  287. static const esp_efuse_desc_t SPI_PAD_CONFIG_Q_D1[] = {
  288. {EFUSE_BLK1, 54, 6}, // SPI_PAD_configure Q(D1),
  289. };
  290. static const esp_efuse_desc_t SPI_PAD_CONFIG_D_D0[] = {
  291. {EFUSE_BLK1, 60, 6}, // SPI_PAD_configure D(D0),
  292. };
  293. static const esp_efuse_desc_t SPI_PAD_CONFIG_CS[] = {
  294. {EFUSE_BLK1, 66, 6}, // SPI_PAD_configure CS,
  295. };
  296. static const esp_efuse_desc_t SPI_PAD_CONFIG_HD_D3[] = {
  297. {EFUSE_BLK1, 72, 6}, // SPI_PAD_configure HD(D3),
  298. };
  299. static const esp_efuse_desc_t SPI_PAD_CONFIG_WP_D2[] = {
  300. {EFUSE_BLK1, 78, 6}, // SPI_PAD_configure WP(D2),
  301. };
  302. static const esp_efuse_desc_t SPI_PAD_CONFIG_DQS[] = {
  303. {EFUSE_BLK1, 84, 6}, // SPI_PAD_configure DQS,
  304. };
  305. static const esp_efuse_desc_t SPI_PAD_CONFIG_D4[] = {
  306. {EFUSE_BLK1, 90, 6}, // SPI_PAD_configure D4,
  307. };
  308. static const esp_efuse_desc_t SPI_PAD_CONFIG_D5[] = {
  309. {EFUSE_BLK1, 96, 6}, // SPI_PAD_configure D5,
  310. };
  311. static const esp_efuse_desc_t SPI_PAD_CONFIG_D6[] = {
  312. {EFUSE_BLK1, 102, 6}, // SPI_PAD_configure D6,
  313. };
  314. static const esp_efuse_desc_t SPI_PAD_CONFIG_D7[] = {
  315. {EFUSE_BLK1, 108, 6}, // SPI_PAD_configure D7,
  316. };
  317. static const esp_efuse_desc_t WAFER_VERSION_MINOR[] = {
  318. {EFUSE_BLK1, 114, 3}, // WAFER_VERSION_MINOR least significant bits,
  319. {EFUSE_BLK1, 183, 1}, // WAFER_VERSION_MINOR most significant bit,
  320. };
  321. static const esp_efuse_desc_t PKG_VERSION[] = {
  322. {EFUSE_BLK1, 117, 3}, // Package version,
  323. };
  324. static const esp_efuse_desc_t BLK_VERSION_MINOR[] = {
  325. {EFUSE_BLK1, 120, 3}, // BLK_VERSION_MINOR,
  326. };
  327. static const esp_efuse_desc_t WAFER_VERSION_MAJOR[] = {
  328. {EFUSE_BLK1, 184, 2}, // WAFER_VERSION_MAJOR,
  329. };
  330. static const esp_efuse_desc_t ADC2_CAL_VOL_ATTEN3[] = {
  331. {EFUSE_BLK1, 186, 6}, // ADC2 calibration voltage at atten3,
  332. };
  333. static const esp_efuse_desc_t OPTIONAL_UNIQUE_ID[] = {
  334. {EFUSE_BLK2, 0, 128}, // Optional unique 128-bit ID,
  335. };
  336. static const esp_efuse_desc_t BLK_VERSION_MAJOR[] = {
  337. {EFUSE_BLK2, 128, 2}, // BLK_VERSION_MAJOR of BLOCK2 change of this bit means users need to update firmware,
  338. };
  339. static const esp_efuse_desc_t TEMP_CALIB[] = {
  340. {EFUSE_BLK2, 132, 9}, // Temperature calibration data,
  341. };
  342. static const esp_efuse_desc_t OCODE[] = {
  343. {EFUSE_BLK2, 141, 8}, // ADC OCode,
  344. };
  345. static const esp_efuse_desc_t ADC1_INIT_CODE_ATTEN0[] = {
  346. {EFUSE_BLK2, 149, 8}, // ADC1 init code at atten0,
  347. };
  348. static const esp_efuse_desc_t ADC1_INIT_CODE_ATTEN1[] = {
  349. {EFUSE_BLK2, 157, 6}, // ADC1 init code at atten1,
  350. };
  351. static const esp_efuse_desc_t ADC1_INIT_CODE_ATTEN2[] = {
  352. {EFUSE_BLK2, 163, 6}, // ADC1 init code at atten2,
  353. };
  354. static const esp_efuse_desc_t ADC1_INIT_CODE_ATTEN3[] = {
  355. {EFUSE_BLK2, 169, 6}, // ADC1 init code at atten3,
  356. };
  357. static const esp_efuse_desc_t ADC2_INIT_CODE_ATTEN0[] = {
  358. {EFUSE_BLK2, 175, 8}, // ADC2 init code at atten0,
  359. };
  360. static const esp_efuse_desc_t ADC2_INIT_CODE_ATTEN1[] = {
  361. {EFUSE_BLK2, 183, 6}, // ADC2 init code at atten1,
  362. };
  363. static const esp_efuse_desc_t ADC2_INIT_CODE_ATTEN2[] = {
  364. {EFUSE_BLK2, 189, 6}, // ADC2 init code at atten2,
  365. };
  366. static const esp_efuse_desc_t ADC2_INIT_CODE_ATTEN3[] = {
  367. {EFUSE_BLK2, 195, 6}, // ADC2 init code at atten3,
  368. };
  369. static const esp_efuse_desc_t ADC1_CAL_VOL_ATTEN0[] = {
  370. {EFUSE_BLK2, 201, 8}, // ADC1 calibration voltage at atten0,
  371. };
  372. static const esp_efuse_desc_t ADC1_CAL_VOL_ATTEN1[] = {
  373. {EFUSE_BLK2, 209, 8}, // ADC1 calibration voltage at atten1,
  374. };
  375. static const esp_efuse_desc_t ADC1_CAL_VOL_ATTEN2[] = {
  376. {EFUSE_BLK2, 217, 8}, // ADC1 calibration voltage at atten2,
  377. };
  378. static const esp_efuse_desc_t ADC1_CAL_VOL_ATTEN3[] = {
  379. {EFUSE_BLK2, 225, 8}, // ADC1 calibration voltage at atten3,
  380. };
  381. static const esp_efuse_desc_t ADC2_CAL_VOL_ATTEN0[] = {
  382. {EFUSE_BLK2, 233, 8}, // ADC2 calibration voltage at atten0,
  383. };
  384. static const esp_efuse_desc_t ADC2_CAL_VOL_ATTEN1[] = {
  385. {EFUSE_BLK2, 241, 7}, // ADC2 calibration voltage at atten1,
  386. };
  387. static const esp_efuse_desc_t ADC2_CAL_VOL_ATTEN2[] = {
  388. {EFUSE_BLK2, 248, 7}, // ADC2 calibration voltage at atten2,
  389. };
  390. static const esp_efuse_desc_t USER_DATA[] = {
  391. {EFUSE_BLK3, 0, 256}, // User data,
  392. };
  393. static const esp_efuse_desc_t USER_DATA_MAC_CUSTOM[] = {
  394. {EFUSE_BLK3, 200, 48}, // Custom MAC,
  395. };
  396. static const esp_efuse_desc_t KEY0[] = {
  397. {EFUSE_BLK4, 0, 256}, // Key0 or user data,
  398. };
  399. static const esp_efuse_desc_t KEY1[] = {
  400. {EFUSE_BLK5, 0, 256}, // Key1 or user data,
  401. };
  402. static const esp_efuse_desc_t KEY2[] = {
  403. {EFUSE_BLK6, 0, 256}, // Key2 or user data,
  404. };
  405. static const esp_efuse_desc_t KEY3[] = {
  406. {EFUSE_BLK7, 0, 256}, // Key3 or user data,
  407. };
  408. static const esp_efuse_desc_t KEY4[] = {
  409. {EFUSE_BLK8, 0, 256}, // Key4 or user data,
  410. };
  411. static const esp_efuse_desc_t KEY5[] = {
  412. {EFUSE_BLK9, 0, 256}, // Key5 or user data,
  413. };
  414. static const esp_efuse_desc_t SYS_DATA_PART2[] = {
  415. {EFUSE_BLK10, 0, 256}, // System configuration,
  416. };
  417. static const esp_efuse_desc_t K_RTC_LDO[] = {
  418. {EFUSE_BLK1, 141, 7}, // BLOCK1 K_RTC_LDO,
  419. };
  420. static const esp_efuse_desc_t K_DIG_LDO[] = {
  421. {EFUSE_BLK1, 148, 7}, // BLOCK1 K_DIG_LDO,
  422. };
  423. static const esp_efuse_desc_t V_RTC_DBIAS20[] = {
  424. {EFUSE_BLK1, 155, 8}, // BLOCK1 voltage of rtc dbias20,
  425. };
  426. static const esp_efuse_desc_t V_DIG_DBIAS20[] = {
  427. {EFUSE_BLK1, 163, 8}, // BLOCK1 voltage of digital dbias20,
  428. };
  429. static const esp_efuse_desc_t DIG_DBIAS_HVT[] = {
  430. {EFUSE_BLK1, 171, 5}, // BLOCK1 digital dbias when hvt,
  431. };
  432. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS[] = {
  433. &WR_DIS[0], // Write protection
  434. NULL
  435. };
  436. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_RD_DIS[] = {
  437. &WR_DIS_RD_DIS[0], // Write protection for RD_DIS_KEY0 RD_DIS_KEY1 RD_DIS_KEY2 RD_DIS_KEY3 RD_DIS_KEY4 RD_DIS_KEY5 RD_DIS_SYS_DATA_PART2
  438. NULL
  439. };
  440. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_1[] = {
  441. &WR_DIS_GROUP_1[0], // Write protection for DIS_ICACHE DIS_DCACHE DIS_DOWNLOAD_ICACHE DIS_DOWNLOAD_DCACHE DIS_FORCE_DOWNLOAD DIS_USB DIS_CAN SOFT_DIS_JTAG HARD_DIS_JTAG DIS_DOWNLOAD_MANUAL_ENCRYPT
  442. NULL
  443. };
  444. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_2[] = {
  445. &WR_DIS_GROUP_2[0], // Write protection for VDD_SPI_XPD VDD_SPI_TIEH VDD_SPI_FORCE VDD_SPI_INIT VDD_SPI_DCAP WDT_DELAY_SEL
  446. NULL
  447. };
  448. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SPI_BOOT_CRYPT_CNT[] = {
  449. &WR_DIS_SPI_BOOT_CRYPT_CNT[0], // Write protection for SPI_BOOT_CRYPT_CNT
  450. NULL
  451. };
  452. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_KEY_REVOKE0[] = {
  453. &WR_DIS_SECURE_BOOT_KEY_REVOKE0[0], // Write protection for SECURE_BOOT_KEY_REVOKE0
  454. NULL
  455. };
  456. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_KEY_REVOKE1[] = {
  457. &WR_DIS_SECURE_BOOT_KEY_REVOKE1[0], // Write protection for SECURE_BOOT_KEY_REVOKE1
  458. NULL
  459. };
  460. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_KEY_REVOKE2[] = {
  461. &WR_DIS_SECURE_BOOT_KEY_REVOKE2[0], // Write protection for SECURE_BOOT_KEY_REVOKE2
  462. NULL
  463. };
  464. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY0_PURPOSE[] = {
  465. &WR_DIS_KEY0_PURPOSE[0], // Write protection for key_purpose. KEY0
  466. NULL
  467. };
  468. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY1_PURPOSE[] = {
  469. &WR_DIS_KEY1_PURPOSE[0], // Write protection for key_purpose. KEY1
  470. NULL
  471. };
  472. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY2_PURPOSE[] = {
  473. &WR_DIS_KEY2_PURPOSE[0], // Write protection for key_purpose. KEY2
  474. NULL
  475. };
  476. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY3_PURPOSE[] = {
  477. &WR_DIS_KEY3_PURPOSE[0], // Write protection for key_purpose. KEY3
  478. NULL
  479. };
  480. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY4_PURPOSE[] = {
  481. &WR_DIS_KEY4_PURPOSE[0], // Write protection for key_purpose. KEY4
  482. NULL
  483. };
  484. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY5_PURPOSE[] = {
  485. &WR_DIS_KEY5_PURPOSE[0], // Write protection for key_purpose. KEY5
  486. NULL
  487. };
  488. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_EN[] = {
  489. &WR_DIS_SECURE_BOOT_EN[0], // Write protection for SECURE_BOOT_EN
  490. NULL
  491. };
  492. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE[] = {
  493. &WR_DIS_SECURE_BOOT_AGGRESSIVE_REVOKE[0], // Write protection for SECURE_BOOT_AGGRESSIVE_REVOKE
  494. NULL
  495. };
  496. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_GROUP_3[] = {
  497. &WR_DIS_GROUP_3[0], // Write protection for FLASH_TPUW DIS_DOWNLOAD_MODE DIS_DIRECT_BOOT DIS_USB_SERIAL_JTAG_ROM_PRINT DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE ENABLE_SECURITY_DOWNLOAD UART_PRINT_CONTROL PIN_POWER_SELECTION FLASH_TYPE FORCE_SEND_RESUME SECURE_VERSION
  498. NULL
  499. };
  500. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_BLK1[] = {
  501. &WR_DIS_BLK1[0], // Write protection for EFUSE_BLK1. MAC_SPI_8M_SYS
  502. NULL
  503. };
  504. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART1[] = {
  505. &WR_DIS_SYS_DATA_PART1[0], // Write protection for EFUSE_BLK2. SYS_DATA_PART1
  506. NULL
  507. };
  508. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_USER_DATA[] = {
  509. &WR_DIS_USER_DATA[0], // Write protection for EFUSE_BLK3. USER_DATA
  510. NULL
  511. };
  512. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY0[] = {
  513. &WR_DIS_KEY0[0], // Write protection for EFUSE_BLK4. KEY0
  514. NULL
  515. };
  516. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY1[] = {
  517. &WR_DIS_KEY1[0], // Write protection for EFUSE_BLK5. KEY1
  518. NULL
  519. };
  520. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY2[] = {
  521. &WR_DIS_KEY2[0], // Write protection for EFUSE_BLK6. KEY2
  522. NULL
  523. };
  524. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY3[] = {
  525. &WR_DIS_KEY3[0], // Write protection for EFUSE_BLK7. KEY3
  526. NULL
  527. };
  528. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY4[] = {
  529. &WR_DIS_KEY4[0], // Write protection for EFUSE_BLK8. KEY4
  530. NULL
  531. };
  532. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_KEY5[] = {
  533. &WR_DIS_KEY5[0], // Write protection for EFUSE_BLK9. KEY5
  534. NULL
  535. };
  536. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_SYS_DATA_PART2[] = {
  537. &WR_DIS_SYS_DATA_PART2[0], // Write protection for EFUSE_BLK10. SYS_DATA_PART2
  538. NULL
  539. };
  540. const esp_efuse_desc_t* ESP_EFUSE_WR_DIS_USB_EXCHG_PINS[] = {
  541. &WR_DIS_USB_EXCHG_PINS[0], // Write protection for USB_EXCHG_PINS
  542. NULL
  543. };
  544. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS[] = {
  545. &RD_DIS[0], // Read protection
  546. NULL
  547. };
  548. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY0[] = {
  549. &RD_DIS_KEY0[0], // Read protection for EFUSE_BLK4. KEY0
  550. NULL
  551. };
  552. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY1[] = {
  553. &RD_DIS_KEY1[0], // Read protection for EFUSE_BLK5. KEY1
  554. NULL
  555. };
  556. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY2[] = {
  557. &RD_DIS_KEY2[0], // Read protection for EFUSE_BLK6. KEY2
  558. NULL
  559. };
  560. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY3[] = {
  561. &RD_DIS_KEY3[0], // Read protection for EFUSE_BLK7. KEY3
  562. NULL
  563. };
  564. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY4[] = {
  565. &RD_DIS_KEY4[0], // Read protection for EFUSE_BLK8. KEY4
  566. NULL
  567. };
  568. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_KEY5[] = {
  569. &RD_DIS_KEY5[0], // Read protection for EFUSE_BLK9. KEY5
  570. NULL
  571. };
  572. const esp_efuse_desc_t* ESP_EFUSE_RD_DIS_SYS_DATA_PART2[] = {
  573. &RD_DIS_SYS_DATA_PART2[0], // Read protection for EFUSE_BLK10. SYS_DATA_PART2
  574. NULL
  575. };
  576. const esp_efuse_desc_t* ESP_EFUSE_DIS_ICACHE[] = {
  577. &DIS_ICACHE[0], // Disable Icache
  578. NULL
  579. };
  580. const esp_efuse_desc_t* ESP_EFUSE_DIS_DCACHE[] = {
  581. &DIS_DCACHE[0], // Disable Dcace
  582. NULL
  583. };
  584. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_ICACHE[] = {
  585. &DIS_DOWNLOAD_ICACHE[0], // Disable Icache in download mode include boot_mode 0 1 2 3 6 7
  586. NULL
  587. };
  588. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_DCACHE[] = {
  589. &DIS_DOWNLOAD_DCACHE[0], // Disable Dcache in download mode include boot_mode 0 1 2 3 6 7
  590. NULL
  591. };
  592. const esp_efuse_desc_t* ESP_EFUSE_DIS_FORCE_DOWNLOAD[] = {
  593. &DIS_FORCE_DOWNLOAD[0], // Disable force chip go to download mode function
  594. NULL
  595. };
  596. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB[] = {
  597. &DIS_USB[0], // Disable USB function
  598. NULL
  599. };
  600. const esp_efuse_desc_t* ESP_EFUSE_DIS_CAN[] = {
  601. &DIS_CAN[0], // Disable CAN function
  602. NULL
  603. };
  604. const esp_efuse_desc_t* ESP_EFUSE_DIS_APP_CPU[] = {
  605. &DIS_APP_CPU[0], // Disables APP CPU
  606. NULL
  607. };
  608. const esp_efuse_desc_t* ESP_EFUSE_SOFT_DIS_JTAG[] = {
  609. &SOFT_DIS_JTAG[0], // Software disables JTAG by programming odd number of 1 bit(s). JTAG can be re-enabled via HMAC peripheral
  610. NULL
  611. };
  612. const esp_efuse_desc_t* ESP_EFUSE_HARD_DIS_JTAG[] = {
  613. &HARD_DIS_JTAG[0], // Hardware disable jtag permanently disable jtag function
  614. NULL
  615. };
  616. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_MANUAL_ENCRYPT[] = {
  617. &DIS_DOWNLOAD_MANUAL_ENCRYPT[0], // Disable flash encrypt function
  618. NULL
  619. };
  620. const esp_efuse_desc_t* ESP_EFUSE_USB_EXCHG_PINS[] = {
  621. &USB_EXCHG_PINS[0], // Exchange D+ D- pins
  622. NULL
  623. };
  624. const esp_efuse_desc_t* ESP_EFUSE_USB_EXT_PHY_ENABLE[] = {
  625. &USB_EXT_PHY_ENABLE[0], // Enable external PHY
  626. NULL
  627. };
  628. const esp_efuse_desc_t* ESP_EFUSE_BTLC_GPIO_ENABLE[] = {
  629. &BTLC_GPIO_ENABLE[0], // Enables BTLC GPIO
  630. NULL
  631. };
  632. const esp_efuse_desc_t* ESP_EFUSE_VDD_SPI_XPD[] = {
  633. &VDD_SPI_XPD[0], // VDD_SPI regulator power up
  634. NULL
  635. };
  636. const esp_efuse_desc_t* ESP_EFUSE_VDD_SPI_TIEH[] = {
  637. &VDD_SPI_TIEH[0], // VDD_SPI regulator tie high to vdda
  638. NULL
  639. };
  640. const esp_efuse_desc_t* ESP_EFUSE_VDD_SPI_FORCE[] = {
  641. &VDD_SPI_FORCE[0], // Force using eFuse configuration of VDD_SPI
  642. NULL
  643. };
  644. const esp_efuse_desc_t* ESP_EFUSE_WDT_DELAY_SEL[] = {
  645. &WDT_DELAY_SEL[0], // Select RTC WDT time out threshold
  646. NULL
  647. };
  648. const esp_efuse_desc_t* ESP_EFUSE_SPI_BOOT_CRYPT_CNT[] = {
  649. &SPI_BOOT_CRYPT_CNT[0], // SPI boot encrypt decrypt enable. odd number 1 enable. even number 1 disable
  650. NULL
  651. };
  652. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_KEY_REVOKE0[] = {
  653. &SECURE_BOOT_KEY_REVOKE0[0], // Enable revoke first secure boot key
  654. NULL
  655. };
  656. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_KEY_REVOKE1[] = {
  657. &SECURE_BOOT_KEY_REVOKE1[0], // Enable revoke second secure boot key
  658. NULL
  659. };
  660. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_KEY_REVOKE2[] = {
  661. &SECURE_BOOT_KEY_REVOKE2[0], // Enable revoke third secure boot key
  662. NULL
  663. };
  664. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_0[] = {
  665. &KEY_PURPOSE_0[0], // Key0 purpose
  666. NULL
  667. };
  668. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_1[] = {
  669. &KEY_PURPOSE_1[0], // Key1 purpose
  670. NULL
  671. };
  672. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_2[] = {
  673. &KEY_PURPOSE_2[0], // Key2 purpose
  674. NULL
  675. };
  676. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_3[] = {
  677. &KEY_PURPOSE_3[0], // Key3 purpose
  678. NULL
  679. };
  680. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_4[] = {
  681. &KEY_PURPOSE_4[0], // Key4 purpose
  682. NULL
  683. };
  684. const esp_efuse_desc_t* ESP_EFUSE_KEY_PURPOSE_5[] = {
  685. &KEY_PURPOSE_5[0], // Key5 purpose
  686. NULL
  687. };
  688. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_EN[] = {
  689. &SECURE_BOOT_EN[0], // Secure boot enable
  690. NULL
  691. };
  692. const esp_efuse_desc_t* ESP_EFUSE_SECURE_BOOT_AGGRESSIVE_REVOKE[] = {
  693. &SECURE_BOOT_AGGRESSIVE_REVOKE[0], // Enable aggressive secure boot revoke
  694. NULL
  695. };
  696. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_JTAG[] = {
  697. &DIS_USB_JTAG[0], // Set to disable usb_serial_jtag-to-jtag function
  698. NULL
  699. };
  700. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_SERIAL_JTAG[] = {
  701. &DIS_USB_SERIAL_JTAG[0], // Set to disable usb_serial_jtag module
  702. NULL
  703. };
  704. const esp_efuse_desc_t* ESP_EFUSE_STRAP_JTAG_SEL[] = {
  705. &STRAP_JTAG_SEL[0], // Enable selection between usb_to_jtag or pad_to_jtag through gpio10
  706. NULL
  707. };
  708. const esp_efuse_desc_t* ESP_EFUSE_USB_PHY_SEL[] = {
  709. &USB_PHY_SEL[0], // Select internal/external PHY for USB OTG and usb_serial_jtag
  710. NULL
  711. };
  712. const esp_efuse_desc_t* ESP_EFUSE_FLASH_TPUW[] = {
  713. &FLASH_TPUW[0], // Flash wait time after power up. (unit is ms). When value is 15. the time is 30 ms
  714. NULL
  715. };
  716. const esp_efuse_desc_t* ESP_EFUSE_DIS_DOWNLOAD_MODE[] = {
  717. &DIS_DOWNLOAD_MODE[0], // Disble download mode include boot_mode[3:0] is 0 1 2 3 6 7
  718. NULL
  719. };
  720. const esp_efuse_desc_t* ESP_EFUSE_DIS_DIRECT_BOOT[] = {
  721. &DIS_DIRECT_BOOT[0], // Disable direct boot mode
  722. NULL
  723. };
  724. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_SERIAL_JTAG_ROM_PRINT[] = {
  725. &DIS_USB_SERIAL_JTAG_ROM_PRINT[0], // Disable usb serial jtag print during rom boot
  726. NULL
  727. };
  728. const esp_efuse_desc_t* ESP_EFUSE_FLASH_ECC_MODE[] = {
  729. &FLASH_ECC_MODE[0], // Configures the ECC mode for SPI flash. 0:16-byte to 18-byte mode. 1:16-byte to 17-byte mode
  730. NULL
  731. };
  732. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE[] = {
  733. &DIS_USB_SERIAL_JTAG_DOWNLOAD_MODE[0], // Set this bit to disable download through USB-Serial-JTAG
  734. NULL
  735. };
  736. const esp_efuse_desc_t* ESP_EFUSE_ENABLE_SECURITY_DOWNLOAD[] = {
  737. &ENABLE_SECURITY_DOWNLOAD[0], // Enable security download mode
  738. NULL
  739. };
  740. const esp_efuse_desc_t* ESP_EFUSE_UART_PRINT_CONTROL[] = {
  741. &UART_PRINT_CONTROL[0], // b00:force print. b01:control by GPIO46 - low level print. b10:control by GPIO46 - high level print. b11:force disable print.
  742. NULL
  743. };
  744. const esp_efuse_desc_t* ESP_EFUSE_PIN_POWER_SELECTION[] = {
  745. &PIN_POWER_SELECTION[0], // GPIO33-GPIO37 power supply selection in ROM code. 0:VDD3P3_CPU. 1:VDD_SPI.
  746. NULL
  747. };
  748. const esp_efuse_desc_t* ESP_EFUSE_FLASH_TYPE[] = {
  749. &FLASH_TYPE[0], // Connected Flash interface type. 0: 4 data line. 1: 8 data line
  750. NULL
  751. };
  752. const esp_efuse_desc_t* ESP_EFUSE_FLASH_PAGE_SIZE[] = {
  753. &FLASH_PAGE_SIZE[0], // Sets the size of flash page
  754. NULL
  755. };
  756. const esp_efuse_desc_t* ESP_EFUSE_FLASH_ECC_EN[] = {
  757. &FLASH_ECC_EN[0], // Enables ECC in Flash boot mode
  758. NULL
  759. };
  760. const esp_efuse_desc_t* ESP_EFUSE_FORCE_SEND_RESUME[] = {
  761. &FORCE_SEND_RESUME[0], // Force ROM code to send a resume command during SPI boot
  762. NULL
  763. };
  764. const esp_efuse_desc_t* ESP_EFUSE_SECURE_VERSION[] = {
  765. &SECURE_VERSION[0], // Secure version for anti-rollback
  766. NULL
  767. };
  768. const esp_efuse_desc_t* ESP_EFUSE_DIS_USB_OTG_DOWNLOAD_MODE[] = {
  769. &DIS_USB_OTG_DOWNLOAD_MODE[0], // Set this bit to disable download through USB-OTG
  770. NULL
  771. };
  772. const esp_efuse_desc_t* ESP_EFUSE_DISABLE_WAFER_VERSION_MAJOR[] = {
  773. &DISABLE_WAFER_VERSION_MAJOR[0], // Disables check of wafer version major
  774. NULL
  775. };
  776. const esp_efuse_desc_t* ESP_EFUSE_DISABLE_BLK_VERSION_MAJOR[] = {
  777. &DISABLE_BLK_VERSION_MAJOR[0], // Disables check of blk version major
  778. NULL
  779. };
  780. const esp_efuse_desc_t* ESP_EFUSE_MAC_FACTORY[] = {
  781. &MAC_FACTORY[0], // Factory MAC addr [0]
  782. &MAC_FACTORY[1], // Factory MAC addr [1]
  783. &MAC_FACTORY[2], // Factory MAC addr [2]
  784. &MAC_FACTORY[3], // Factory MAC addr [3]
  785. &MAC_FACTORY[4], // Factory MAC addr [4]
  786. &MAC_FACTORY[5], // Factory MAC addr [5]
  787. NULL
  788. };
  789. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_CLK[] = {
  790. &SPI_PAD_CONFIG_CLK[0], // SPI_PAD_configure CLK
  791. NULL
  792. };
  793. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_Q_D1[] = {
  794. &SPI_PAD_CONFIG_Q_D1[0], // SPI_PAD_configure Q(D1)
  795. NULL
  796. };
  797. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D_D0[] = {
  798. &SPI_PAD_CONFIG_D_D0[0], // SPI_PAD_configure D(D0)
  799. NULL
  800. };
  801. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_CS[] = {
  802. &SPI_PAD_CONFIG_CS[0], // SPI_PAD_configure CS
  803. NULL
  804. };
  805. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_HD_D3[] = {
  806. &SPI_PAD_CONFIG_HD_D3[0], // SPI_PAD_configure HD(D3)
  807. NULL
  808. };
  809. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_WP_D2[] = {
  810. &SPI_PAD_CONFIG_WP_D2[0], // SPI_PAD_configure WP(D2)
  811. NULL
  812. };
  813. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_DQS[] = {
  814. &SPI_PAD_CONFIG_DQS[0], // SPI_PAD_configure DQS
  815. NULL
  816. };
  817. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D4[] = {
  818. &SPI_PAD_CONFIG_D4[0], // SPI_PAD_configure D4
  819. NULL
  820. };
  821. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D5[] = {
  822. &SPI_PAD_CONFIG_D5[0], // SPI_PAD_configure D5
  823. NULL
  824. };
  825. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D6[] = {
  826. &SPI_PAD_CONFIG_D6[0], // SPI_PAD_configure D6
  827. NULL
  828. };
  829. const esp_efuse_desc_t* ESP_EFUSE_SPI_PAD_CONFIG_D7[] = {
  830. &SPI_PAD_CONFIG_D7[0], // SPI_PAD_configure D7
  831. NULL
  832. };
  833. const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MINOR[] = {
  834. &WAFER_VERSION_MINOR[0], // WAFER_VERSION_MINOR least significant bits
  835. &WAFER_VERSION_MINOR[1], // WAFER_VERSION_MINOR most significant bit
  836. NULL
  837. };
  838. const esp_efuse_desc_t* ESP_EFUSE_PKG_VERSION[] = {
  839. &PKG_VERSION[0], // Package version
  840. NULL
  841. };
  842. const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MINOR[] = {
  843. &BLK_VERSION_MINOR[0], // BLK_VERSION_MINOR
  844. NULL
  845. };
  846. const esp_efuse_desc_t* ESP_EFUSE_WAFER_VERSION_MAJOR[] = {
  847. &WAFER_VERSION_MAJOR[0], // WAFER_VERSION_MAJOR
  848. NULL
  849. };
  850. const esp_efuse_desc_t* ESP_EFUSE_ADC2_CAL_VOL_ATTEN3[] = {
  851. &ADC2_CAL_VOL_ATTEN3[0], // ADC2 calibration voltage at atten3
  852. NULL
  853. };
  854. const esp_efuse_desc_t* ESP_EFUSE_OPTIONAL_UNIQUE_ID[] = {
  855. &OPTIONAL_UNIQUE_ID[0], // Optional unique 128-bit ID
  856. NULL
  857. };
  858. const esp_efuse_desc_t* ESP_EFUSE_BLK_VERSION_MAJOR[] = {
  859. &BLK_VERSION_MAJOR[0], // BLK_VERSION_MAJOR of BLOCK2 change of this bit means users need to update firmware
  860. NULL
  861. };
  862. const esp_efuse_desc_t* ESP_EFUSE_TEMP_CALIB[] = {
  863. &TEMP_CALIB[0], // Temperature calibration data
  864. NULL
  865. };
  866. const esp_efuse_desc_t* ESP_EFUSE_OCODE[] = {
  867. &OCODE[0], // ADC OCode
  868. NULL
  869. };
  870. const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN0[] = {
  871. &ADC1_INIT_CODE_ATTEN0[0], // ADC1 init code at atten0
  872. NULL
  873. };
  874. const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN1[] = {
  875. &ADC1_INIT_CODE_ATTEN1[0], // ADC1 init code at atten1
  876. NULL
  877. };
  878. const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN2[] = {
  879. &ADC1_INIT_CODE_ATTEN2[0], // ADC1 init code at atten2
  880. NULL
  881. };
  882. const esp_efuse_desc_t* ESP_EFUSE_ADC1_INIT_CODE_ATTEN3[] = {
  883. &ADC1_INIT_CODE_ATTEN3[0], // ADC1 init code at atten3
  884. NULL
  885. };
  886. const esp_efuse_desc_t* ESP_EFUSE_ADC2_INIT_CODE_ATTEN0[] = {
  887. &ADC2_INIT_CODE_ATTEN0[0], // ADC2 init code at atten0
  888. NULL
  889. };
  890. const esp_efuse_desc_t* ESP_EFUSE_ADC2_INIT_CODE_ATTEN1[] = {
  891. &ADC2_INIT_CODE_ATTEN1[0], // ADC2 init code at atten1
  892. NULL
  893. };
  894. const esp_efuse_desc_t* ESP_EFUSE_ADC2_INIT_CODE_ATTEN2[] = {
  895. &ADC2_INIT_CODE_ATTEN2[0], // ADC2 init code at atten2
  896. NULL
  897. };
  898. const esp_efuse_desc_t* ESP_EFUSE_ADC2_INIT_CODE_ATTEN3[] = {
  899. &ADC2_INIT_CODE_ATTEN3[0], // ADC2 init code at atten3
  900. NULL
  901. };
  902. const esp_efuse_desc_t* ESP_EFUSE_ADC1_CAL_VOL_ATTEN0[] = {
  903. &ADC1_CAL_VOL_ATTEN0[0], // ADC1 calibration voltage at atten0
  904. NULL
  905. };
  906. const esp_efuse_desc_t* ESP_EFUSE_ADC1_CAL_VOL_ATTEN1[] = {
  907. &ADC1_CAL_VOL_ATTEN1[0], // ADC1 calibration voltage at atten1
  908. NULL
  909. };
  910. const esp_efuse_desc_t* ESP_EFUSE_ADC1_CAL_VOL_ATTEN2[] = {
  911. &ADC1_CAL_VOL_ATTEN2[0], // ADC1 calibration voltage at atten2
  912. NULL
  913. };
  914. const esp_efuse_desc_t* ESP_EFUSE_ADC1_CAL_VOL_ATTEN3[] = {
  915. &ADC1_CAL_VOL_ATTEN3[0], // ADC1 calibration voltage at atten3
  916. NULL
  917. };
  918. const esp_efuse_desc_t* ESP_EFUSE_ADC2_CAL_VOL_ATTEN0[] = {
  919. &ADC2_CAL_VOL_ATTEN0[0], // ADC2 calibration voltage at atten0
  920. NULL
  921. };
  922. const esp_efuse_desc_t* ESP_EFUSE_ADC2_CAL_VOL_ATTEN1[] = {
  923. &ADC2_CAL_VOL_ATTEN1[0], // ADC2 calibration voltage at atten1
  924. NULL
  925. };
  926. const esp_efuse_desc_t* ESP_EFUSE_ADC2_CAL_VOL_ATTEN2[] = {
  927. &ADC2_CAL_VOL_ATTEN2[0], // ADC2 calibration voltage at atten2
  928. NULL
  929. };
  930. const esp_efuse_desc_t* ESP_EFUSE_USER_DATA[] = {
  931. &USER_DATA[0], // User data
  932. NULL
  933. };
  934. const esp_efuse_desc_t* ESP_EFUSE_USER_DATA_MAC_CUSTOM[] = {
  935. &USER_DATA_MAC_CUSTOM[0], // Custom MAC
  936. NULL
  937. };
  938. const esp_efuse_desc_t* ESP_EFUSE_KEY0[] = {
  939. &KEY0[0], // Key0 or user data
  940. NULL
  941. };
  942. const esp_efuse_desc_t* ESP_EFUSE_KEY1[] = {
  943. &KEY1[0], // Key1 or user data
  944. NULL
  945. };
  946. const esp_efuse_desc_t* ESP_EFUSE_KEY2[] = {
  947. &KEY2[0], // Key2 or user data
  948. NULL
  949. };
  950. const esp_efuse_desc_t* ESP_EFUSE_KEY3[] = {
  951. &KEY3[0], // Key3 or user data
  952. NULL
  953. };
  954. const esp_efuse_desc_t* ESP_EFUSE_KEY4[] = {
  955. &KEY4[0], // Key4 or user data
  956. NULL
  957. };
  958. const esp_efuse_desc_t* ESP_EFUSE_KEY5[] = {
  959. &KEY5[0], // Key5 or user data
  960. NULL
  961. };
  962. const esp_efuse_desc_t* ESP_EFUSE_SYS_DATA_PART2[] = {
  963. &SYS_DATA_PART2[0], // System configuration
  964. NULL
  965. };
  966. const esp_efuse_desc_t* ESP_EFUSE_K_RTC_LDO[] = {
  967. &K_RTC_LDO[0], // BLOCK1 K_RTC_LDO
  968. NULL
  969. };
  970. const esp_efuse_desc_t* ESP_EFUSE_K_DIG_LDO[] = {
  971. &K_DIG_LDO[0], // BLOCK1 K_DIG_LDO
  972. NULL
  973. };
  974. const esp_efuse_desc_t* ESP_EFUSE_V_RTC_DBIAS20[] = {
  975. &V_RTC_DBIAS20[0], // BLOCK1 voltage of rtc dbias20
  976. NULL
  977. };
  978. const esp_efuse_desc_t* ESP_EFUSE_V_DIG_DBIAS20[] = {
  979. &V_DIG_DBIAS20[0], // BLOCK1 voltage of digital dbias20
  980. NULL
  981. };
  982. const esp_efuse_desc_t* ESP_EFUSE_DIG_DBIAS_HVT[] = {
  983. &DIG_DBIAS_HVT[0], // BLOCK1 digital dbias when hvt
  984. NULL
  985. };