> > > > I suspect it is not related to USB, would you please disable USB node at DTS to > measure again? > > With USB disabled (&usbotg1 and &usbotg2), VBUS is available when I connect to > the host and properly discharged when I disconnect. > I also tried the OTG's host mode yesterday. When I attach a Micro-B plug to A- > receptable adapter (and no actual gadget), the GPIO-controlled regulator is turned > on and drives VBUS. When I detach it and the board switches back to gadget, the > regulator is turned off and VBUS is properly drained. > Would you please try disabling charger detection to see if it anything changes? Do you have any components at VBUS? diff --git a/drivers/usb/chipidea/udc.c b/drivers/usb/chipidea/udc.c index 6a5ee8e6da10..70f07a81daa4 100644 --- a/drivers/usb/chipidea/udc.c +++ b/drivers/usb/chipidea/udc.c @@ -1524,9 +1524,11 @@ static int ci_udc_vbus_session(struct usb_gadget *_gadget, int is_active) gadget_ready = 1; spin_unlock_irqrestore(&ci->lock, flags); + /* if (ci->usb_phy) usb_phy_set_charger_state(ci->usb_phy, is_active ? USB_CHARGER_PRESENT : USB_CHARGER_ABSENT); + */ if (gadget_ready) { if (is_active) { Peter