Tom Rini | 10e4779 | 2018-05-06 17:58:06 -0400 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 2 | /* |
| 3 | * Copyright (C) 2013 Samsung Electronics |
| 4 | * Lukasz Majewski <l.majewski@samsung.com> |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 5 | */ |
| 6 | |
| 7 | #include <common.h> |
| 8 | #include <linux/usb/ch9.h> |
| 9 | |
Tom Rini | 4720d91 | 2022-12-02 16:42:28 -0500 | [diff] [blame] | 10 | #define EXYNOS_G_DNL_THOR_VENDOR_NUM 0x04E8 |
| 11 | #define EXYNOS_G_DNL_THOR_PRODUCT_NUM 0x685D |
| 12 | |
| 13 | #define EXYNOS_G_DNL_UMS_VENDOR_NUM 0x0525 |
| 14 | #define EXYNOS_G_DNL_UMS_PRODUCT_NUM 0xA4A5 |
| 15 | |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 16 | int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) |
| 17 | { |
| 18 | if (!strcmp(name, "usb_dnl_thor")) { |
Tom Rini | 4720d91 | 2022-12-02 16:42:28 -0500 | [diff] [blame] | 19 | put_unaligned(EXYNOS_G_DNL_THOR_VENDOR_NUM, &dev->idVendor); |
| 20 | put_unaligned(EXYNOS_G_DNL_THOR_PRODUCT_NUM, &dev->idProduct); |
Lukasz Majewski | cb7ff44 | 2014-07-29 11:10:44 +0200 | [diff] [blame] | 21 | } else if (!strcmp(name, "usb_dnl_ums")) { |
Tom Rini | 4720d91 | 2022-12-02 16:42:28 -0500 | [diff] [blame] | 22 | put_unaligned(EXYNOS_G_DNL_UMS_VENDOR_NUM, &dev->idVendor); |
| 23 | put_unaligned(EXYNOS_G_DNL_UMS_PRODUCT_NUM, &dev->idProduct); |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 24 | } else { |
Maxime Ripard | 7f78b9d | 2017-09-07 08:58:08 +0200 | [diff] [blame] | 25 | put_unaligned(CONFIG_USB_GADGET_VENDOR_NUM, &dev->idVendor); |
| 26 | put_unaligned(CONFIG_USB_GADGET_PRODUCT_NUM, &dev->idProduct); |
Lukasz Majewski | bddf272 | 2013-10-08 14:30:45 +0200 | [diff] [blame] | 27 | } |
| 28 | return 0; |
| 29 | } |