diff --git a/components/esp_driver_dma/test_apps/dma/pytest_dma.py b/components/esp_driver_dma/test_apps/dma/pytest_dma.py index a34597ef033..fa8b146d85d 100644 --- a/components/esp_driver_dma/test_apps/dma/pytest_dma.py +++ b/components/esp_driver_dma/test_apps/dma/pytest_dma.py @@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize from pytest_embedded_idf.utils import soc_filtered_targets +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) + + @pytest.mark.generic @pytest.mark.parametrize( 'config', @@ -63,36 +70,15 @@ def test_dma_weighted_arbitration(dut: Dut) -> None: dut.run_all_single_board_cases() -@pytest.mark.flash_encryption @pytest.mark.parametrize( - 'config', + 'config, target', [ - 'flash_enc', + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets( + 'SOC_GDMA_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1' + ) ], indirect=True, ) -@idf_parametrize( - 'target', - soc_filtered_targets( - 'SOC_GDMA_SUPPORTED == 1 and ' - 'SOC_PSRAM_DMA_CAPABLE == 1 and ' - 'SOC_FLASH_ENC_SUPPORTED == 1 and ' - 'IDF_TARGET not in ["esp32s3"]' - ), - indirect=['target'], -) def test_dma_flash_encryption(dut: Dut) -> None: dut.run_all_single_board_cases() - - -@pytest.mark.flash_encryption_f4r8 -@pytest.mark.parametrize( - 'config', - [ - 'flash_enc', - ], - indirect=True, -) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_dma_flash_encryption_s3_f4r8(dut: Dut) -> None: - dut.run_all_single_board_cases() diff --git a/components/esp_driver_i2s/test_apps/i2s/pytest_i2s.py b/components/esp_driver_i2s/test_apps/i2s/pytest_i2s.py index 19f2cb6c950..b5f74656e1d 100644 --- a/components/esp_driver_i2s/test_apps/i2s/pytest_i2s.py +++ b/components/esp_driver_i2s/test_apps/i2s/pytest_i2s.py @@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize from pytest_embedded_idf.utils import soc_filtered_targets +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) + + @pytest.mark.generic @pytest.mark.parametrize( 'config', @@ -78,36 +85,15 @@ def test_i2s_psram(dut: Dut) -> None: dut.run_all_single_board_cases() -@pytest.mark.flash_encryption_f4r8 @pytest.mark.parametrize( - 'config', + 'config, target', [ - 'flash_enc', + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets( + 'SOC_I2S_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1' + ) ], indirect=True, ) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_i2s_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.flash_encryption -@pytest.mark.parametrize( - 'config', - [ - 'flash_enc', - ], - indirect=True, -) -@idf_parametrize( - 'target', - soc_filtered_targets( - 'SOC_I2S_SUPPORTED == 1 and ' - 'SOC_PSRAM_DMA_CAPABLE == 1 and ' - 'SOC_FLASH_ENC_SUPPORTED == 1 and ' - 'IDF_TARGET not in ["esp32s3"]' - ), - indirect=['target'], -) def test_i2s_with_flash_encryption(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_rmt/test_apps/rmt/pytest_rmt.py b/components/esp_driver_rmt/test_apps/rmt/pytest_rmt.py index b40e9e439d9..8f0cd7eb2ff 100644 --- a/components/esp_driver_rmt/test_apps/rmt/pytest_rmt.py +++ b/components/esp_driver_rmt/test_apps/rmt/pytest_rmt.py @@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize from pytest_embedded_idf.utils import soc_filtered_targets +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) + + @pytest.mark.generic @pytest.mark.parametrize( 'config', @@ -65,31 +72,13 @@ def test_rmt_psram(dut: Dut) -> None: dut.run_all_single_board_cases() -@pytest.mark.flash_encryption_f4r8 @pytest.mark.parametrize( - 'config', + 'config, target', [ - 'flash_enc', + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets('SOC_RMT_SUPPORT_DMA == 1 and SOC_FLASH_ENC_SUPPORTED == 1') ], indirect=True, ) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_rmt_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.flash_encryption -@pytest.mark.parametrize( - 'config', - [ - 'flash_enc', - ], - indirect=True, -) -@idf_parametrize( - 'target', - soc_filtered_targets('SOC_RMT_SUPPORT_DMA == 1 and SOC_FLASH_ENC_SUPPORTED == 1 and IDF_TARGET not in ["esp32s3"]'), - indirect=['target'], -) def test_rmt_with_flash_encryption(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_driver_uart/test_apps/uhci/pytest_uhci.py b/components/esp_driver_uart/test_apps/uhci/pytest_uhci.py index 754db07424d..c5449f67494 100644 --- a/components/esp_driver_uart/test_apps/uhci/pytest_uhci.py +++ b/components/esp_driver_uart/test_apps/uhci/pytest_uhci.py @@ -3,6 +3,14 @@ import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize +from pytest_embedded_idf.utils import soc_filtered_targets + + +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) @pytest.mark.generic @@ -33,3 +41,17 @@ def test_uhci(dut: Dut) -> None: @idf_parametrize('target', ['esp32s3'], indirect=['target']) def test_uhci_psram_s3(dut: Dut) -> None: dut.run_all_single_board_cases() + + +@pytest.mark.parametrize( + 'config, target', + [ + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets( + 'SOC_UHCI_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1' + ) + ], + indirect=True, +) +def test_uhci_flash_encryption(dut: Dut) -> None: + dut.run_all_single_board_cases() diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.ci.flash_enc b/components/esp_driver_uart/test_apps/uhci/sdkconfig.ci.flash_enc new file mode 100644 index 00000000000..5be9651c381 --- /dev/null +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.ci.flash_enc @@ -0,0 +1,9 @@ +CONFIG_PARTITION_TABLE_OFFSET=0x9000 +CONFIG_SECURE_FLASH_ENC_ENABLED=y +CONFIG_SECURE_FLASH_ENCRYPTION_MODE_DEVELOPMENT=y +CONFIG_SECURE_BOOT_ALLOW_ROM_BASIC=y +CONFIG_SECURE_BOOT_ALLOW_JTAG=y +CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_ENC=y +CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_DEC=y +CONFIG_SECURE_FLASH_UART_BOOTLOADER_ALLOW_CACHE=y +CONFIG_SECURE_FLASH_REQUIRE_ALREADY_ENABLED=y diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c5 b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c5 index 5df612aa4fe..db575808cf9 100644 --- a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c5 +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c5 @@ -1,3 +1,2 @@ CONFIG_SPIRAM=y -CONFIG_SPIRAM_SPEED_80M=y CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c61 b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c61 new file mode 100644 index 00000000000..db575808cf9 --- /dev/null +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32c61 @@ -0,0 +1,2 @@ +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32h4 b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32h4 new file mode 100644 index 00000000000..db575808cf9 --- /dev/null +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32h4 @@ -0,0 +1,2 @@ +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32p4 b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32p4 new file mode 100644 index 00000000000..d2699b2221b --- /dev/null +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32p4 @@ -0,0 +1,3 @@ +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MODE_HEX=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 diff --git a/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32s31 b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32s31 new file mode 100644 index 00000000000..db575808cf9 --- /dev/null +++ b/components/esp_driver_uart/test_apps/uhci/sdkconfig.defaults.esp32s31 @@ -0,0 +1,2 @@ +CONFIG_SPIRAM=y +CONFIG_SPIRAM_MALLOC_ALWAYSINTERNAL=0 diff --git a/components/esp_lcd/test_apps/i80_lcd/pytest_i80_lcd.py b/components/esp_lcd/test_apps/i80_lcd/pytest_i80_lcd.py index 78511c2ffcf..4c39dc48e9d 100644 --- a/components/esp_lcd/test_apps/i80_lcd/pytest_i80_lcd.py +++ b/components/esp_lcd/test_apps/i80_lcd/pytest_i80_lcd.py @@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize from pytest_embedded_idf.utils import soc_filtered_targets +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) + + @pytest.mark.generic @pytest.mark.parametrize( 'config', @@ -19,36 +26,15 @@ def test_i80_lcd(dut: Dut) -> None: dut.run_all_single_board_cases() -@pytest.mark.flash_encryption_f4r8 @pytest.mark.parametrize( - 'config', + 'config, target', [ - 'flash_enc', + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets( + 'SOC_LCD_I80_SUPPORTED == 1 and SOC_PSRAM_DMA_CAPABLE == 1 and SOC_FLASH_ENC_SUPPORTED == 1' + ) ], indirect=True, ) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_i80_lcd_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.flash_encryption -@pytest.mark.parametrize( - 'config', - [ - 'flash_enc', - ], - indirect=True, -) -@idf_parametrize( - 'target', - soc_filtered_targets( - 'SOC_LCD_I80_SUPPORTED == 1 and ' - 'SOC_PSRAM_DMA_CAPABLE == 1 and ' - 'SOC_FLASH_ENC_SUPPORTED == 1 and ' - 'IDF_TARGET not in ["esp32s3"]' - ), - indirect=['target'], -) def test_i80_lcd_with_flash_encryption(dut: Dut) -> None: dut.run_all_single_board_cases() diff --git a/components/esp_lcd/test_apps/rgb_lcd/pytest_rgb_lcd.py b/components/esp_lcd/test_apps/rgb_lcd/pytest_rgb_lcd.py index 223cb8a31fd..9a836c8c2eb 100644 --- a/components/esp_lcd/test_apps/rgb_lcd/pytest_rgb_lcd.py +++ b/components/esp_lcd/test_apps/rgb_lcd/pytest_rgb_lcd.py @@ -6,6 +6,13 @@ from pytest_embedded_idf.utils import idf_parametrize from pytest_embedded_idf.utils import soc_filtered_targets +def get_flash_encryption_marks(target: str) -> tuple[pytest.MarkDecorator, ...]: + if target == 'esp32s3': + return (pytest.mark.flash_encryption_f4r8,) + + return (pytest.mark.flash_encryption,) + + @pytest.mark.octal_psram @pytest.mark.parametrize( 'config', @@ -38,33 +45,13 @@ def test_rgb_lcd(dut: Dut) -> None: dut.run_all_single_board_cases() -@pytest.mark.flash_encryption_f4r8 @pytest.mark.parametrize( - 'config', + 'config, target', [ - 'flash_enc', + pytest.param('flash_enc', target, marks=get_flash_encryption_marks(target)) + for target in soc_filtered_targets('SOC_LCD_RGB_SUPPORTED == 1 and SOC_FLASH_ENC_SUPPORTED == 1') ], indirect=True, ) -@idf_parametrize('target', ['esp32s3'], indirect=['target']) -def test_rgb_lcd_with_flash_encryption_esp32s3_f4r8(dut: Dut) -> None: - dut.run_all_single_board_cases() - - -@pytest.mark.flash_encryption -@pytest.mark.parametrize( - 'config', - [ - 'flash_enc', - ], - indirect=True, -) -@idf_parametrize( - 'target', - soc_filtered_targets( - 'SOC_LCD_RGB_SUPPORTED == 1 and SOC_FLASH_ENC_SUPPORTED == 1 and IDF_TARGET not in ["esp32s3"]' - ), - indirect=['target'], -) def test_rgb_lcd_with_flash_encryption(dut: Dut) -> None: dut.run_all_single_board_cases()