From 37f58cf498f459d0d5878d764bb9e8c7b967f218 Mon Sep 17 00:00:00 2001 From: "igor.masar" Date: Wed, 15 Apr 2026 18:07:47 +0200 Subject: [PATCH] ci(usb/host): enable esp32s31 and esp32h4 for USB host examples Remove the temporary esp32s31 disable from usb/host build-test rules. Add esp32s31 and esp32h4 to the usb_host_msc and usb_host_lib pytest matrices. Keep the tests temp-skipped in CI until usb_host_flash_disk runners exist. --- examples/peripherals/.build-test-rules.yml | 3 --- examples/peripherals/usb/host/cdc/README.md | 4 ++-- examples/peripherals/usb/host/hid/README.md | 4 ++-- examples/peripherals/usb/host/msc/README.md | 4 ++-- .../usb/host/msc/pytest_usb_host_msc.py | 15 ++++++++++++--- .../peripherals/usb/host/usb_host_lib/README.md | 4 ++-- .../usb/host/usb_host_lib/pytest_usb_host_lib.py | 8 +++++--- examples/peripherals/usb/host/uvc/README.md | 4 ++-- ...nown_generate_test_child_pipeline_warnings.yml | 2 ++ 9 files changed, 29 insertions(+), 19 deletions(-) diff --git a/examples/peripherals/.build-test-rules.yml b/examples/peripherals/.build-test-rules.yml index f66c2f63299..de93cbb2285 100644 --- a/examples/peripherals/.build-test-rules.yml +++ b/examples/peripherals/.build-test-rules.yml @@ -835,9 +835,6 @@ examples/peripherals/usb/device/tusb_ncm: examples/peripherals/usb/host: disable: - if: SOC_USB_OTG_SUPPORTED != 1 - - if: IDF_TARGET == "esp32s31" - temporary: true - reason: USB host examples do not support esp32s31 yet disable_test: - if: IDF_TARGET not in ["esp32s3", "esp32p4"] temporary: true diff --git a/examples/peripherals/usb/host/cdc/README.md b/examples/peripherals/usb/host/cdc/README.md index 0f9ebde98bd..561e5c7c8bc 100644 --- a/examples/peripherals/usb/host/cdc/README.md +++ b/examples/peripherals/usb/host/cdc/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | # USB CDC Host Driver Example diff --git a/examples/peripherals/usb/host/hid/README.md b/examples/peripherals/usb/host/hid/README.md index e74add4485f..28f74d119c1 100644 --- a/examples/peripherals/usb/host/hid/README.md +++ b/examples/peripherals/usb/host/hid/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | # USB HID Class example This example implements a basic USB Host HID Class Driver, and demonstrates how to use the driver to communicate with USB HID devices (such as Keyboard and Mouse or both) on the ESP32-S2/S3. Currently, the example only supports the HID boot protocol which should be present on most USB Mouse and Keyboards. The example will continuously scan for the connection of any HID Mouse or Keyboard, and attempt to fetch HID reports from those devices once connected. To quit the example (and shut down the HID driver), users can GPIO0 to low (i.e., pressing the "Boot" button on most ESP dev kits). diff --git a/examples/peripherals/usb/host/msc/README.md b/examples/peripherals/usb/host/msc/README.md index 04c500ac938..87b5cc0b767 100644 --- a/examples/peripherals/usb/host/msc/README.md +++ b/examples/peripherals/usb/host/msc/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | # USB Mass Storage Class example diff --git a/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py b/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py index 5a4fda394a0..0b1f7e0dcda 100644 --- a/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py +++ b/examples/peripherals/usb/host/msc/pytest_usb_host_msc.py @@ -1,15 +1,24 @@ -# SPDX-FileCopyrightText: 2022-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2022-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.temp_skip_ci(targets=['esp32s2'], reason='lack of runners with usb_host_flash_disk tag') +@pytest.mark.temp_skip_ci( + targets=['esp32s2', 'esp32s31', 'esp32h4'], reason='lack of runners with usb_host_flash_disk tag' +) @pytest.mark.usb_host_flash_disk @idf_parametrize( 'config,target', - [('default', 'esp32s2'), ('default', 'esp32s3'), ('default', 'esp32p4'), ('esp32p4_psram', 'esp32p4')], + [ + ('default', 'esp32s2'), + ('default', 'esp32s3'), + ('default', 'esp32p4'), + ('esp32p4_psram', 'esp32p4'), + ('default', 'esp32s31'), + ('default', 'esp32h4'), + ], indirect=['config', 'target'], ) def test_usb_host_msc_example(dut: Dut) -> None: diff --git a/examples/peripherals/usb/host/usb_host_lib/README.md b/examples/peripherals/usb/host/usb_host_lib/README.md index 6ca21d3a177..9b96d291ebe 100644 --- a/examples/peripherals/usb/host/usb_host_lib/README.md +++ b/examples/peripherals/usb/host/usb_host_lib/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | # USB Host Library Example diff --git a/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py b/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py index b3907df7af3..a580e4dfaf1 100644 --- a/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py +++ b/examples/peripherals/usb/host/usb_host_lib/pytest_usb_host_lib.py @@ -1,13 +1,15 @@ -# SPDX-FileCopyrightText: 2024-2025 Espressif Systems (Shanghai) CO LTD +# SPDX-FileCopyrightText: 2024-2026 Espressif Systems (Shanghai) CO LTD # SPDX-License-Identifier: CC0-1.0 import pytest from pytest_embedded import Dut from pytest_embedded_idf.utils import idf_parametrize -@pytest.mark.temp_skip_ci(targets=['esp32s2'], reason='lack of runners with usb_host_flash_disk tag') +@pytest.mark.temp_skip_ci( + targets=['esp32s2', 'esp32s31', 'esp32h4'], reason='lack of runners with usb_host_flash_disk tag' +) @pytest.mark.usb_host_flash_disk -@idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4'], indirect=['target']) +@idf_parametrize('target', ['esp32s2', 'esp32s3', 'esp32p4', 'esp32s31', 'esp32h4'], indirect=['target']) def test_usb_host_lib_example(dut: Dut) -> None: # register client dut.expect_exact('CLASS: Registering Client') diff --git a/examples/peripherals/usb/host/uvc/README.md b/examples/peripherals/usb/host/uvc/README.md index 8b1f41aa38a..982cb6ddbb8 100644 --- a/examples/peripherals/usb/host/uvc/README.md +++ b/examples/peripherals/usb/host/uvc/README.md @@ -1,5 +1,5 @@ -| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | -| ----------------- | -------- | -------- | -------- | -------- | +| Supported Targets | ESP32-H4 | ESP32-P4 | ESP32-S2 | ESP32-S3 | ESP32-S31 | +| ----------------- | -------- | -------- | -------- | -------- | --------- | # USB Camera Example diff --git a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml index 05efc0b22fd..f2ad651ce26 100644 --- a/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml +++ b/tools/ci/dynamic_pipelines/templates/known_generate_test_child_pipeline_warnings.yml @@ -24,5 +24,7 @@ no_runner_tags: - esp32c6,jtag - esp32c61,jtag - esp32h2,jtag + - esp32h4,usb_host_flash_disk - esp32p4,jtag - esp32s2,usb_host_flash_disk + - esp32s31,usb_host_flash_disk