Masahiro Yamada | 0b11dbf | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 1 | # |
| 2 | # Serial device configuration |
| 3 | # |
| 4 | |
| 5 | menu "Serial drivers" |
| 6 | |
Hans de Goede | 8c45858 | 2015-08-08 17:45:18 +0200 | [diff] [blame] | 7 | config REQUIRE_SERIAL_CONSOLE |
| 8 | bool "Require a serial port for console" |
| 9 | # Running without a serial console is not supported by the |
| 10 | # non-dm serial code |
| 11 | depends on DM_SERIAL |
| 12 | default y |
| 13 | help |
| 14 | Require a serial port for the console, and panic if none is found |
| 15 | during serial port initialization (default y). Set this to n on |
| 16 | boards which have no debug serial port whatsoever. |
| 17 | |
Masahiro Yamada | da333ae | 2014-10-23 22:26:09 +0900 | [diff] [blame] | 18 | config DM_SERIAL |
| 19 | bool "Enable Driver Model for serial drivers" |
| 20 | depends on DM |
| 21 | help |
Simon Glass | f94a1be | 2015-02-05 21:41:35 -0700 | [diff] [blame] | 22 | Enable driver model for serial. This replaces |
| 23 | drivers/serial/serial.c with the serial uclass, which |
| 24 | implements serial_putc() etc. The uclass interface is |
| 25 | defined in include/serial.h. |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 26 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 27 | config DEBUG_UART |
| 28 | bool "Enable an early debug UART for debugging" |
| 29 | help |
| 30 | The debug UART is intended for use very early in U-Boot to debug |
| 31 | problems when an ICE or other debug mechanism is not available. |
| 32 | |
| 33 | To use it you should: |
| 34 | - Make sure your UART supports this interface |
| 35 | - Enable CONFIG_DEBUG_UART |
| 36 | - Enable the CONFIG for your UART to tell it to provide this interface |
| 37 | (e.g. CONFIG_DEBUG_UART_NS16550) |
| 38 | - Define the required settings as needed (see below) |
| 39 | - Call debug_uart_init() before use |
| 40 | - Call debug_uart_putc() to output a character |
| 41 | |
| 42 | Depending on your platform it may be possible to use this UART before |
| 43 | a stack is available. |
| 44 | |
| 45 | If your UART does not support this interface you can probably add |
| 46 | support quite easily. Remember that you cannot use driver model and |
| 47 | it is preferred to use no stack. |
| 48 | |
| 49 | You must not use this UART once driver model is working and the |
| 50 | serial drivers are up and running (done in serial_init()). Otherwise |
| 51 | the drivers may conflict and you will get strange output. |
| 52 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 53 | choice |
| 54 | prompt "Select which UART will provide the debug UART" |
| 55 | depends on DEBUG_UART |
| 56 | |
Thomas Chou | 220e802 | 2015-10-23 07:36:37 +0800 | [diff] [blame] | 57 | config DEBUG_UART_ALTERA_JTAGUART |
| 58 | bool "Altera JTAG UART" |
| 59 | help |
| 60 | Select this to enable a debug UART using the altera_jtag_uart driver. |
| 61 | You will need to provide parameters to make this work. The driver will |
| 62 | be available until the real driver model serial is running. |
| 63 | |
Thomas Chou | da2f838 | 2015-10-21 21:26:54 +0800 | [diff] [blame] | 64 | config DEBUG_UART_ALTERA_UART |
| 65 | bool "Altera UART" |
| 66 | help |
| 67 | Select this to enable a debug UART using the altera_uart driver. |
| 68 | You will need to provide parameters to make this work. The driver will |
| 69 | be available until the real driver model serial is running. |
| 70 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 71 | config DEBUG_UART_NS16550 |
| 72 | bool "ns16550" |
| 73 | help |
| 74 | Select this to enable a debug UART using the ns16550 driver. You |
| 75 | will need to provide parameters to make this work. The driver will |
| 76 | be available until the real driver model serial is running. |
| 77 | |
Simon Glass | 275854b | 2015-08-04 12:33:40 -0600 | [diff] [blame] | 78 | config DEBUG_EFI_CONSOLE |
| 79 | bool "EFI" |
| 80 | depends on EFI_APP |
| 81 | help |
| 82 | Select this to enable a debug console which calls back to EFI to |
| 83 | output to the console. This can be useful for early debugging of |
| 84 | U-Boot when running on top of EFI (Extensive Firmware Interface). |
| 85 | This is a type of BIOS used by PCs. |
| 86 | |
Simon Glass | bf6e702 | 2015-07-02 18:15:54 -0600 | [diff] [blame] | 87 | config DEBUG_UART_S5P |
| 88 | bool "Samsung S5P" |
| 89 | help |
| 90 | Select this to enable a debug UART using the serial_s5p driver. You |
| 91 | will need to provide parameters to make this work. The driver will |
| 92 | be available until the real driver-model serial is running. |
| 93 | |
Simon Glass | c54c0a4 | 2015-10-17 19:41:22 -0600 | [diff] [blame] | 94 | config DEBUG_UART_ZYNQ |
| 95 | bool "Xilinx Zynq" |
| 96 | help |
| 97 | Select this to enable a debug UART using the serial_s5p driver. You |
| 98 | will need to provide parameters to make this work. The driver will |
| 99 | be available until the real driver-model serial is running. |
| 100 | |
Francois Retief | e43ce3f | 2015-10-29 12:55:34 +0200 | [diff] [blame^] | 101 | config DEBUG_UART_APBUART |
| 102 | depends on LEON3 |
| 103 | bool "Gaisler APBUART" |
| 104 | help |
| 105 | Select this to enable a debug UART using the serial_leon3 driver. You |
| 106 | will need to provide parameters to make this work. The driver will |
| 107 | be available until the real driver model serial is running. |
| 108 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 109 | endchoice |
| 110 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 111 | config DEBUG_UART_BASE |
| 112 | hex "Base address of UART" |
| 113 | depends on DEBUG_UART |
| 114 | help |
| 115 | This is the base address of your UART for memory-mapped UARTs. |
| 116 | |
| 117 | A default should be provided by your board, but if not you will need |
| 118 | to use the correct value here. |
| 119 | |
| 120 | config DEBUG_UART_CLOCK |
| 121 | int "UART input clock" |
| 122 | depends on DEBUG_UART |
| 123 | help |
| 124 | The UART input clock determines the speed of the internal UART |
| 125 | circuitry. The baud rate is derived from this by dividing the input |
| 126 | clock down. |
| 127 | |
| 128 | A default should be provided by your board, but if not you will need |
| 129 | to use the correct value here. |
| 130 | |
Simon Glass | dd0b012 | 2015-02-27 22:06:25 -0700 | [diff] [blame] | 131 | config DEBUG_UART_SHIFT |
| 132 | int "UART register shift" |
| 133 | depends on DEBUG_UART |
| 134 | default 0 if DEBUG_UART |
| 135 | help |
| 136 | Some UARTs (notably ns16550) support different register layouts |
| 137 | where the registers are spaced either as bytes, words or some other |
| 138 | value. Use this value to specify the shift to use, where 0=byte |
| 139 | registers, 2=32-bit word registers, etc. |
| 140 | |
Simon Glass | 0e977bc | 2015-10-18 19:51:24 -0600 | [diff] [blame] | 141 | config DEBUG_UART_BOARD_INIT |
| 142 | bool "Enable board-specific debug UART init" |
| 143 | depends on DEBUG_UART |
| 144 | help |
| 145 | Some boards need to set things up before the debug UART can be used. |
| 146 | On these boards a call to debug_uart_init() is insufficient. When |
| 147 | this option is enabled, the function board_debug_uart_init() will |
| 148 | be called when debug_uart_init() is called. You can put any code |
| 149 | here that is needed to set up the UART ready for use, such as set |
| 150 | pin multiplexing or enable clocks. |
| 151 | |
Simon Glass | c7fefcb | 2015-10-18 19:51:25 -0600 | [diff] [blame] | 152 | config DEBUG_UART_ANNOUNCE |
| 153 | bool "Show a message when the debug UART starts up" |
| 154 | depends on DEBUG_UART |
| 155 | help |
| 156 | Enable this option to show a message when the debug UART is ready |
| 157 | for use. You will see a message like "<debug_uart> " as soon as |
| 158 | U-Boot has the UART ready for use (i.e. your code calls |
| 159 | debug_uart_init()). This can be useful just as a check that |
| 160 | everything is working. |
| 161 | |
Thomas Chou | 220e802 | 2015-10-23 07:36:37 +0800 | [diff] [blame] | 162 | config ALTERA_JTAG_UART |
| 163 | bool "Altera JTAG UART support" |
| 164 | depends on DM_SERIAL |
| 165 | help |
| 166 | Select this to enable an JTAG UART for Altera devices.The JTAG UART |
| 167 | core implements a method to communicate serial character streams |
| 168 | between a host PC and a Qsys system on an Altera FPGA. Please find |
| 169 | details on the "Embedded Peripherals IP User Guide" of Altera. |
| 170 | |
| 171 | config ALTERA_JTAG_UART_BYPASS |
| 172 | bool "Bypass output when no connection" |
| 173 | depends on ALTERA_JTAG_UART |
| 174 | help |
| 175 | Bypass console output and keep going even if there is no JTAG |
| 176 | terminal connection with the host. The console output will resume |
| 177 | once the JTAG terminal is connected. Without the bypass, the console |
| 178 | output will wait forever until a JTAG terminal is connected. If you |
| 179 | not are sure, say Y. |
| 180 | |
Thomas Chou | da2f838 | 2015-10-21 21:26:54 +0800 | [diff] [blame] | 181 | config ALTERA_UART |
| 182 | bool "Altera UART support" |
| 183 | depends on DM_SERIAL |
| 184 | help |
| 185 | Select this to enable an UART for Altera devices. Please find |
| 186 | details on the "Embedded Peripherals IP User Guide" of Altera. |
| 187 | |
Simon Glass | 765a1b1 | 2015-08-30 16:55:19 -0600 | [diff] [blame] | 188 | config ROCKCHIP_SERIAL |
| 189 | bool "Rockchip on-chip UART support" |
Masahiro Yamada | d18f37c | 2015-09-29 12:32:03 +0900 | [diff] [blame] | 190 | depends on ARCH_ROCKCHIP && DM_SERIAL |
Simon Glass | 765a1b1 | 2015-08-30 16:55:19 -0600 | [diff] [blame] | 191 | help |
| 192 | Select this to enable a debug UART for Rockchip devices. This uses |
| 193 | the ns16550 driver. You will need to #define CONFIG_SYS_NS16550 in |
| 194 | your board config header. The clock input is automatically set to |
| 195 | use the oscillator (24MHz). |
| 196 | |
Simon Glass | af28224 | 2015-03-06 13:19:03 -0700 | [diff] [blame] | 197 | config SANDBOX_SERIAL |
| 198 | bool "Sandbox UART support" |
Masahiro Yamada | 2ea65f3 | 2015-08-28 20:14:21 +0900 | [diff] [blame] | 199 | depends on SANDBOX |
Simon Glass | af28224 | 2015-03-06 13:19:03 -0700 | [diff] [blame] | 200 | help |
| 201 | Select this to enable a seral UART for sandbox. This is required to |
| 202 | operate correctly, otherwise you will see no serial output from |
| 203 | sandbox. The emulated UART will display to the console and console |
| 204 | input will be fed into the UART. This allows you to interact with |
| 205 | U-Boot. |
| 206 | |
| 207 | The operation of the console is controlled by the -t command-line |
| 208 | flag. In raw mode, U-Boot sees all characters from the terminal |
| 209 | before they are processed, including Ctrl-C. In cooked mode, Ctrl-C |
| 210 | is processed by the terminal, and terminates U-Boot. Valid options |
| 211 | are: |
| 212 | |
| 213 | -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot |
| 214 | -t raw Raw mode, Ctrl-C is processed by U-Boot |
| 215 | -t cooked Cooked mode, Ctrl-C terminates |
| 216 | |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 217 | config UNIPHIER_SERIAL |
Masahiro Yamada | b6ef3a3 | 2015-05-29 17:30:01 +0900 | [diff] [blame] | 218 | bool "Support for UniPhier on-chip UART" |
Masahiro Yamada | 2ea65f3 | 2015-08-28 20:14:21 +0900 | [diff] [blame] | 219 | depends on ARCH_UNIPHIER |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 220 | help |
Masahiro Yamada | b6ef3a3 | 2015-05-29 17:30:01 +0900 | [diff] [blame] | 221 | If you have a UniPhier based board and want to use the on-chip |
| 222 | serial ports, say Y to this option. If unsure, say N. |
Simon Glass | dcfe4a5 | 2015-07-27 15:47:23 -0600 | [diff] [blame] | 223 | |
| 224 | config X86_SERIAL |
| 225 | bool "Support for 16550 serial port on x86 machines" |
| 226 | depends on X86 |
| 227 | default y |
| 228 | help |
| 229 | Most x86 machines have a ns16550 UART or compatible. This can be |
| 230 | enabled in the device tree with the correct input clock frequency |
| 231 | provided (default 1843200). Enable this to obtain serial console |
| 232 | output. |
Masahiro Yamada | 0b11dbf | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 233 | |
| 234 | endmenu |