summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/soc/mediatek/mt8186/include/soc/addressmap.h1
-rw-r--r--src/soc/mediatek/mt8186/usb.c8
2 files changed, 9 insertions, 0 deletions
diff --git a/src/soc/mediatek/mt8186/include/soc/addressmap.h b/src/soc/mediatek/mt8186/include/soc/addressmap.h
index 069e31d412..0aaeb9b666 100644
--- a/src/soc/mediatek/mt8186/include/soc/addressmap.h
+++ b/src/soc/mediatek/mt8186/include/soc/addressmap.h
@@ -21,6 +21,7 @@ enum {
IOCFG_BL_BASE = IO_PHYS + 0x00002600,
IOCFG_RB_BASE = IO_PHYS + 0x00002A00,
IOCFG_RT_BASE = IO_PHYS + 0x00002C00,
+ PERICFG_BASE = IO_PHYS + 0x00003000,
GPIO_BASE = IO_PHYS + 0x00005000,
SPM_BASE = IO_PHYS + 0x00006000,
RGU_BASE = IO_PHYS + 0x00007000,
diff --git a/src/soc/mediatek/mt8186/usb.c b/src/soc/mediatek/mt8186/usb.c
index 6d83abbde1..d13355527d 100644
--- a/src/soc/mediatek/mt8186/usb.c
+++ b/src/soc/mediatek/mt8186/usb.c
@@ -10,7 +10,15 @@
#include <soc/gpio.h>
#include <soc/usb.h>
+#define PERI_USB_WAKEUP_DEC_CON1 0x404
+#define PERI_U3_WAKE_CTRL0 0x420
+
void mtk_usb_prepare(void)
{
gpio_output(GPIO(USB_DRVVBUS_P1), 1);
+
+ /* disable IP0 debounce */
+ write32p(PERICFG_BASE + PERI_U3_WAKE_CTRL0, 0);
+ /* disable IP1 debounce */
+ write32p(PERICFG_BASE + PERI_USB_WAKEUP_DEC_CON1, 0);
}