Skip to content

Commit

Permalink
update(port/dwc2/usb_hc_dwc2): do not support hs hub with ls/fs device
Browse files Browse the repository at this point in the history
  • Loading branch information
sakumisu committed Nov 29, 2024
1 parent a03a9cd commit 9ff35e9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions port/dwc2/usb_hc_dwc2.c
Original file line number Diff line number Diff line change
Expand Up @@ -215,6 +215,12 @@ static inline void dwc2_chan_char_init(struct usbh_bus *bus, uint8_t ch_num, uin
regval |= USB_OTG_HCCHAR_EPDIR;
}

if ((usbh_get_port_speed(bus, 0) == USB_SPEED_HIGH) && (speed != USB_SPEED_HIGH)) {
USB_LOG_ERR("Do not support LS/FS device on HS hub\r\n");
while (1) {
}
}

/* LS device plugged to HUB */
if ((speed == USB_SPEED_LOW) && (usbh_get_port_speed(bus, 0) != USB_SPEED_LOW)) {
regval |= USB_OTG_HCCHAR_LSDEV;
Expand Down

0 comments on commit 9ff35e9

Please sign in to comment.