blob: 36fda75c8df35ff0a939faa5631159a0d8783e4c [file] [log] [blame]
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +02001 # Use "select HAVE_USBDEBUG" on southbridges which have Debug Port code.
2config HAVE_USBDEBUG
3 bool
4 default y if HAVE_USBDEBUG_OPTIONS
5 default n
6
7# Use "select HAVE_USBDEBUG_OPTIONS" on southbridges with multiple
8# EHCI controllers or multiple ports with Debug Port capability
9config HAVE_USBDEBUG_OPTIONS
10 def_bool n
11
12config USBDEBUG
13 bool "USB 2.0 EHCI debug dongle support"
14 default n
15 depends on HAVE_USBDEBUG
16 help
17 This option allows you to use a so-called USB EHCI Debug device
18 (such as the Ajays NET20DC, AMIDebug RX, or a system using the
19 Linux "EHCI Debug Device gadget" driver found in recent kernel)
20 to retrieve the coreboot debug messages (instead, or in addition
21 to, a serial port).
22
23 This feature is NOT supported on all chipsets in coreboot!
24
25 It also requires a USB2 controller which supports the EHCI
26 Debug Port capability.
27
Paul Menzela8843de2017-06-05 12:33:23 +020028 See https://www.coreboot.org/EHCI_Debug_Port for an up-to-date list
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +020029 of supported controllers.
30
31 If unsure, say N.
32
33if USBDEBUG
34
Arthur Heymansadc47532018-12-28 15:48:58 +010035config USBDEBUG_IN_PRE_RAM
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +020036 bool "Enable early (pre-RAM) usbdebug"
37 default y
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +020038 help
39 Configuring USB controllers in system-agent binary may cause
40 problems to usbdebug. Disabling this option delays usbdebug to
41 be setup on entry to ramstage.
42
43 If unsure, say Y.
44
45config USBDEBUG_HCD_INDEX
46 int
47 default 0
48 prompt "Index for EHCI controller to use with usbdebug" if HAVE_USBDEBUG_OPTIONS
49 help
50 Some boards have multiple EHCI controllers with possibly only
51 one having the Debug Port capability on an external USB port.
52
53 Mapping of this index to PCI device functions is southbridge
54 specific and mainboard level Kconfig should already provide
55 a working default value here.
56
57config USBDEBUG_DEFAULT_PORT
58 int
59 default 0
60 prompt "Default USB port to use as Debug Port" if HAVE_USBDEBUG_OPTIONS
61 help
62 Selects which physical USB port usbdebug dongle is connected to.
63 Setting of 0 means to scan possible ports starting from 1.
64
65 Intel platforms have hardwired the debug port location and this
66 setting makes no difference there.
67
68 Hence, if you select the correct port here, you can speed up
69 your boot time. Which USB port number refers to which actual
70 port on your mainboard (potentially also USB pin headers on
71 your mainboard) is highly board-specific, and you'll likely
72 have to find out by trial-and-error.
73
74choice
75 prompt "Type of dongle"
76 default USBDEBUG_DONGLE_STD
77
78config USBDEBUG_DONGLE_STD
Felix Held6d717ae2017-09-11 18:36:18 +020079 bool "USB gadget driver or Net20DC"
80 help
81 Net20DC, BeagleBone Black, Raspberry Pi Zero W
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +020082
83config USBDEBUG_DONGLE_BEAGLEBONE
Stefan Taunerb0622de2018-08-17 09:53:47 +020084 bool "BeagleBone (not BeagleBone Black)"
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +020085 help
86 Use this to configure the USB hub on BeagleBone board.
Felix Held6d717ae2017-09-11 18:36:18 +020087 Do NOT select this for the BeagleBone Black.
Kyösti Mälkkid6060b712013-10-17 18:50:13 +030088
Kyösti Mälkkicc4d3092015-05-03 06:27:11 +030089config USBDEBUG_DONGLE_FTDI_FT232H
90 bool "FTDI FT232H UART"
91 help
92 Use this with FT232H usb-to-uart. Configuration is hard-coded
Nico Huberc868fd12016-11-18 20:11:43 +010093 to use 8n1, no flow control.
Kyösti Mälkkicc4d3092015-05-03 06:27:11 +030094
Nicholas Chin81827aa2022-10-10 20:39:03 -060095config USBDEBUG_DONGLE_WCH_CH347
96 bool "WCH CH347 UART"
97 help
98 Use this with CH347 usb-to-uart. Configuration is hard-coded
99 to use 8n1, no flow control. For compatibility across modes
100 0, 1, and 3, only UART 1 is supported. The UART in mode 2 is
101 not currently supported.
102
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +0200103endchoice
104
Nico Huberc868fd12016-11-18 20:11:43 +0100105config USBDEBUG_DONGLE_FTDI_FT232H_BAUD
106 int "FTDI FT232H baud rate"
107 default 115200
108 depends on USBDEBUG_DONGLE_FTDI_FT232H
109 help
110 Select baud rate for FT232H in the range 733..12,000,000. Make
111 sure that your receiving side supports the same setting and your
112 connection works with it. Multiples of 115,200 seem to be a good
113 choice, and EHCI debug usually can't saturate more than 576,000.
114
Nicholas Chin81827aa2022-10-10 20:39:03 -0600115config USBDEBUG_DONGLE_WCH_CH347_BAUD
116 int "WCH CH347 baud rate"
117 default 115200
118 depends on USBDEBUG_DONGLE_WCH_CH347
119 help
120 Select baud rate for CH347 in the range 1200..9,000,000. Make
121 sure that your receiving side supports the same setting and your
122 connection works with it. Multiples of 115,200 seem to be a good
123 choice, and EHCI debug usually can't saturate more than 576,000.
124
Kyösti Mälkkiab94bbf2014-02-25 12:06:14 +0200125config USBDEBUG_OPTIONAL_HUB_PORT
126 int
127 default 2 if USBDEBUG_DONGLE_BEAGLEBONE
128 default 0
129
130endif # USBDEBUG