summaryrefslogtreecommitdiff
path: root/src/portable/synopsys/dwc2/hcd_dwc2.c
AgeCommit message (Collapse)Author
2026-07-02license: use SPDX identifiers for src/ headers (#3749)Ha Thach
* license: use SPDX identifiers for src/ headers Replace the full ~20-line MIT license boilerplate on every src/ file with a two-line SPDX tag (SPDX-FileCopyrightText + SPDX-License-Identifier), following the REUSE convention used by CircuitPython and the Linux kernel. Removes ~3500 lines of duplicated boilerplate.
2026-06-25hcd/dwc2: update wording on hfirHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-06-25fix(dwc2_hcd): correct HFIR for Low-Speed devices via internal FS PHYZhang, Zhenjiang
When a Low-Speed device is connected through the internal FS PHY, the effective PHY clock is 6MHz (HCFG_FSLS_PHYCLK_SEL_6MHZ), but phy_clock was incorrectly left at 48. This caused HFIR to be calculated as 47999 (~8ms SOF interval) instead of the correct 5999 (1ms SOF interval), breaking periodic endpoint scheduling. Fixes: LS mouse only receiving first HID report on OTG_HS + FS PHY
2026-06-11Fix stm32f723disco host/cdc_msc_hid HIL: UART RX starvation + DWC2 DMA ↵Ha Thach
split-IN NAK storm (#3677) Fix stm32f723disco host HIL: UART RX starvation + DWC2 split bulk NAK/XactErr handling (#3677) stm32f7 BSP — UART RX starvation - The host console USART shared interrupt priority with the USB OTG ISR, so a long OTG interrupt could starve RXNE and drop received bytes. Raise the USART RX IRQ above OTG_FS/OTG_HS in both the bare-metal and FreeRTOS init paths, guarded by #ifdef UART_ID so boards without a UART console keep the default OTG priority. dwc2 host — split NAK/XactErr handling - Slave mode: a persistently-NAKing split bulk/control IN poll re-armed the start-split immediately, storming the ISR and starving task context. Throttle by disabling the channel and re-arming on the resulting halt (no frame deferral). - Buffer-DMA mode: a pure split bulk-OUT NAK was unhandled, leaving the channel halted and stalling the transfer — the dominant cause of CDC echo truncation. Handle it by rewinding the buffer pointers and retrying the start-split (Programming Guide v4.20a 5.1.4.2). - Buffer-DMA mode: a split bulk-OUT XactErr was retried immediately, exhausting HCD_XFER_ERROR_MAX before the transient cleared. Throttle via channel_disable + re-arm to give the hub TT a recovery gap, mirroring slave mode. - All three are scoped to split transfers (hcsplt.split_en); non-split NAK/XactErr keep the core-handled / immediate-retry behavior. The OUT XactErr throttle also excludes periodic split, where channel_disable() is a no-op and would wedge the channel. The nak_disabled flag is generalized to retry_disabled and honors xfer->closing so an endpoint close during a throttled retry tears down cleanly. Verified on stm32f723disco HIL (slave + CFG_TUH_DWC2_DMA_ENABLE): host/cdc_msc_hid, msc_file_explorer, and device_info all pass on both variants; DMA CDC echo went from ~15-25% raw failure to 10/10 clean.
2026-05-04hcd/dwc2: fix txfifo full checkHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-04-10add dwc2_clock_init() to have nrf54 initial sequence. currently stub for ↵hathach
other ports. add board_uart_read() for nrf
2026-04-09rename ep_fifo_size (bytes) to otg_dfifo_depth (words)hathach
2026-03-04add PHY deinitialization support for DWC2 driver across all MCUshathach
2026-02-27cleanupHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-27Merge remote-tracking branch 'tinyusb/master' into dwc2_deinitHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-23refactor: streamline high-speed PHY detection and configuration in DWC2 driverhathach
2026-02-23refactor: improve high-speed PHY handling and FIFO configuration in DWC2 driverhathach
2026-02-22Apply suggestions from code reviewZixun LI
Co-authored-by: Copilot <[email protected]>
2026-02-22refactor speed checkHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-21fix ciHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-20refactor config optionHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-02-19Fix a couple indentationsCédric Berger
2026-02-19Introduce TUH_CFGID_PHY_SPEED configure optionCédric Berger
2026-02-19Better variable/function namesCédric Berger
2026-01-31dwc2: add vbus sense configHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-01-06hcd/dwc2: retry transfer on data toggle errorHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-01-06hcd/dwc2: disable ID change interrupt due to stuck on stm32f7HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-01-06dwc2: implement deinitHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2026-01-06rename FSDEV_PMA_SIZE CFG_TUSB_FSDEV_PMA_SIZEhathach
2026-01-03add tu_hwfifo_access_t param to hwfifo APIhathach
2025-12-10update metrics to support bloaty csvhathach
2025-11-19fix more alertshathach
2025-11-18improve closing endpoint and channelhathach
2025-11-18Merge branch 'master' into fork/HiFiPhile/xfer_closehathach
2025-10-15fix unused warningshathach
2025-06-04chore: squash previous commits from other branchesJames Sandison
2025-05-15Merge branch 'master' into xfer_closeHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-05-15Fix transfer failed event still queuedHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-04-28usbh: add roothub debounncing flag to ignore attach/remove event on the ↵hathach
roothub that is currently doing debouncing delay
2025-04-23rename and expose tuh_bus_info_get() to applicationhathach
2025-04-23rename hcd_devtree_info_t to tuh_bus_info_t, hcd_devtree_get_info to ↵hathach
hcd_bus_info_get streamline bus info to usbh_devies, also replace dev0 (renamed to dev0_bus)
2025-04-21Merge pull request #3075 from maximevince/dwc2-proper-attach-debouncingHa Thach
dwc2/host: attach debouncing fixes
2025-04-21Merge pull request #3088 from HiFiPhile/intvHa Thach
Fix 1st nak retry one frame shorter.
2025-04-19enable SOF interrupt only if not already enabledHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-04-18Disable channel properly.HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-04-18- correctly do_ping if received nyet as transfer complete e.g msc 31 byte ↵hathach
command - correctly carry out OUT transfer when PING is ack
2025-04-18Merge branch 'master' into dwc2-proper-attach-debouncingHiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-04-18minor renamehathach
2025-04-18Merge branch 'master' into fork/HiFiPhile/ping_outhathach
# Conflicts: # src/portable/synopsys/dwc2/hcd_dwc2.c
2025-04-18Fix 1st nak retry one frame shorter.HiFiPhile
Signed-off-by: HiFiPhile <[email protected]>
2025-04-18Merge pull request #3072 from maximevince/dwc2-retry-in-token-immediatelyHa Thach
dwc2/host: immediately retry IN token for bInterval=1
2025-04-18clean up, remove halted_sof_schedule flags since channel_xfer_in_retry() is ↵hathach
only called when channel is halted.
2025-04-15dwc2/host: fix all retry intervalsMaxime Vincent
Signed-off-by: Maxime Vincent <[email protected]>
2025-04-15dwc2/host: immediately retry IN token for bInterval=1Maxime Vincent
Signed-off-by: Maxime Vincent <[email protected]>
2025-04-15Merge branch 'master' into dwc2-host-fix-disconnectMaxime Vincent