Merge tag 'u-boot-rockchip-20191124' of https://gitlab.denx.de/u-boot/custodians/u-boot-rockchip
- Clean vid/pid in Kconfig and add fastboot for rk3399 - add 'u-boot, spl-fifo-mode' for mmc - Use FIT generator for rk3229 optee and rk3368 ATF - fan53555: add support for Silergy SYR82X and SYR83X
This commit is contained in:
@@ -613,6 +613,31 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc)
|
||||
dwc3_gadget_run(dwc);
|
||||
}
|
||||
|
||||
static void dwc3_uboot_hsphy_mode(struct dwc3_device *dwc3_dev,
|
||||
struct dwc3 *dwc)
|
||||
{
|
||||
enum usb_phy_interface hsphy_mode = dwc3_dev->hsphy_mode;
|
||||
u32 reg;
|
||||
|
||||
/* Set dwc3 usb2 phy config */
|
||||
reg = dwc3_readl(dwc->regs, DWC3_GUSB2PHYCFG(0));
|
||||
reg |= DWC3_GUSB2PHYCFG_PHYIF;
|
||||
reg &= ~DWC3_GUSB2PHYCFG_USBTRDTIM_MASK;
|
||||
|
||||
switch (hsphy_mode) {
|
||||
case USBPHY_INTERFACE_MODE_UTMI:
|
||||
reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT;
|
||||
break;
|
||||
case USBPHY_INTERFACE_MODE_UTMIW:
|
||||
reg |= DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT;
|
||||
break;
|
||||
default:
|
||||
break;
|
||||
}
|
||||
|
||||
dwc3_writel(dwc->regs, DWC3_GUSB2PHYCFG(0), reg);
|
||||
}
|
||||
|
||||
#define DWC3_ALIGN_MASK (16 - 1)
|
||||
|
||||
/**
|
||||
@@ -721,6 +746,8 @@ int dwc3_uboot_init(struct dwc3_device *dwc3_dev)
|
||||
goto err0;
|
||||
}
|
||||
|
||||
dwc3_uboot_hsphy_mode(dwc3_dev, dwc);
|
||||
|
||||
ret = dwc3_event_buffers_setup(dwc);
|
||||
if (ret) {
|
||||
dev_err(dwc->dev, "failed to setup event buffers\n");
|
||||
|
||||
@@ -162,6 +162,18 @@
|
||||
/* Global USB2 PHY Configuration Register */
|
||||
#define DWC3_GUSB2PHYCFG_PHYSOFTRST (1 << 31)
|
||||
#define DWC3_GUSB2PHYCFG_SUSPHY (1 << 6)
|
||||
#define DWC3_GUSB2PHYCFG_PHYIF BIT(3)
|
||||
|
||||
/* Global USB2 PHY Configuration Mask */
|
||||
#define DWC3_GUSB2PHYCFG_USBTRDTIM_MASK (0xf << 10)
|
||||
|
||||
/* Global USB2 PHY Configuration Offset */
|
||||
#define DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET 10
|
||||
|
||||
#define DWC3_GUSB2PHYCFG_USBTRDTIM_16BIT (0x5 << \
|
||||
DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
|
||||
#define DWC3_GUSB2PHYCFG_USBTRDTIM_8BIT (0x9 << \
|
||||
DWC3_GUSB2PHYCFG_USBTRDTIM_OFFSET)
|
||||
|
||||
/* Global USB3 PIPE Control Register */
|
||||
#define DWC3_GUSB3PIPECTL_PHYSOFTRST (1 << 31)
|
||||
|
||||
@@ -39,6 +39,7 @@ if USB_GADGET
|
||||
config USB_GADGET_MANUFACTURER
|
||||
string "Vendor name of the USB device"
|
||||
default "Allwinner Technology" if ARCH_SUNXI
|
||||
default "Rockchip" if ARCH_ROCKCHIP
|
||||
default "U-Boot"
|
||||
help
|
||||
Vendor name of the USB device emulated, reported to the host device.
|
||||
@@ -47,6 +48,7 @@ config USB_GADGET_MANUFACTURER
|
||||
config USB_GADGET_VENDOR_NUM
|
||||
hex "Vendor ID of the USB device"
|
||||
default 0x1f3a if ARCH_SUNXI
|
||||
default 0x2207 if ARCH_ROCKCHIP
|
||||
default 0x0
|
||||
help
|
||||
Vendor ID of the USB device emulated, reported to the host device.
|
||||
@@ -56,6 +58,11 @@ config USB_GADGET_VENDOR_NUM
|
||||
config USB_GADGET_PRODUCT_NUM
|
||||
hex "Product ID of the USB device"
|
||||
default 0x1010 if ARCH_SUNXI
|
||||
default 0x310a if ROCKCHIP_RK3036
|
||||
default 0x310c if ROCKCHIP_RK3128
|
||||
default 0x320a if ROCKCHIP_RK3229 || ROCKCHIP_RK3288
|
||||
default 0x330a if ROCKCHIP_RK3328
|
||||
default 0x330c if ROCKCHIP_RK3399
|
||||
default 0x0
|
||||
help
|
||||
Product ID of the USB device emulated, reported to the host device.
|
||||
|
||||
Reference in New Issue
Block a user