summaryrefslogtreecommitdiff
path: root/src/drivers/usb/Kconfig
diff options
context:
space:
mode:
authorNicholas Chin <nic.c3.14@gmail.com>2022-10-10 20:39:03 -0600
committerKyösti Mälkki <kyosti.malkki@gmail.com>2022-11-11 13:33:34 +0000
commit81827aad3cf4a65128b8e609b183e8a240d08350 (patch)
tree62d5378f378a81ba69955b82f4603e42ff8bb1de /src/drivers/usb/Kconfig
parent458751c2d5b5ebfdaa4397be44b2ac6a7fd9c8dc (diff)
drivers/usb/gadget.c: Add support for EHCI debug using the WCH CH347
The WCH CH347 presents a USB CDC serial port on interface 4 while in operating modes 0, 1, and 3. Mode 0 also presents a UART on interface 2 but this is ignored for compatibility with the other modes. Mode 2 uses vendor defined HID usages for communication and is not currently supported. Like the FT232H the data format is hard coded to 8n1. Tested using a CH347 breakout board and a Dell Latitude E6400. Change-Id: Ibd4ad17b7369948003fff7e825b46fe852bc7eb9 Signed-off-by: Nicholas Chin <nic.c3.14@gmail.com> Reviewed-on: https://review.coreboot.org/c/coreboot/+/68264 Reviewed-by: Angel Pons <th3fanbus@gmail.com> Tested-by: build bot (Jenkins) <no-reply@coreboot.org> Reviewed-by: Kyösti Mälkki <kyosti.malkki@gmail.com>
Diffstat (limited to 'src/drivers/usb/Kconfig')
-rw-r--r--src/drivers/usb/Kconfig18
1 files changed, 18 insertions, 0 deletions
diff --git a/src/drivers/usb/Kconfig b/src/drivers/usb/Kconfig
index 6854c4a6b6..36fda75c8d 100644
--- a/src/drivers/usb/Kconfig
+++ b/src/drivers/usb/Kconfig
@@ -92,6 +92,14 @@ config USBDEBUG_DONGLE_FTDI_FT232H
Use this with FT232H usb-to-uart. Configuration is hard-coded
to use 8n1, no flow control.
+config USBDEBUG_DONGLE_WCH_CH347
+ bool "WCH CH347 UART"
+ help
+ Use this with CH347 usb-to-uart. Configuration is hard-coded
+ to use 8n1, no flow control. For compatibility across modes
+ 0, 1, and 3, only UART 1 is supported. The UART in mode 2 is
+ not currently supported.
+
endchoice
config USBDEBUG_DONGLE_FTDI_FT232H_BAUD
@@ -104,6 +112,16 @@ config USBDEBUG_DONGLE_FTDI_FT232H_BAUD
connection works with it. Multiples of 115,200 seem to be a good
choice, and EHCI debug usually can't saturate more than 576,000.
+config USBDEBUG_DONGLE_WCH_CH347_BAUD
+ int "WCH CH347 baud rate"
+ default 115200
+ depends on USBDEBUG_DONGLE_WCH_CH347
+ help
+ Select baud rate for CH347 in the range 1200..9,000,000. Make
+ sure that your receiving side supports the same setting and your
+ connection works with it. Multiples of 115,200 seem to be a good
+ choice, and EHCI debug usually can't saturate more than 576,000.
+
config USBDEBUG_OPTIONAL_HUB_PORT
int
default 2 if USBDEBUG_DONGLE_BEAGLEBONE