feat(efuse): Update efuse table for ESP32-H4

This commit is contained in:
Konstantin Kondrashov
2026-04-01 16:15:45 +03:00
parent 1c43172477
commit 8701705ec3
14 changed files with 1972 additions and 408 deletions
@@ -1,5 +1,5 @@
/*
* SPDX-FileCopyrightText: 2021-2025 Espressif Systems (Shanghai) CO LTD
* SPDX-FileCopyrightText: 2021-2026 Espressif Systems (Shanghai) CO LTD
*
* SPDX-License-Identifier: Apache-2.0
*/
@@ -189,8 +189,8 @@ TEST_CASE("Test esp_efuse_write_key for virt mode", "[efuse]")
purpose == ESP_EFUSE_KEY_PURPOSE_ECDSA_KEY ||
#endif
purpose == ESP_EFUSE_KEY_PURPOSE_XTS_AES_128_KEY)) {
printf("BLOCK9 can not have the %d purpose, use RESERVED instead\n", purpose);
purpose = ESP_EFUSE_KEY_PURPOSE_RESERVED;
printf("BLOCK9 can not have the %d purpose, use ESP_EFUSE_KEY_PURPOSE_USER instead\n", purpose);
purpose = ESP_EFUSE_KEY_PURPOSE_USER;
}
#endif // SOC_EFUSE_BLOCK9_KEY_PURPOSE_QUIRK
int id = num_key - EFUSE_BLK_KEY0;
@@ -198,6 +198,9 @@ TEST_CASE("Test esp_efuse_write_key for virt mode", "[efuse]")
test_write_key(num_key, purpose);
TEST_ASSERT_EQUAL(id, esp_efuse_count_unused_key_blocks());
if (num_key == EFUSE_BLK9 && purpose == ESP_EFUSE_KEY_PURPOSE_USER) {
continue; // Skip checking purpose for BLOCK9 if it is set to PURPOSE_USER due to the quirk, since there may be other purpose set in this block before.
}
esp_efuse_block_t key_block = EFUSE_BLK_KEY_MAX;
TEST_ASSERT_TRUE(esp_efuse_find_purpose(purpose, &key_block));
TEST_ASSERT_EQUAL(num_key, key_block);
@@ -223,7 +226,7 @@ TEST_CASE("Test 1 esp_efuse_write_key for FPGA", "[efuse]")
#if SOC_EFUSE_ECDSA_KEY
ESP_EFUSE_KEY_PURPOSE_ECDSA_KEY,
#else
ESP_EFUSE_KEY_PURPOSE_RESERVED,
ESP_EFUSE_KEY_PURPOSE_USER,
#endif
#ifdef SOC_EFUSE_XTS_AES_KEY_256
ESP_EFUSE_KEY_PURPOSE_XTS_AES_256_KEY_1,