summaryrefslogtreecommitdiff
path: root/port
AgeCommit message (Collapse)Author
9 daysfix(port/ehci): fix killed to zero by 6c40a28302sakumisu
Signed-off-by: sakumisu <[email protected]>
9 daysfix(port/ehci): fix urb transfer_buffer invalid for controlsakumisu
Signed-off-by: sakumisu <[email protected]>
12 daysupdate(port/dwc2/gd): add gd reg patch, all todosakumisu
Signed-off-by: sakumisu <[email protected]>
13 daysupdate(phytium): update phytium port and cisakumisu
Signed-off-by: sakumisu <[email protected]>
13 daysfix(port/dwc2/usb_dc_dwc2): do not disable out ep, only with nak when reset ↵sakumisu
or deinit Signed-off-by: sakumisu <[email protected]>
14 daysfix(port/dwc2/usb_dc_dwc2): revert out data_len caculationsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-10-08fix(port/musb): Use the mapped channel in usbh_kill_urb on SiFli 52/56zelong_666
usbh_kill_urb() derived both the channel to mask and the channel to flush from the endpoint number ((urb->ep->bEndpointAddress & 0x0f) and bEndpointAddress itself), which only holds when the channel number equals the endpoint number. When MUSB_SIFLI_EP_MAP is in use the channel is assigned by sifli_ep_map_alloc(): the SiFli 52/56 host channels are pooled per direction (IN ch1..ch4, OUT ch5..ch7), so e.g. EP1 OUT lives on ch5 and EP2 OUT on ch6. Masking by endpoint number therefore clears the interrupt enable of an unrelated channel and leaves the aborted channel's interrupt armed, and musb_fifo_flush() is asked to clean the FIFO of a different endpoint than the one the URB was using. Take the channel from pipe->chidx, which is the channel the URB was submitted on, and rebuild the byte musb_fifo_flush() expects (direction in bit7, channel in bits 6:0). Non-mapped MUSB ports keep their previous behaviour. EP0 is unaffected either way: with chidx 0 and bEndpointAddress 0 both forms resolve to bit 0 and byte 0.
2026-10-08fix(port/musb): Re-arm the EP0 TX interrupt in musb_control_urb_initzelong_666
The data channels re-arm their interrupt enable in their own musb_bulk_urb_init()/musb_intr_urb_init()/musb_iso_urb_init(), but the EP0 path never did: TXIE.EP0 was only ever set once, in usb_hc_init(). usbh_kill_urb() masks the interrupt of the channel that owns the abandoned URB, and EP0 always lives on channel 0, so aborting a single control transfer clears TXIE.EP0 for good. Every later control transfer then completes in the hardware but never raises an EP0 interrupt, so usbh_submit_urb() runs into errout_timeout (-USB_ERR_TIMEOUT) and enumeration can never succeed again until the next usb_hc_init(). Seen on a host that lost its peer in the middle of enumeration (phone reboot or re-plug): one control transfer timed out during the port reset and every following one repeated "Failed to get device descriptor, errorcode:-14" forever, until the board was rebooted. Arming TXIE.EP0 here keeps EP0 symmetric with the data channels, so a single timed-out control transfer no longer disables EP0 for the rest of the session.
2026-10-06fix(port/dwc2/usb_dc_dwc2): fix usbd_ep_close for out ep, set global nak ↵sakumisu
first then can disable ep, refs: #462 Signed-off-by: sakumisu <[email protected]>
2026-09-26update(port): change low level api from weak to extern, users must implement ↵sakumisu
this Signed-off-by: sakumisu <[email protected]>
2026-09-26feat: add register driver api, support multi host & device with different ipsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-23fix(port): safely check urb->hcpriv validation in usbh_kill_urbsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-21fix(port/musb): Fix EP1 channel conflict on SiFli 52/56 serieszelong_666
On the SiFli 52/56 series the MUSB host channels are direction-limited (ch2-ch4 are IN-only, ch5-ch7 are OUT-only, ch1 can do both; ch0 is EP0), but the first-free channel allocation is direction-blind and can assign a channel that cannot carry the transfer. Allocate channels through a per-direction endpoint map instead: each (direction, endpoint number) pair keeps a dedicated channel from the correct pool while its URBs are in flight, and the slot is freed when the pipe is released. Busy and map-failure collisions are logged. Fixes USB tethering transfer failures with phones whose RNDIS data endpoints are EP1 IN + EP1 OUT (e.g. OPPO) or numbered above 7 (e.g. EP14/EP15; numbers 1-15 all work since they only live in the 4-bit TEP field). The generic musb_pipe_alloc() path is kept for other MUSB ports.
2026-09-20fix(port/wch): fixed a bugLinks0617
2026-09-20update(port/wch): add NAK retry feature / usbhs controller port add PING ↵Links0617
packet feature
2026-09-18update(port/wch): add device port speed parameter handleLinks0617
2026-09-17docs: update docsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-17add(port/wch): add wch usbfs host controller portLinks0617
2026-09-16update(port): remove ununsed glue, move some glue into manufacturer dirsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-16update(port/wch): remove legacy portsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-16add(port/wch): add wch usbhs host controller portLinks0617
2026-09-13docs: update readmesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-11fix(port/wch): fix some wch controller port bugLinks0617
2026-09-11update(port): clean and invalid buffer in usbh_submit_urb onlysakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-11fix(port/ehci): fix qh desc and urb transfer_buffer invalidsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-10Rename WCH chip port group names, add usbfs controller port support and ↵Links0617
optimize usbhs controller port
2026-09-09fix(port/musb): Fix MUSB host TX/RX FIFO flush failXiaoming Xi
musb_fifo_flush() selected the CSR side for device role, which is opposite to the host direction. Now IN endpoints (host RX) flush RXCSR, OUT endpoints (host TX) flush TXCSR, and EP0 writes the FLUSHFIFO bit in the csr0 high byte, so a timed-out/killed bulk OUT no longer leaves TXPKTRDY and the FIFO uncleaned.
2026-09-08update(port/ch32): optimize ch32 usbhs controller port and add bulk transfer ↵Links0617
burst freature support
2026-09-06update(port/ch32): format codesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-06update(port/ch32): move old code into legacysakumisu
Signed-off-by: sakumisu <[email protected]>
2026-09-06Add WCH USBHS controller supportLHD0617
2026-09-01fix(port): fix ch58x mps typeRiven
2026-08-29port/fsdev: log error when USBFS clock divider has no matchOnlyoutzZ
Report an error through USB_LOG_ERR when SystemCoreClock does not match any supported 48/96/144/192/240 MHz divider case, instead of silently leaving the USBFS prescaler unconfigured.
2026-08-29fix(port/fsdev): address N32H4x glue review findingsOnlyoutzZ
- usb_glue_nation.c: match usb_dc_low_level_init/deinit to the (void) weak stubs in usb_dc_fsdev.c and guard on g_usbdev_bus[0] (the old (uint8_t busid) signature read garbage at the no-arg call site) - usb_glue_nation.c: drop NVIC_PriorityGroupConfig from the driver hook; it reprograms SCB->AIRCR for the whole system, priority grouping now stays with board/application startup code - usb_glue_nation.c: derive the USBFS prescaler from SystemCoreClock at runtime instead of a per-part compile-time table (fixes N32H475 landing in the 240 MHz branch; adapts to any configured PLLCLK) - add docstrings to the functions touched by this diff
2026-08-29port/fsdev: add N32H4x (N32H47x_48x / N32H49x) USB FS device supportOnlyoutzZ
Add full-speed USB device (USBFS) support for the Nations N32H4x family (N32H47x_48x and N32H49x), whose Synopsys USBFS core re-arranged the register and bit-field layout of the STM32 version: - usb_glue_nation.c: chip-level bring-up (48 MHz USB clock from PLL, DM/DP GPIO with a weak overridable hook, NVIC USB_FS_LP_IRQn dispatch) - usb_fsdev_reg.h: re-map USB_EPn/CNTR/ISTR/BTABLE/FN/DADDR register layout and every affected bit macro for N32H4x (32-bit EP registers, no BCDR; DP pull-up moved to CNTR.PU) - usb_dc_fsdev.c: N32H4x power-on sequence (clear PD, wait, clear FRST) and EP_ID position handling - README: document the supported N32H4x parts
2026-08-28fix(port/ehci): fix missing cache clean for setupsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-19[update] port: hpmicro: remove sdk version checkZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>
2026-08-14fix(port/ch32): fix ch32 macro and readmesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-08-12fix(ch32fs): SETUP 中断固定 NAK EP0,支持 CH32L103xiaowine
CH32FS IP 的 SETUP 中断触发时,INT_ST 端点字段不总为 0(在 CH32L103 和 CH32V203 上实测约 50% 为 4,来自上一次批量事务的残留)。原代码 USB_SET_RX_CTRL(ep_idx, NAK) 会写错 UEP{ep_idx} 寄存器,导致 EP0 停留在 ACK 状态,Windows 存储栈挂载设备前会卡约 20 秒。 (可能影响所有使用 CH32FS IP 的 MCU,但仅在 CH32L103/CH32V203 上验证) 改为固定 NAK EP0(索引 0),并同时 NAK TX 和 RX。其中 TX NAK 一行对 CH32L103 是必需的,缺少会导致设备枚举失败(Windows 设备管理器 Code 10); WCH CH32FS IP 的 MCU 官方 EVM 代码也都是同时两行 NAK,且官方 SETUP 处理代码同样固定使用 EP0(索引 0)。 同时在支持列表中加入 CH32L103(使用 USBFS)。CH32V20X 有两个 USB IP: USBD(用 fsdev,与 F103 相同)和 USBFS(用 ch32fs),已在 port/ch32/README.md 中说明。
2026-08-03fix(security): add check for sem&mq&thread and delete remain sources if ↵sakumisu
alloc fail Signed-off-by: sakumisu <[email protected]>
2026-06-30update(port/musb/usb_glue_sifli): add zephyr supportsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30fix(port/chipidea): using sutw semaphore by isr handler for setupsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-30update(port/dwc2): add limit for transfer sizesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-06-26usb_hc.h中bug修改和usb_glue_nation.c中添加N32H49X和N32H7XX系列MCU� ↵Onlyou_tzZ
��USBHS支持 (#422) * 1、usb_hc.h中struct usbh_urb结构体添加defined(__CC_ARM)判断,MDK AC5编译器不支持struct usbh_iso_frame_packet iso_packet[0]只支持struct usbh_iso_frame_packet *iso_packet 2、usb_glue_nation.c中添加N32H49X和N32H7XX系列MCU的USBHS支持 * 回退对usb_hc.h的修改
2026-05-26docs: update rascsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-05-22fix(port/musb/usb_glue_sifli): fix phy and reset configsakumisu
Signed-off-by: sakumisu <[email protected]>
2026-05-12Add HS support for esp32s31yanke
2026-05-08feat(port/renesas): support renesas devicesakumisu
Signed-off-by: sakumisu <[email protected]>
2026-04-16fix(port/hpm): add sdk version checksakumisu
Signed-off-by: sakumisu <[email protected]>
2026-04-13[update] port: hpmicro: dcd: using sutw semaphore by isr handler for setupZhihong Chen
Signed-off-by: Zhihong Chen <[email protected]>