hc
2024-12-19 9370bb92b2d16684ee45cf24e879c93c509162da
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
/*
 * SPDX-License-Identifier:     GPL-2.0+
 *
 * (C) Copyright 2020 Rockchip Electronics Co., Ltd
 */
 
#include <common.h>
#include <dwc3-uboot.h>
#include <usb.h>
 
DECLARE_GLOBAL_DATA_PTR;
 
#ifdef CONFIG_USB_DWC3
static struct dwc3_device dwc3_device_data = {
   .maximum_speed = USB_SPEED_HIGH,
   .base = 0xfcc00000,
   .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