diff --git a/drivers/usb/gadget/epautoconf.c b/drivers/usb/gadget/epautoconf.c
index 1b435c4653c..a703be1a686 100644
--- a/drivers/usb/gadget/epautoconf.c
+++ b/drivers/usb/gadget/epautoconf.c
@@ -281,6 +281,30 @@ struct usb_ep *usb_ep_autoconfig(
 		if (ep && ep_matches(gadget, ep, desc))
 			return ep;
 #endif
+
+	} else if (gadget_is_ci(gadget)) {
+		const char *epname = NULL;
+
+		if (type == USB_ENDPOINT_XFER_BULK) {
+			if (desc->bEndpointAddress == USB_DIR_IN)
+				epname = "ep1in-bulk";
+
+			else if (desc->bEndpointAddress == USB_DIR_OUT)
+				epname = "ep2out-bulk";
+
+		} else if ((type == USB_ENDPOINT_XFER_INT) &&
+			      (desc->bEndpointAddress ==  (3 | USB_DIR_IN)))
+			epname = "ep3in-int";
+		  else if ((type == USB_ENDPOINT_XFER_INT) &&
+		          (desc->bEndpointAddress ==  (1 | USB_DIR_IN)))
+		    epname = "ep1in-bulk";
+
+		if (epname)
+		ep = find_ep(gadget, epname);
+		if (ep && ep_matches(gadget, ep, desc))
+		{
+			return ep;
+		}
 	}
 
 	if (gadget->ops->match_ep)
