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