mirror of
https://github.com/espressif/esp-idf.git
synced 2026-04-27 19:13:21 +00:00
docs(usb): add ESP32-H4 support notes and pin map
- usb_device: add esp32h4 DP/DM defaults (GPIO22/21) and "only:: esp32h4";
add H4 PHY considerations; add H4 MSC write-speed table; generalize MSC SD
note to {IDF_TARGET_NAME}; exclude tusb_ncm on H4
- usb_host: include esp32h4 in feature gates; add H4 PHY considerations
- usb_host_notes_dwc_otg: enable H4 by extending "only::" selector
- examples/usb: add ESP32-H4 row to DP/DM pin map
- docs_not_updated: drop H4 entries for usb_device, usb_host, and related
usb_host notes now covered
- soc(esp32h4): set internal PHY mapping to DP=22, DM=21
This commit is contained in:
@@ -28,8 +28,8 @@ static const usb_otg_signal_conn_t otg_signals = {
|
||||
};
|
||||
|
||||
static const usb_internal_phy_io_t internal_phy_io = {
|
||||
.dp = 21,
|
||||
.dm = 22,
|
||||
.dp = 22,
|
||||
.dm = 21,
|
||||
};
|
||||
|
||||
/* --------------------------------- Public --------------------------------- */
|
||||
|
||||
@@ -125,9 +125,7 @@ api-reference/peripherals/gptimer.rst
|
||||
api-reference/peripherals/sdio_slave.rst
|
||||
api-reference/peripherals/bitscrambler.rst
|
||||
api-reference/peripherals/temp_sensor.rst
|
||||
api-reference/peripherals/usb_device.rst
|
||||
api-reference/peripherals/jpeg.rst
|
||||
api-reference/peripherals/usb_host.rst
|
||||
api-reference/peripherals/camera_driver.rst
|
||||
api-reference/peripherals/adc_oneshot.rst
|
||||
api-reference/peripherals/sdspi_share.rst
|
||||
@@ -138,14 +136,6 @@ api-reference/peripherals/sdspi_host.rst
|
||||
api-reference/peripherals/vad.rst
|
||||
api-reference/peripherals/i2s.rst
|
||||
api-reference/peripherals/isp.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_usbh.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_ext_hub.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_arch.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_index.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_ext_port.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_design.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_enum.rst
|
||||
api-reference/peripherals/usb_host/usb_host_notes_dwc_otg.rst
|
||||
api-reference/peripherals/dedic_gpio.rst
|
||||
api-reference/peripherals/sd_pullup_requirements.rst
|
||||
api-reference/peripherals/parlio.rst
|
||||
|
||||
@@ -3,8 +3,8 @@ USB Device Stack
|
||||
|
||||
:link_to_translation:`zh_CN:[中文]`
|
||||
|
||||
{IDF_TARGET_USB_DP_GPIO_NUM:default="20"}
|
||||
{IDF_TARGET_USB_DM_GPIO_NUM:default="19"}
|
||||
{IDF_TARGET_USB_DP_GPIO_NUM:default="20", esp32h4="22"}
|
||||
{IDF_TARGET_USB_DM_GPIO_NUM:default="19", esp32h4="21"}
|
||||
{IDF_TARGET_USB_EP_NUM: default="6", esp32p4="15"}
|
||||
{IDF_TARGET_USB_EP_NUM_INOUT:default="5", esp32p4="8"}
|
||||
{IDF_TARGET_USB_EP_NUM_IN:default="1", esp32p4="7"}
|
||||
@@ -34,7 +34,7 @@ Features
|
||||
Hardware Connection
|
||||
-------------------
|
||||
|
||||
.. only:: esp32s2 or esp32s3
|
||||
.. only:: esp32s2 or esp32s3 or esp32h4
|
||||
|
||||
The {IDF_TARGET_NAME} routes the USB D+ and D- signals to GPIOs {IDF_TARGET_USB_DP_GPIO_NUM} and {IDF_TARGET_USB_DM_GPIO_NUM} respectively. For USB device functionality, these GPIOs should be connected to the bus in some way (e.g., via a Micro-B port, USB-C port, or directly to standard-A plug).
|
||||
|
||||
@@ -47,7 +47,7 @@ Hardware Connection
|
||||
:alt: Connection of an USB GPIOs directly to a USB standard-A plug
|
||||
:figclass: align-center
|
||||
|
||||
.. only:: esp32s2 or esp32s3
|
||||
.. only:: esp32s2 or esp32s3 or esp32h4
|
||||
|
||||
.. note::
|
||||
|
||||
@@ -406,7 +406,7 @@ This approach ensures that USB transactions remain fast while avoiding potential
|
||||
|
||||
.. note::
|
||||
|
||||
SD card support is not available for ESP32-S2 in MSC device mode.
|
||||
SD card support is not available for {IDF_TARGET_NAME} in MSC device mode.
|
||||
|
||||
**SPI Flash Performance:**
|
||||
|
||||
@@ -423,6 +423,27 @@ This approach ensures that USB transactions remain fast while avoiding potential
|
||||
* - 8192 B
|
||||
- 21.54 KB/s
|
||||
|
||||
.. only:: esp32h4
|
||||
|
||||
.. note::
|
||||
|
||||
SD card support is not available for {IDF_TARGET_NAME} in MSC device mode.
|
||||
|
||||
**SPI Flash Performance:**
|
||||
|
||||
.. list-table::
|
||||
:header-rows: 1
|
||||
:widths: 20 20
|
||||
|
||||
* - FIFO Size
|
||||
- Write Speed
|
||||
|
||||
* - 512 B
|
||||
- 4.48 KB/s
|
||||
|
||||
* - 8192 B
|
||||
- 22.33 KB/s
|
||||
|
||||
Performance Limitations:
|
||||
|
||||
- **Internal SPI Flash performance** is constrained by architectural limitations where program execution and storage access share the same flash chip. This results in program execution being **suspended during flash writes**, significantly impacting performance.
|
||||
@@ -444,6 +465,6 @@ The examples can be found in the directory :example:`peripherals/usb/device`.
|
||||
- :example:`peripherals/usb/device/tusb_msc` demonstrates how to use the USB capabilities to create a Mass Storage Device that can be recognized by USB-hosts, allowing access to its internal data storage, with support for SPI Flash and SD MMC Card storage media.
|
||||
- :example:`peripherals/usb/device/tusb_composite_msc_serialdevice` demonstrates how to set up {IDF_TARGET_NAME} to function simultaneously as both a USB Serial Device and an MSC device (SPI-Flash as the storage media) using the TinyUSB component.
|
||||
|
||||
.. only:: not esp32p4
|
||||
.. only:: not esp32p4 and not esp32h4
|
||||
|
||||
- :example:`peripherals/usb/device/tusb_ncm` demonstrates how to transmit Wi-Fi data to a Linux or Windows host via USB using the Network Control Model (NCM), a sub-class of Communication Device Class (CDC) USB Device for Ethernet-over-USB applications, with the help of a TinyUSB component.
|
||||
|
||||
@@ -29,7 +29,7 @@ The Host Library has the following features:
|
||||
|
||||
.. list::
|
||||
|
||||
:esp32s2 or esp32s3: - Supports Full Speed (FS) and Low Speed (LS) Devices.
|
||||
:esp32s2 or esp32s3 or esp32h4: - Supports Full Speed (FS) and Low Speed (LS) Devices.
|
||||
:esp32p4: - Supports High Speed (HS), Full Speed (FS) and Low Speed (LS) Devices.
|
||||
- Supports all four transfer types: Control, Bulk, Interrupt, and Isochronous.
|
||||
:esp32p4: - Supports High-Bandwidth Isochronous endpoints.
|
||||
|
||||
@@ -116,7 +116,7 @@ The DWC_OTG IP is configurable. The notable host related configurations of the {
|
||||
* - Only 4 periodic and 4 non-periodic transactions per microframe
|
||||
- ``OTG_NPERIO_TX_QUEUE_DEPTH = 4``, ``OTG_PERIO_TX_QUEUE_DEPTH = 4``
|
||||
|
||||
.. only:: esp32s2 or esp32s3
|
||||
.. only:: esp32s2 or esp32s3 or esp32h4
|
||||
|
||||
.. list-table:: {IDF_TARGET_NAME}'s DWC_OTG Configuration
|
||||
:widths: 70 30
|
||||
|
||||
@@ -24,5 +24,6 @@ ESP BOARD USB CONNECTOR (type A)
|
||||
| ESP32-S2/S3 | GPIO20 | GPIO19 |
|
||||
| ESP32-P4 2.0 | pin 50 | pin 49 |
|
||||
| ESP32-P4 1.1 | GPIO27 | GPIO26 |
|
||||
| ESP32-H4 | GPIO22 | GPIO21 |
|
||||
|
||||
> Note: On the ESP32-P4, the USB 2.0 PHY pins are dedicated to USB-OTG functionality and cannot be used as general-purpose GPIOs.
|
||||
|
||||
Reference in New Issue
Block a user