summaryrefslogtreecommitdiff
path: root/src/portable/renesas/rusb2/hcd_rusb2.c
AgeCommit message (Collapse)Author
2026-07-13rusb2: EP0 OUT reliability, HS UTMI PHY power-up, FS-only build supporthathach
- EP0 OUT: park a back-to-back data-stage packet the DCP accepted before PID could go NAK and deliver it into the next armed chunk; flow-control the single-buffer control pipe between chunks (usbtest ctrl_out corruption); discard a packet parked while an OUT pipe was halted so BOT reset recovery's fresh CBW read can't receive stale WRITE data - HS UTMI PHY power-up per the FSP sequence, shared by dcd/hcd: CLKSEL programmed from the board XTAL (EK-RA8M1 runs 20 MHz; the 24 MHz reset default never locks) while DIRPD holds the PHY down, then timed release - hw/bsp(ra8m1_ek): fix U60CK divider macro - BSP_CFG_U60CK_DIV used the generic USB_CLOCK_DIV_8 encoding (7), which USB60CKDIVCR rejects, leaving the USBHS link domain at 480 MHz; the USB60-specific BSP_CLOCKS_USB60_CLOCK_DIV_8 (4) sticks and yields the required 60 MHz from PLL1P - support FS-only builds on the high-speed port: gate SYSCFG.HSE on TUD_OPT_HIGH_SPEED (RHPORT_DEVICE_SPEED=OPT_MODE_FULL_SPEED was a silent no-op) and always compile both hwfifo access widths - the FIFO width belongs to the module, not the link speed (FS builds corrupted odd-length tails: 16-bit access against MBW-32) - iso activate: reset stale pipe bookkeeping so a BRDY firing before the class re-arms can't replay a pre-SET_INTERFACE transfer; write PIPEBUF after PIPESEL selects the pipe (PIPESEL-windowed register) - clear-halt: re-assert BUF on a still-armed OUT pipe (usbtest case 29) - bound the D0FIFO ready spin so an undrained double-buffered IN pipe can't freeze the stack with the IRQ masked - usbtest example: cap interrupt mps at 64 on RUSB2 high speed (pipes 6-9 have a fixed 64-byte buffer, RA6M5 UM 29.1) Verified: usbtest 30/30 on ra6m5_ek (HS), ra4m1_ek (FS) and ra8m1_ek (FS-forced build on the HS port). Co-Authored-By: Claude Fable 5 <[email protected]> Claude-Session: https://claude.ai/code/session_01HeF2gZ1M7GWkz6Av4BpKPg
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-01-04update hcd rusb2 to use tu_hwfifo read/writehathach
2026-01-03fix rusb2 hcd_port_connect_status() using line state, add post root reset ↵hathach
delay for stable speed detection
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-03-26added hcd_edpt_close() stub for other portshathach
2024-10-14change the tusb_rhport_init_t struct, exclude the rhport to make API more ↵hathach
consistent
2024-10-11hcd_init() take init structhathach
2024-04-15revert to use __builtin_ctz() for optimized timehathach
2024-04-11apply find_pipe() and forloop for hcdhathach
2023-09-27change hcd_int_handler(rhport, in_isr) signature: add in_isrhathach
change tuh_int_handler() to take in_isr as optional parameter (default = true)
2023-08-04clean(ra_hcd): fix typos in the hcd libraryAladdin Bakosh
2023-08-04Merge branch 'master' into masterHa Thach
2023-08-01renesas: host: remove attach_attempt logicMartino Facchin
2023-08-01add rusb2_common.c for dynami irqhathach
2023-07-28add uno r4 wih FLASH_IMAGE_START=0x4000, running but interrupt (systick) ↵hathach
does not seems to work
2023-07-28- revert usb addresshathach
- more clean up
2023-07-27Merge branch 'master' into renesas_ra_hs_rebasedhathach
2023-07-26correct hcd_edpt_clear_stall() API signaturehathach
2023-07-26refactored multiple ports for hcd rusb2hathach
2023-07-26updating hcd rusb2hathach
- make osal_task_delay() as weak function in usbh - implement osal_task_delay() in hcd rusb2 (may moved to other places)
2023-07-21add stub hcd_edpt_abort_xfer() for all portshathach
2023-07-18Merge branch 'master' into renesas_ra_hs_rebasedhathach
2023-07-17debugging can be configured on renesas hcdAladdin Bakosh
2023-07-17fix(RA_hcd): STALL status can be also 3 not only 2Aladdin Bakosh
2023-07-02made line ends consistent.Lars Pötter
2023-06-05Merge remote-tracking branch 'mainline/master' into HEADMartino Facchin
Update fsp to 4.0.0
2023-06-05renesas_rx: fix compilation on latest GCCMartino Facchin
__CCRX__ only applyes to version 4 of RX family compiler http://tool-support.renesas.com/autoupdate/support/onlinehelp/csp/V4.01.00/CS+.chm/Compiler-CCRX.chm/Output/ccrx04c0201y.html __RX__ is one of the macros exported by latest gcc (gcc_8.3.0.202305_rx_elf)
2023-05-24fix(RA Host Portable): implement missing function __builtin_ctz(x) for IARAladdin Bakosh
2023-05-17renesas: provide default for CFG_TUSB_RHPORT1_MODEMartino Facchin
Should fix CI failure for Renesas RX family
2023-05-03renesas: add fallback for targets not defining CFG_TUSB_RHPORT*_MODEMartino Facchin
2023-05-03renesas_ra: host: handle retry on attach()Martino Facchin
2023-05-03renesas_ra: add support for HS portMartino Facchin
2023-03-16rename symbolshathach
2023-03-16rename file link to rusb2hathach