1 /* 2 * SPDX-License-Identifier: GPL-2.0+ 3 * 4 * (C) Copyright 2019 Rockchip Electronics Co., Ltd 5 */ 6 7 #include <common.h> 8 #include <dwc3-uboot.h> 9 #include <usb.h> 10 11 DECLARE_GLOBAL_DATA_PTR; 12 13 #ifdef CONFIG_USB_DWC3 14 static struct dwc3_device dwc3_device_data = { 15 .maximum_speed = USB_SPEED_HIGH, 16 .base = 0xffd00000, 17 .dr_mode = USB_DR_MODE_PERIPHERAL, 18 .index = 0, 19 .dis_u2_susphy_quirk = 1, 20 .usb2_phyif_utmi_width = 16, 21 }; 22 usb_gadget_handle_interrupts(void)23int usb_gadget_handle_interrupts(void) 24 { 25 dwc3_uboot_handle_interrupt(0); 26 return 0; 27 } 28 board_usb_init(int index,enum usb_init_type init)29int board_usb_init(int index, enum usb_init_type init) 30 { 31 return dwc3_uboot_init(&dwc3_device_data); 32 } 33 #endif 34