feat(usb): Add ESP32-S31 support in tinyusb#81
Conversation
|
@igi540 Apart from the current build errors related to S31 changes, there will be some run errors, same as in my older PR #77 I have finished another CI fix in #79 which corrects the current CI, just waiting for the CI to finish. |
f8134f5 to
3941223
Compare
3941223 to
ad9da55
Compare
Add ESP32-S31 as a supported MCU in TinyUSB and wire it into build/runtime, BSP, docs, examples, and CI. - Define OPT_MCU_ESP32S31 (911) with DWC2 HS-only, UTMI PHY, 16 endpoints - Add DWC2 controller entry (reg base 0x20300000, 4096 FIFO) - Exclude USB_WRAP peripheral (not present on S31) - Force high-speed mode for Port 0 in family.cmake - Enable CI builds for esp32s31 target - Update idf_component.yml, README, and changelog Also: - Fix missing TUP_MCU_MULTIPLE_CORE for ESP32-H4 - Remove unused tusb_family variable from CMakeLists.txt - Remove empty preprocessor guard block in family.c
ad9da55 to
04437f8
Compare
|
@igi540 LGTM, but please check the failing MSC example build in CI. It might be related to missing defaults for MSC buffer sizes https://github.com/espressif/esp-usb/blob/master/device/esp_tinyusb/Kconfig#L139 If the required fix is only in esp_tinyusb, we can merge this PR and continue working on esp_tinyusb |
Thanks for the review! All the CI build errors are caused by a single issue — the missing default value for I verified this locally by adding the appropriate default in Since the fix is only needed in esp_tinyusb, I agree we can merge this PR and address the Kconfig default separately. |
Description
Add ESP32-S31 as a supported MCU in TinyUSB. The S31 uses a DWC2 high-speed OTG controller with a UTMI PHY on Port 0 — unlike ESP32-P4 which has both FS (Port 0) and HS (Port 1) controllers, the S31 has a single HS-only port.
Changes
Core stack (
src/)OPT_MCU_ESP32S31(911) intusb_option.htusb_mcu.h: DWC2 HS, 16 endpoints, multi-core, slave/DMA toggledwc2_esp32.h(reg base0x20300000, 4096 FIFO,ETS_USB_OTGHS_INTR_SOURCE)usb_wrap_struct.hinclude andUSB_WRAPusage — S31 has no USB_WRAP peripheralUSB_PHY_TARGET_UTMIinstead ofUSB_PHY_TARGET_INTfor S31 PHY initBuild system
esp32s31target toidf_component.ymlesp32s31toOPT_MCU_ESP32S31in top-levelCMakeLists.txtOPT_MODE_HIGH_SPEEDfor S31 device/host port speed infamily.cmaketusb_familyvariable fromCMakeLists.txtBSP
OPT_MCU_ESP32S31to allTU_CHECK_MCUguard lists infamily.cCI
--disable-targets esp32s31frombuild_and_run_idf_examples.ymlandbuild_and_run_esp_usb_test_apps.ymlDocs
README.rstdocs/info/changelog.rstOther
TUP_MCU_MULTIPLE_COREdefinition for ESP32-H4