summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2024-11-29 22:42:54 +0800
committersakumisu <[email protected]>2024-11-29 22:42:54 +0800
commit9ff35e90209392788e84a094bb7ac895c3b8944b (patch)
tree5bd4c154465281215d3ba38b06892bf7129aed48
parenta03a9cd48177771a57807491c12cba008268c68e (diff)
update(port/dwc2/usb_hc_dwc2): do not support hs hub with ls/fs device
-rw-r--r--port/dwc2/usb_hc_dwc2.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/port/dwc2/usb_hc_dwc2.c b/port/dwc2/usb_hc_dwc2.c
index de2e0057..09f55170 100644
--- a/port/dwc2/usb_hc_dwc2.c
+++ b/port/dwc2/usb_hc_dwc2.c
@@ -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;