From 7422c3721177cb5424a735e7d918f2947c51101c Mon Sep 17 00:00:00 2001 From: Ren Jianing Date: Fri, 27 Mar 2020 11:07:59 +0800 Subject: [PATCH] rockchip: rv1126: add dwc3 board init Signed-off-by: Ren Jianing Change-Id: I4c5eeeedc240197ec0fda2b236890b53b916dfb6 --- board/rockchip/evb_rv1126/evb_rv1126.c | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) diff --git a/board/rockchip/evb_rv1126/evb_rv1126.c b/board/rockchip/evb_rv1126/evb_rv1126.c index 7cd98fc9b8..9f6683f20f 100644 --- a/board/rockchip/evb_rv1126/evb_rv1126.c +++ b/board/rockchip/evb_rv1126/evb_rv1126.c @@ -5,6 +5,29 @@ */ #include +#include +#include DECLARE_GLOBAL_DATA_PTR; +#ifdef CONFIG_USB_DWC3 +static struct dwc3_device dwc3_device_data = { + .maximum_speed = USB_SPEED_HIGH, + .base = 0xffd00000, + .dr_mode = USB_DR_MODE_PERIPHERAL, + .index = 0, + .dis_u2_susphy_quirk = 1, + .usb2_phyif_utmi_width = 16, +}; + +int usb_gadget_handle_interrupts(void) +{ + dwc3_uboot_handle_interrupt(0); + return 0; +} + +int board_usb_init(int index, enum usb_init_type init) +{ + return dwc3_uboot_init(&dwc3_device_data); +} +#endif