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 | |
Simon Glass | 92c55b6 | 2015-12-13 21:36:58 -0700 | [diff] [blame] | 18 | config SERIAL_PRESENT |
| 19 | bool "Provide a serial driver" |
| 20 | depends on DM_SERIAL |
| 21 | default y |
| 22 | help |
| 23 | In very space-constrained devices even the full UART driver is too |
| 24 | large. In this case the debug UART can still be used in some cases. |
| 25 | This option enables the full UART in U-Boot, so if is it disabled, |
| 26 | the full UART driver will be omitted, thus saving space. |
| 27 | |
| 28 | config SPL_SERIAL_PRESENT |
| 29 | bool "Provide a serial driver in SPL" |
| 30 | depends on DM_SERIAL |
| 31 | default y |
| 32 | help |
| 33 | In very space-constrained devices even the full UART driver is too |
| 34 | large. In this case the debug UART can still be used in some cases. |
| 35 | This option enables the full UART in SPL, so if is it disabled, |
| 36 | the full UART driver will be omitted, thus saving space. |
| 37 | |
Masahiro Yamada | da333ae | 2014-10-23 22:26:09 +0900 | [diff] [blame] | 38 | config DM_SERIAL |
| 39 | bool "Enable Driver Model for serial drivers" |
| 40 | depends on DM |
| 41 | help |
Simon Glass | f94a1be | 2015-02-05 21:41:35 -0700 | [diff] [blame] | 42 | Enable driver model for serial. This replaces |
| 43 | drivers/serial/serial.c with the serial uclass, which |
| 44 | implements serial_putc() etc. The uclass interface is |
| 45 | defined in include/serial.h. |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 46 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 47 | config DEBUG_UART |
| 48 | bool "Enable an early debug UART for debugging" |
| 49 | help |
| 50 | The debug UART is intended for use very early in U-Boot to debug |
| 51 | problems when an ICE or other debug mechanism is not available. |
| 52 | |
| 53 | To use it you should: |
| 54 | - Make sure your UART supports this interface |
| 55 | - Enable CONFIG_DEBUG_UART |
| 56 | - Enable the CONFIG for your UART to tell it to provide this interface |
| 57 | (e.g. CONFIG_DEBUG_UART_NS16550) |
| 58 | - Define the required settings as needed (see below) |
| 59 | - Call debug_uart_init() before use |
| 60 | - Call debug_uart_putc() to output a character |
| 61 | |
| 62 | Depending on your platform it may be possible to use this UART before |
| 63 | a stack is available. |
| 64 | |
| 65 | If your UART does not support this interface you can probably add |
| 66 | support quite easily. Remember that you cannot use driver model and |
| 67 | it is preferred to use no stack. |
| 68 | |
| 69 | You must not use this UART once driver model is working and the |
| 70 | serial drivers are up and running (done in serial_init()). Otherwise |
| 71 | the drivers may conflict and you will get strange output. |
| 72 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 73 | choice |
| 74 | prompt "Select which UART will provide the debug UART" |
| 75 | depends on DEBUG_UART |
Thomas Chou | b1e361b | 2015-11-19 21:48:03 +0800 | [diff] [blame] | 76 | default DEBUG_UART_NS16550 |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 77 | |
Thomas Chou | 220e802 | 2015-10-23 07:36:37 +0800 | [diff] [blame] | 78 | config DEBUG_UART_ALTERA_JTAGUART |
| 79 | bool "Altera JTAG UART" |
| 80 | help |
| 81 | Select this to enable a debug UART using the altera_jtag_uart driver. |
| 82 | You will need to provide parameters to make this work. The driver will |
| 83 | be available until the real driver model serial is running. |
| 84 | |
Thomas Chou | da2f838 | 2015-10-21 21:26:54 +0800 | [diff] [blame] | 85 | config DEBUG_UART_ALTERA_UART |
| 86 | bool "Altera UART" |
| 87 | help |
| 88 | Select this to enable a debug UART using the altera_uart driver. |
| 89 | You will need to provide parameters to make this work. The driver will |
| 90 | be available until the real driver model serial is running. |
| 91 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 92 | config DEBUG_UART_NS16550 |
| 93 | bool "ns16550" |
| 94 | help |
| 95 | Select this to enable a debug UART using the ns16550 driver. You |
| 96 | will need to provide parameters to make this work. The driver will |
| 97 | be available until the real driver model serial is running. |
| 98 | |
Simon Glass | 275854b | 2015-08-04 12:33:40 -0600 | [diff] [blame] | 99 | config DEBUG_EFI_CONSOLE |
| 100 | bool "EFI" |
| 101 | depends on EFI_APP |
| 102 | help |
| 103 | Select this to enable a debug console which calls back to EFI to |
| 104 | output to the console. This can be useful for early debugging of |
| 105 | U-Boot when running on top of EFI (Extensive Firmware Interface). |
| 106 | This is a type of BIOS used by PCs. |
| 107 | |
Simon Glass | bf6e702 | 2015-07-02 18:15:54 -0600 | [diff] [blame] | 108 | config DEBUG_UART_S5P |
| 109 | bool "Samsung S5P" |
| 110 | help |
| 111 | Select this to enable a debug UART using the serial_s5p driver. You |
| 112 | will need to provide parameters to make this work. The driver will |
| 113 | be available until the real driver-model serial is running. |
| 114 | |
Michal Simek | 4166ba3 | 2015-12-14 16:55:10 +0100 | [diff] [blame] | 115 | config DEBUG_UART_UARTLITE |
| 116 | bool "Xilinx Uartlite" |
| 117 | help |
| 118 | Select this to enable a debug UART using the serial_uartlite driver. |
| 119 | You will need to provide parameters to make this work. The driver will |
| 120 | be available until the real driver-model serial is running. |
| 121 | |
Michal Simek | 966bfa7 | 2016-02-23 10:02:28 +0100 | [diff] [blame] | 122 | config DEBUG_UART_ARM_DCC |
| 123 | bool "ARM DCC" |
| 124 | help |
| 125 | Select this to enable a debug UART using the ARM JTAG DCC port. |
| 126 | The DCC port can be used for very early debugging and doesn't require |
| 127 | any additional setting like address/baudrate/clock. On systems without |
| 128 | any serial interface this is the easiest way how to get console. |
| 129 | Every ARM core has own DCC port which is the part of debug interface. |
| 130 | This port is available at least on ARMv6, ARMv7, ARMv8 and XScale |
| 131 | architectures. |
| 132 | |
Simon Glass | c54c0a4 | 2015-10-17 19:41:22 -0600 | [diff] [blame] | 133 | config DEBUG_UART_ZYNQ |
| 134 | bool "Xilinx Zynq" |
| 135 | help |
Michal Simek | 6bf87da | 2015-12-01 14:29:34 +0100 | [diff] [blame] | 136 | Select this to enable a debug UART using the serial_zynq driver. You |
Simon Glass | c54c0a4 | 2015-10-17 19:41:22 -0600 | [diff] [blame] | 137 | will need to provide parameters to make this work. The driver will |
| 138 | be available until the real driver-model serial is running. |
| 139 | |
Francois Retief | e43ce3f | 2015-10-29 12:55:34 +0200 | [diff] [blame] | 140 | config DEBUG_UART_APBUART |
| 141 | depends on LEON3 |
| 142 | bool "Gaisler APBUART" |
| 143 | help |
| 144 | Select this to enable a debug UART using the serial_leon3 driver. You |
| 145 | will need to provide parameters to make this work. The driver will |
| 146 | be available until the real driver model serial is running. |
| 147 | |
Sergey Temerkhanov | 19de815 | 2015-10-14 09:54:24 -0700 | [diff] [blame] | 148 | config DEBUG_UART_PL010 |
| 149 | bool "pl010" |
| 150 | help |
| 151 | Select this to enable a debug UART using the pl01x driver with the |
| 152 | PL010 UART type. You will need to provide parameters to make this |
| 153 | work. The driver will be available until the real driver model |
| 154 | serial is running. |
| 155 | |
| 156 | config DEBUG_UART_PL011 |
| 157 | bool "pl011" |
| 158 | help |
| 159 | Select this to enable a debug UART using the pl01x driver with the |
| 160 | PL011 UART type. You will need to provide parameters to make this |
| 161 | work. The driver will be available until the real driver model |
| 162 | serial is running. |
| 163 | |
Paul Thacker | 9e160ee | 2016-01-28 15:30:14 +0530 | [diff] [blame] | 164 | config DEBUG_UART_PIC32 |
| 165 | bool "Microchip PIC32" |
| 166 | depends on PIC32_SERIAL |
| 167 | help |
| 168 | Select this to enable a debug UART using the serial_pic32 driver. You |
| 169 | will need to provide parameters to make this work. The driver will |
| 170 | be available until the real driver model serial is running. |
| 171 | |
Simon Glass | 21d0043 | 2015-01-26 18:27:09 -0700 | [diff] [blame] | 172 | endchoice |
| 173 | |
Simon Glass | 2f964aa | 2015-01-26 18:27:07 -0700 | [diff] [blame] | 174 | config DEBUG_UART_BASE |
| 175 | hex "Base address of UART" |
| 176 | depends on DEBUG_UART |
| 177 | help |
| 178 | This is the base address of your UART for memory-mapped UARTs. |
| 179 | |
| 180 | A default should be provided by your board, but if not you will need |
| 181 | to use the correct value here. |
| 182 | |
| 183 | config DEBUG_UART_CLOCK |
| 184 | int "UART input clock" |
| 185 | depends on DEBUG_UART |
| 186 | help |
| 187 | The UART input clock determines the speed of the internal UART |
| 188 | circuitry. The baud rate is derived from this by dividing the input |
| 189 | clock down. |
| 190 | |
| 191 | A default should be provided by your board, but if not you will need |
| 192 | to use the correct value here. |
| 193 | |
Simon Glass | dd0b012 | 2015-02-27 22:06:25 -0700 | [diff] [blame] | 194 | config DEBUG_UART_SHIFT |
| 195 | int "UART register shift" |
| 196 | depends on DEBUG_UART |
| 197 | default 0 if DEBUG_UART |
| 198 | help |
| 199 | Some UARTs (notably ns16550) support different register layouts |
| 200 | where the registers are spaced either as bytes, words or some other |
| 201 | value. Use this value to specify the shift to use, where 0=byte |
| 202 | registers, 2=32-bit word registers, etc. |
| 203 | |
Simon Glass | 0e977bc | 2015-10-18 19:51:24 -0600 | [diff] [blame] | 204 | config DEBUG_UART_BOARD_INIT |
| 205 | bool "Enable board-specific debug UART init" |
| 206 | depends on DEBUG_UART |
| 207 | help |
| 208 | Some boards need to set things up before the debug UART can be used. |
| 209 | On these boards a call to debug_uart_init() is insufficient. When |
| 210 | this option is enabled, the function board_debug_uart_init() will |
| 211 | be called when debug_uart_init() is called. You can put any code |
| 212 | here that is needed to set up the UART ready for use, such as set |
| 213 | pin multiplexing or enable clocks. |
| 214 | |
Simon Glass | c7fefcb | 2015-10-18 19:51:25 -0600 | [diff] [blame] | 215 | config DEBUG_UART_ANNOUNCE |
| 216 | bool "Show a message when the debug UART starts up" |
| 217 | depends on DEBUG_UART |
| 218 | help |
| 219 | Enable this option to show a message when the debug UART is ready |
| 220 | for use. You will see a message like "<debug_uart> " as soon as |
| 221 | U-Boot has the UART ready for use (i.e. your code calls |
| 222 | debug_uart_init()). This can be useful just as a check that |
| 223 | everything is working. |
| 224 | |
Sergey Temerkhanov | 19de815 | 2015-10-14 09:54:24 -0700 | [diff] [blame] | 225 | config DEBUG_UART_SKIP_INIT |
| 226 | bool "Skip UART initialization" |
| 227 | help |
| 228 | Select this if the UART you want to use for debug output is already |
| 229 | initialized by the time U-Boot starts its execution. |
| 230 | |
Thomas Chou | 220e802 | 2015-10-23 07:36:37 +0800 | [diff] [blame] | 231 | config ALTERA_JTAG_UART |
| 232 | bool "Altera JTAG UART support" |
| 233 | depends on DM_SERIAL |
| 234 | help |
| 235 | Select this to enable an JTAG UART for Altera devices.The JTAG UART |
| 236 | core implements a method to communicate serial character streams |
| 237 | between a host PC and a Qsys system on an Altera FPGA. Please find |
| 238 | details on the "Embedded Peripherals IP User Guide" of Altera. |
| 239 | |
| 240 | config ALTERA_JTAG_UART_BYPASS |
| 241 | bool "Bypass output when no connection" |
| 242 | depends on ALTERA_JTAG_UART |
| 243 | help |
| 244 | Bypass console output and keep going even if there is no JTAG |
| 245 | terminal connection with the host. The console output will resume |
| 246 | once the JTAG terminal is connected. Without the bypass, the console |
| 247 | output will wait forever until a JTAG terminal is connected. If you |
| 248 | not are sure, say Y. |
| 249 | |
Thomas Chou | da2f838 | 2015-10-21 21:26:54 +0800 | [diff] [blame] | 250 | config ALTERA_UART |
| 251 | bool "Altera UART support" |
| 252 | depends on DM_SERIAL |
| 253 | help |
| 254 | Select this to enable an UART for Altera devices. Please find |
| 255 | details on the "Embedded Peripherals IP User Guide" of Altera. |
| 256 | |
Bin Meng | 5ed07cf | 2016-01-13 19:39:00 -0800 | [diff] [blame] | 257 | config FSL_LPUART |
| 258 | bool "Freescale LPUART support" |
| 259 | help |
| 260 | Select this to enable a Low Power UART for Freescale VF610 and |
| 261 | QorIQ Layerscape devices. |
| 262 | |
Paul Thacker | 9e160ee | 2016-01-28 15:30:14 +0530 | [diff] [blame] | 263 | config PIC32_SERIAL |
| 264 | bool "Support for Microchip PIC32 on-chip UART" |
| 265 | depends on DM_SERIAL && MACH_PIC32 |
| 266 | default y |
| 267 | help |
| 268 | Support for the UART found on Microchip PIC32 SoC's. |
| 269 | |
Thomas Chou | 9e39003 | 2015-11-19 21:48:14 +0800 | [diff] [blame] | 270 | config SYS_NS16550 |
| 271 | bool "NS16550 UART or compatible" |
| 272 | help |
| 273 | Support NS16550 UART or compatible. This can be enabled in the |
| 274 | device tree with the correct input clock frequency. If the input |
| 275 | clock frequency is not defined in the device tree, the macro |
| 276 | CONFIG_SYS_NS16550_CLK defined in a legacy board header file will |
| 277 | be used. It can be a constant or a function to get clock, eg, |
| 278 | get_serial_clock(). |
| 279 | |
Simon Glass | af28224 | 2015-03-06 13:19:03 -0700 | [diff] [blame] | 280 | config SANDBOX_SERIAL |
| 281 | bool "Sandbox UART support" |
Masahiro Yamada | 2ea65f3 | 2015-08-28 20:14:21 +0900 | [diff] [blame] | 282 | depends on SANDBOX |
Simon Glass | af28224 | 2015-03-06 13:19:03 -0700 | [diff] [blame] | 283 | help |
| 284 | Select this to enable a seral UART for sandbox. This is required to |
| 285 | operate correctly, otherwise you will see no serial output from |
| 286 | sandbox. The emulated UART will display to the console and console |
| 287 | input will be fed into the UART. This allows you to interact with |
| 288 | U-Boot. |
| 289 | |
| 290 | The operation of the console is controlled by the -t command-line |
| 291 | flag. In raw mode, U-Boot sees all characters from the terminal |
| 292 | before they are processed, including Ctrl-C. In cooked mode, Ctrl-C |
| 293 | is processed by the terminal, and terminates U-Boot. Valid options |
| 294 | are: |
| 295 | |
| 296 | -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot |
| 297 | -t raw Raw mode, Ctrl-C is processed by U-Boot |
| 298 | -t cooked Cooked mode, Ctrl-C terminates |
| 299 | |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 300 | config UNIPHIER_SERIAL |
Masahiro Yamada | b6ef3a3 | 2015-05-29 17:30:01 +0900 | [diff] [blame] | 301 | bool "Support for UniPhier on-chip UART" |
Masahiro Yamada | 2ea65f3 | 2015-08-28 20:14:21 +0900 | [diff] [blame] | 302 | depends on ARCH_UNIPHIER |
Masahiro Yamada | ff247b7 | 2014-10-23 22:26:11 +0900 | [diff] [blame] | 303 | help |
Masahiro Yamada | b6ef3a3 | 2015-05-29 17:30:01 +0900 | [diff] [blame] | 304 | If you have a UniPhier based board and want to use the on-chip |
| 305 | serial ports, say Y to this option. If unsure, say N. |
Simon Glass | dcfe4a5 | 2015-07-27 15:47:23 -0600 | [diff] [blame] | 306 | |
Michal Simek | 54e24d3 | 2015-12-09 12:50:05 +0100 | [diff] [blame] | 307 | config XILINX_UARTLITE |
| 308 | bool "Xilinx Uarlite support" |
Ricardo Ribalda Delgado | 80cce26 | 2016-01-26 11:24:19 +0100 | [diff] [blame] | 309 | depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx) |
Michal Simek | 54e24d3 | 2015-12-09 12:50:05 +0100 | [diff] [blame] | 310 | help |
| 311 | If you have a Xilinx based board and want to use the uartlite |
| 312 | serial ports, say Y to this option. If unsure, say N. |
| 313 | |
Masahiro Yamada | 0b11dbf | 2015-07-26 02:46:26 +0900 | [diff] [blame] | 314 | endmenu |