summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorsakumisu <[email protected]>2025-05-05 18:59:20 +0800
committersakumisu <[email protected]>2025-05-05 18:59:51 +0800
commit51ef13d2179b725db2e418a47539f7201323f74a (patch)
tree0529f634620cc5b3f457143646cb046ed90bdeb6
parent7d93f7d0f0769d1ef7e59ee2355ebbd89cd27105 (diff)
fix(port/bl): enable PDS_REG_USB_IDDIG bit for device
Signed-off-by: sakumisu <[email protected]>
-rw-r--r--port/bouffalolab/usb_dc_bl.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/port/bouffalolab/usb_dc_bl.c b/port/bouffalolab/usb_dc_bl.c
index b6859f8d..78cb5f38 100644
--- a/port/bouffalolab/usb_dc_bl.c
+++ b/port/bouffalolab/usb_dc_bl.c
@@ -457,6 +457,11 @@ int usb_dc_init(uint8_t busid)
bflb_irq_attach(37, USBD_IRQ, NULL);
bflb_irq_enable(37);
+ /* disable device-A for device */
+ regval = getreg32(BFLB_PDS_BASE + PDS_USB_CTL_OFFSET);
+ regval |= PDS_REG_USB_IDDIG;
+ putreg32(regval, BFLB_PDS_BASE + PDS_USB_CTL_OFFSET);
+
/* disable global irq */
regval = getreg32(BFLB_USB_BASE + USB_DEV_CTL_OFFSET);
regval &= ~USB_GLINT_EN_HOV;