gadget: rockusb: support usbplug download mode

Signed-off-by: Yifeng Zhao <zyf@rock-chips.com>
Signed-off-by: Joseph Chen <chenjh@rock-chips.com>
Change-Id: Ic265243834ce294e6d979bcae89774a42600e5f3
This commit is contained in:
Joseph Chen 2020-05-19 11:25:19 +08:00 committed by Jianhong Chen
parent d45e5655df
commit 9542469246
1 changed files with 4 additions and 0 deletions

View File

@ -74,7 +74,11 @@ int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name)
dev->idProduct = __constant_cpu_to_le16(CONFIG_ROCKUSB_G_DNL_PID); dev->idProduct = __constant_cpu_to_le16(CONFIG_ROCKUSB_G_DNL_PID);
/* Enumerate as a loader device */ /* Enumerate as a loader device */
#if defined(CONFIG_SUPPORT_USBPLUG)
dev->bcdUSB = cpu_to_le16(0x0200);
#else
dev->bcdUSB = cpu_to_le16(0x0201); dev->bcdUSB = cpu_to_le16(0x0201);
#endif
} else if (!strncmp(name, "usb_dnl_fastboot", 16)) { } else if (!strncmp(name, "usb_dnl_fastboot", 16)) {
/* Fix to Google's VID and PID */ /* Fix to Google's VID and PID */
dev->idVendor = __constant_cpu_to_le16(0x18d1); dev->idVendor = __constant_cpu_to_le16(0x18d1);