diff options
author | Stefan Agner <stefan.agner@toradex.com> | 2017-06-05 13:51:17 -0700 |
---|---|---|
committer | Stefan Agner <stefan.agner@toradex.com> | 2017-06-05 16:31:20 -0700 |
commit | f72fe627c3e7a97008b8dd5d9ceb6df1dcd347ee (patch) | |
tree | 89dd3519869726d335a6bf656a55589191038ac1 /board | |
parent | adfb9db36d686287bcdfd6cfcf51254f8b40f0f8 (diff) |
toradex: make USB PID from config block optional
If config block support is enabled, USB gadget modes unconditionally
use Toradex Product ID as USB PID. Some applications might prefer a
different and/or static USB PID. Add a Kconfig configuration option
to descide whether to use USB PID from config block or the fallback
config option CONFIG_G_DNL_PRODUCT_NUM.
Signed-off-by: Stefan Agner <stefan.agner@toradex.com>
Acked-by: Brandon Shibley <brandon.shibley@toradex.com>
Diffstat (limited to 'board')
-rw-r--r-- | board/toradex/common/Kconfig | 10 | ||||
-rw-r--r-- | board/toradex/common/tdx-common.c | 2 |
2 files changed, 11 insertions, 1 deletions
diff --git a/board/toradex/common/Kconfig b/board/toradex/common/Kconfig index c2988d2f150..ac674a42933 100644 --- a/board/toradex/common/Kconfig +++ b/board/toradex/common/Kconfig @@ -66,6 +66,16 @@ config TDX_CFG_BLOCK_2ND_ETHADDR Ethernet carrier boards. This options enables the code to set the second Ethernet address as environment variable (eth1addr). +config TDX_CFG_BLOCK_USB_GADGET_PID + bool "Use config block product ID as USB product ID" + depends on USB_GADGET_DOWNLOAD + default y + help + Use the Toradex product ID learned from the config block as USB + product ID. An offset of 0x4000 is added to the product ID since + inside the Toradex vendor ID (0x1b67) the range starting from + offset 0x4000 is reserved for Colibri/Apalis modules. + endif config IMX_GETSPLVER diff --git a/board/toradex/common/tdx-common.c b/board/toradex/common/tdx-common.c index d383ac7b8cd..e18f07826cf 100644 --- a/board/toradex/common/tdx-common.c +++ b/board/toradex/common/tdx-common.c @@ -108,7 +108,7 @@ int show_board_info(void) return 0; } -#ifdef CONFIG_USB_GADGET_DOWNLOAD +#ifdef CONFIG_TDX_CFG_BLOCK_USB_GADGET_PID int g_dnl_bind_fixup(struct usb_device_descriptor *dev, const char *name) { unsigned short usb_pid; |