summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--chip/stm32/usb.c2
-rw-r--r--include/config.h5
-rw-r--r--zephyr/Kconfig.usbc10
-rw-r--r--zephyr/shim/include/config_chip.h5
4 files changed, 21 insertions, 1 deletions
diff --git a/chip/stm32/usb.c b/chip/stm32/usb.c
index 63c931d7d9..b3f1189b9d 100644
--- a/chip/stm32/usb.c
+++ b/chip/stm32/usb.c
@@ -55,7 +55,7 @@ static const struct usb_device_descriptor dev_desc = {
.bDeviceSubClass = 0x00,
.bDeviceProtocol = 0x00,
.bMaxPacketSize0 = USB_MAX_PACKET_SIZE,
- .idVendor = USB_VID_GOOGLE,
+ .idVendor = CONFIG_USB_VID,
.idProduct = CONFIG_USB_PID,
.bcdDevice = CONFIG_USB_BCD_DEV,
.iManufacturer = USB_STR_VENDOR,
diff --git a/include/config.h b/include/config.h
index 3adc23c1c1..8dc2d0aa5a 100644
--- a/include/config.h
+++ b/include/config.h
@@ -4620,6 +4620,11 @@
#undef CONFIG_USB_PID
/*
+ * USB Vendor ID used for USB endpoints.
+ */
+#define CONFIG_USB_VID USB_VID_GOOGLE
+
+/*
* Track overcurrent events for sinking partners coming from some component on
* the board. Auto-enabled for drivers which contain support for this feature.
*/
diff --git a/zephyr/Kconfig.usbc b/zephyr/Kconfig.usbc
index 5f2def4b02..1aeb113eb3 100644
--- a/zephyr/Kconfig.usbc
+++ b/zephyr/Kconfig.usbc
@@ -147,6 +147,16 @@ config PLATFORM_EC_USB_BCD_DEV
and should be set to a version number relevant to the release version
of the product.
+config PLATFORM_EC_USB_VID
+ hex "USB Vendor ID"
+ default 0x18d1
+ help
+ This specifies the USB vendor ID used for boards which expose a
+ USB endpont when the port is in UFP mode. The default value is
+ set to Google's assigned VID and typically would not need to be
+ changed. But, in certain cases this may need to be changed to
+ match an OEM's vendor ID.
+
config PLATFORM_EC_USBC_RETIMER_INTEL_BB
bool "Support Intel Burnside Bridge retimer"
help
diff --git a/zephyr/shim/include/config_chip.h b/zephyr/shim/include/config_chip.h
index 4d732e7331..1bb7e11cb8 100644
--- a/zephyr/shim/include/config_chip.h
+++ b/zephyr/shim/include/config_chip.h
@@ -672,6 +672,11 @@
#define CONFIG_USB_BCD_DEV CONFIG_PLATFORM_EC_USB_BCD_DEV
#endif
+#undef CONFIG_USB_VID
+#ifdef CONFIG_PLATFORM_EC_USB_VID
+#define CONFIG_USB_VID CONFIG_PLATFORM_EC_USB_VID
+#endif
+
/* VBUS-voltage measurement */
#undef CONFIG_USB_PD_VBUS_MEASURE_NOT_PRESENT
#undef CONFIG_USB_PD_VBUS_MEASURE_CHARGER