Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 1 | # Use "select HAVE_USBDEBUG" on southbridges which have Debug Port code. |
| 2 | config 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 |
| 9 | config HAVE_USBDEBUG_OPTIONS |
| 10 | def_bool n |
| 11 | |
| 12 | config 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 Menzel | a8843de | 2017-06-05 12:33:23 +0200 | [diff] [blame] | 28 | See https://www.coreboot.org/EHCI_Debug_Port for an up-to-date list |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 29 | of supported controllers. |
| 30 | |
| 31 | If unsure, say N. |
| 32 | |
| 33 | if USBDEBUG |
| 34 | |
Arthur Heymans | adc4753 | 2018-12-28 15:48:58 +0100 | [diff] [blame] | 35 | config USBDEBUG_IN_PRE_RAM |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 36 | bool "Enable early (pre-RAM) usbdebug" |
| 37 | default y |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 38 | 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 | |
| 45 | config 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 | |
| 57 | config 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 | |
| 74 | choice |
| 75 | prompt "Type of dongle" |
| 76 | default USBDEBUG_DONGLE_STD |
| 77 | |
| 78 | config USBDEBUG_DONGLE_STD |
Felix Held | 6d717ae | 2017-09-11 18:36:18 +0200 | [diff] [blame] | 79 | bool "USB gadget driver or Net20DC" |
| 80 | help |
| 81 | Net20DC, BeagleBone Black, Raspberry Pi Zero W |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 82 | |
| 83 | config USBDEBUG_DONGLE_BEAGLEBONE |
Stefan Tauner | b0622de | 2018-08-17 09:53:47 +0200 | [diff] [blame] | 84 | bool "BeagleBone (not BeagleBone Black)" |
Kyösti Mälkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 85 | help |
| 86 | Use this to configure the USB hub on BeagleBone board. |
Felix Held | 6d717ae | 2017-09-11 18:36:18 +0200 | [diff] [blame] | 87 | Do NOT select this for the BeagleBone Black. |
Kyösti Mälkki | d6060b71 | 2013-10-17 18:50:13 +0300 | [diff] [blame] | 88 | |
Kyösti Mälkki | cc4d309 | 2015-05-03 06:27:11 +0300 | [diff] [blame] | 89 | config USBDEBUG_DONGLE_FTDI_FT232H |
| 90 | bool "FTDI FT232H UART" |
| 91 | help |
| 92 | Use this with FT232H usb-to-uart. Configuration is hard-coded |
Nico Huber | c868fd1 | 2016-11-18 20:11:43 +0100 | [diff] [blame] | 93 | to use 8n1, no flow control. |
Kyösti Mälkki | cc4d309 | 2015-05-03 06:27:11 +0300 | [diff] [blame] | 94 | |
Nicholas Chin | 81827aa | 2022-10-10 20:39:03 -0600 | [diff] [blame] | 95 | config 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älkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 103 | endchoice |
| 104 | |
Nico Huber | c868fd1 | 2016-11-18 20:11:43 +0100 | [diff] [blame] | 105 | config 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 Chin | 81827aa | 2022-10-10 20:39:03 -0600 | [diff] [blame] | 115 | config 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älkki | ab94bbf | 2014-02-25 12:06:14 +0200 | [diff] [blame] | 125 | config USBDEBUG_OPTIONAL_HUB_PORT |
| 126 | int |
| 127 | default 2 if USBDEBUG_DONGLE_BEAGLEBONE |
| 128 | default 0 |
| 129 | |
| 130 | endif # USBDEBUG |