Skip to content

Commit 26bda5e

Browse files
committed
fix(dcd_dwc2): Changed OTG Bvalid override configuration for ESP32
Closes espressif/esp-idf#12360
1 parent d84195a commit 26bda5e

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/portable/synopsys/dwc2/dcd_dwc2.c

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -683,8 +683,9 @@ bool dcd_init(uint8_t rhport, const tusb_rhport_init_t* rh_init) {
683683
// Force device mode
684684
dwc2->gusbcfg = (dwc2->gusbcfg & ~GUSBCFG_FHMOD) | GUSBCFG_FDMOD;
685685

686-
// Clear A override, force B Valid
687-
dwc2->gotgctl = (dwc2->gotgctl & ~GOTGCTL_AVALOEN) | GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL;
686+
// No overrides
687+
dwc2->gotgctl &= ~(GOTGCTL_BVALOEN | GOTGCTL_BVALOVAL | GOTGCTL_VBVALOVAL);
688+
688689

689690
// If USB host misbehaves during status portion of control xfer
690691
// (non zero-length packet), send STALL back and discard.

0 commit comments

Comments
 (0)