|
|
|
|
@ -29,6 +29,7 @@ DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
|
#ifdef CONFIG_USB_DWC3
|
|
|
|
|
#define CRU_BASE 0x27200000
|
|
|
|
|
#define CRU_SOFTRST_CON47 0x0abc
|
|
|
|
|
#define U3PHY_BASE 0x2b010000
|
|
|
|
|
|
|
|
|
|
static struct dwc3_device dwc3_device_data = {
|
|
|
|
|
.maximum_speed = USB_SPEED_SUPER,
|
|
|
|
|
@ -70,14 +71,14 @@ int board_usb_init(int index, enum usb_init_type init)
|
|
|
|
|
|
|
|
|
|
if (rkusb_switch_usb3_enabled()) {
|
|
|
|
|
dwc3_device_data.maximum_speed = USB_SPEED_SUPER;
|
|
|
|
|
ret = rockchip_u3phy_uboot_init();
|
|
|
|
|
ret = rockchip_u3phy_uboot_init(U3PHY_BASE);
|
|
|
|
|
if (ret) {
|
|
|
|
|
rkusb_force_to_usb2(true);
|
|
|
|
|
dwc3_device_data.maximum_speed = USB_SPEED_HIGH;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
#else
|
|
|
|
|
ret = rockchip_u3phy_uboot_init();
|
|
|
|
|
ret = rockchip_u3phy_uboot_init(U3PHY_BASE);
|
|
|
|
|
if (ret) {
|
|
|
|
|
rkusb_force_to_usb2(true);
|
|
|
|
|
dwc3_device_data.maximum_speed = USB_SPEED_HIGH;
|
|
|
|
|
|