Skip to content

Conversation

@bugadani
Copy link
Contributor

C5 has a slightly different UART selector (single field contains UART ID instead of one bit per UART). PR marks UHCI support as a separate line in the readme.

@bugadani bugadani force-pushed the c5-uhci branch 2 times, most recently from 3fdac84 to c426a36 Compare February 12, 2026 07:45
@bugadani
Copy link
Contributor Author

/hil esp32c5

@bugadani bugadani marked this pull request as ready for review February 12, 2026 16:11
Copilot AI review requested due to automatic review settings February 12, 2026 16:11
@github-actions
Copy link

github-actions bot commented Feb 12, 2026

Triggered HIL run for #4967 (chips: esp32c5).

Run: https://github.com/esp-rs/esp-hal/actions/runs/21954484302

Status update: ✅ HIL (per-chip) run succeeded.

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

Enables UHCI support for ESP32-C5 by adding UHCI device metadata (including C5’s combined UART selector field behavior) and updating the HAL/test gating to use a new uhci_driver_supported cfg.

Changes:

  • Add UHCI driver metadata + per-chip support status, including a C5-specific combined_uart_selector_field property.
  • Extend for_each_uart! metadata to include a numeric UART ID and update UHCI UART-selection logic to use either bitflags or a combined selector field depending on chip cfg.
  • Enable the UHCI0 peripheral/clock on ESP32-C5 and adjust HIL UART test gating to the new UHCI driver cfg.

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
hil-test/src/bin/uart.rs Gates UHCI HIL tests on uhci_driver_supported.
esp-metadata/src/cfg/uart.rs Adds $id:literal (enumerated index) to for_each_uart! token list + docs.
esp-metadata/src/cfg.rs Introduces UhciProperties config group and property schema.
esp-metadata/devices/esp32s3.toml Adds [device.uhci] support status.
esp-metadata/devices/esp32s2.toml Adds [device.uhci] support status.
esp-metadata/devices/esp32h2.toml Adds [device.uhci] support status.
esp-metadata/devices/esp32c6.toml Adds [device.uhci] support status.
esp-metadata/devices/esp32c5.toml Enables UHCI0 peripheral + clock node; adds [device.uhci] with C5 selector property.
esp-metadata/devices/esp32c3.toml Adds [device.uhci] support status.
esp-metadata/devices/esp32.toml Adds [device.uhci] support status.
esp-metadata-generated/src/_generated_esp32s3.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_generated_esp32s2.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_generated_esp32h2.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_generated_esp32c6.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_generated_esp32c5.rs Adds UHCI peripheral/clock plumbing + properties + updated for_each_uart!.
esp-metadata-generated/src/_generated_esp32c3.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_generated_esp32c2.rs Regenerates for_each_uart! signature including $id (no UHCI properties).
esp-metadata-generated/src/_generated_esp32.rs Regenerates properties + for_each_uart! signature including $id.
esp-metadata-generated/src/_build_script_utils.rs Emits new cfgs (uhci_driver_supported, soc_has_uhci0, uhci_combined_uart_selector_field).
esp-hal/src/uart/uhci.rs Updates UART selection logic to handle combined selector field via cfg.
esp-hal/src/uart/mod.rs Moves UHCI module behind unstable_driver! + #[cfg(uhci_driver_supported)]; updates for_each_uart! matcher signature.
esp-hal/src/lib.rs Re-exports unstable_driver macro for use as crate::unstable_driver!.
esp-hal/src/dma/mod.rs Adjusts expect(dead_code) cfg for DmaTxFuture::new.
esp-hal/README.md Updates machine-generated peripheral support table to include UHCI (currently mislabeled).
esp-hal/CHANGELOG.md Adds PR reference to “C5: Initial UART support” entry.

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.

1 participant