OTG_EN and WKUPCOMP is set; VUSB3V1, VUSB1V8 and VUSB1V5 regulators enabled; VUSB_DEDICATED1 has SW2VBAT set and SW2VBUS cleared.
When I plug USB cable (with PC on other side) I get USB_PRES interrupt and STS_HW_CONDITIONS has STS_VBUS set, as expected. But when I pull the cable out nothing happens, I get no USB_PRES interrupt and STS_HW_CONDITIONS still has STS_VBUS set. After this plugging USB again also no longer triggers USB_PRES too.
At this point if I disable supplies or switch VUSB_DEDICATED1 to SW2VBUS, I get USB_PRES interrupt (although cable was removed long ago) and STS_HW_CONDITIONS clears STS_VBUS. Solution to this would be to keep VUSB_DEDICATED1 SW2VBUS set and SW2VBAT cleared, then I get USB_PRES interrupts on both plug/unplug as expected. However OTG host mode won't work with this (it needs VBAT for VUSB3V1 as nobody powers VBUS then) and there is errata #17 related to overvoltage detection not working in some cases when SW2VBUS is used.
What should I do to get USB_PRES interrupt when VUSB_DEDICATED1 has SW2VBAT set and cable is removed?