Skip to content

Conversation

@igi540
Copy link
Contributor

@igi540 igi540 commented Sep 16, 2025

…time:

  • tusb_option.h: define OPT_MCU_ESP32H4
  • tusb_mcu.h: enable DWC2 USBIP for H4
  • dcd_dwc2.c: add H4 USB_WRAP field aliases (wrap_* → legacy names)
  • dwc2_esp32.h: add H4 controller entry (FS base/IRQ, ep caps)
  • family.c: include H4 in USB init/PHY setup

Describe the PR
This PR add a support for the ESP32H4.

…time:

- tusb_option.h: define OPT_MCU_ESP32H4
- tusb_mcu.h: enable DWC2 USBIP for H4
- dcd_dwc2.c: add H4 USB_WRAP field aliases (wrap_* → legacy names)
- dwc2_esp32.h: add H4 controller entry (FS base/IRQ, ep caps)
- family.c: include H4 in USB init/PHY setup
@igi540 igi540 force-pushed the feat/esp32h4_support branch from 2198ee7 to 4182342 Compare September 16, 2025 10:40
@igi540 igi540 marked this pull request as ready for review September 16, 2025 10:41
Copilot AI review requested due to automatic review settings September 16, 2025 10:41
@igi540 igi540 marked this pull request as draft September 16, 2025 10:42
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the ESP32-H4 microcontroller to TinyUSB by integrating it into the existing DWC2 USB driver infrastructure. The ESP32-H4 is treated similarly to other ESP32 variants (S2, S3) that use the DWC2 USB controller.

  • Defines the new MCU option constant for ESP32-H4
  • Configures DWC2 USB controller parameters and register field mapping for H4
  • Enables H4 in USB initialization and PHY setup code paths

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 1 comment.

Show a summary per file
File Description
src/tusb_option.h Adds OPT_MCU_ESP32H4 constant definition
src/common/tusb_mcu.h Includes H4 in DWC2 USB IP configuration
src/portable/synopsys/dwc2/dwc2_esp32.h Adds H4-specific controller configuration and register field aliases
hw/bsp/espressif/boards/family.c Includes H4 in USB initialization conditional compilation blocks
README.rst Documents H4 support in the supported CPUs table

@igi540 igi540 marked this pull request as ready for review September 16, 2025 10:47
Copy link
Owner

@hathach hathach left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

look good, thank you

@hathach hathach merged commit d9ad09a into hathach:master Sep 16, 2025
110 of 111 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants