|
| 1 | +# Copyright (c) 2025 Espressif Systems (Shanghai) Co., Ltd. |
| 2 | +# SPDX-License-Identifier: Apache-2.0 |
| 3 | + |
| 4 | +config UHC_DWC2 |
| 5 | + bool "UHC DWC2 USB device controller driver" |
| 6 | + default n |
| 7 | + depends on DT_HAS_SNPS_DWC2_ENABLED |
| 8 | + select UHC_DRIVER_HAS_HIGH_SPEED_SUPPORT |
| 9 | + select EVENTS |
| 10 | + help |
| 11 | + DWC2 USB host controller driver. |
| 12 | + |
| 13 | +config UHC_DWC2_DMA |
| 14 | + bool "UHC DWC2 USB DMA support" |
| 15 | + default n |
| 16 | + depends on UHC_DWC2 |
| 17 | + help |
| 18 | + Enable Buffer DMA if DWC2 USB controller supports Internal DMA. |
| 19 | + |
| 20 | +config UHC_DWC2_STACK_SIZE |
| 21 | + int "UHC DWC2 driver internal thread stack size" |
| 22 | + depends on UHC_DWC2 |
| 23 | + default 512 |
| 24 | + help |
| 25 | + DWC2 driver internal thread stack size. |
| 26 | + |
| 27 | +config UHC_DWC2_THREAD_PRIORITY |
| 28 | + int "UDC DWC2 driver thread priority" |
| 29 | + depends on UHC_DWC2 |
| 30 | + default 8 |
| 31 | + help |
| 32 | + DWC2 driver thread priority. |
| 33 | + |
| 34 | +menu "Root Hub configuration" |
| 35 | + |
| 36 | + config UHC_DWC2_PORT_DEBOUNCE_DELAY_MS |
| 37 | + int "Debounce delay in ms" |
| 38 | + default 250 |
| 39 | + help |
| 40 | + On connection of a USB device, the USB 2.0 specification requires |
| 41 | + a "debounce interval with a minimum duration of 100ms" to allow the connection to stabilize |
| 42 | + (see USB 2.0 chapter 7.1.7.3 for more details). |
| 43 | + During the debounce interval, no new connection/disconnection events are registered. |
| 44 | + |
| 45 | + The default value is set to 250 ms to be safe. |
| 46 | + |
| 47 | + config UHC_DWC2_PORT_RESET_HOLD_MS |
| 48 | + int "Reset hold in ms" |
| 49 | + default 30 |
| 50 | + help |
| 51 | + The reset signaling can be generated on any Hub or Host Controller port by request from |
| 52 | + the USB System Software. The USB 2.0 specification requires that "the reset signaling must |
| 53 | + be driven for a minimum of 10ms" (see USB 2.0 chapter 7.1.7.5 for more details). |
| 54 | + After the reset, the hub port will transition to the Enabled state (refer to Section 11.5). |
| 55 | + |
| 56 | + The default value is set to 30 ms to be safe. |
| 57 | + |
| 58 | + config UHC_DWC2_PORT_RESET_RECOVERY_MS |
| 59 | + int "Reset recovery delay in ms" |
| 60 | + default 30 |
| 61 | + help |
| 62 | + After a port stops driving the reset signal, the USB 2.0 specification requires that |
| 63 | + the "USB System Software guarantees a minimum of 10 ms for reset recovery" before the |
| 64 | + attached device is expected to respond to data transfers (see USB 2.0 chapter 7.1.7.3 for |
| 65 | + more details). |
| 66 | + The device may ignore any data transfers during the recovery interval. |
| 67 | + |
| 68 | + The default value is set to 30 ms to be safe. |
| 69 | + |
| 70 | +endmenu #Root Hub configuration |
0 commit comments