blob: c64f4a6d7b0174f8f5b7d803c463c6dc3b1cc81d [file] [log] [blame]
Masahiro Yamada0b11dbf2015-07-26 02:46:26 +09001#
2# Serial device configuration
3#
4
5menu "Serial drivers"
6
Philipp Tomsichf40574e2017-03-17 20:34:53 +01007config BAUDRATE
8 int "Default baudrate"
9 default 115200
10 help
11 Select a default baudrate, where "default" has a driver-specific
12 meaning of either setting the baudrate for the early debug UART
13 in the SPL stage (most drivers) or for choosing a default baudrate
14 in the absence of an environment setting (serial_mxc.c).
15
Hans de Goede8c458582015-08-08 17:45:18 +020016config REQUIRE_SERIAL_CONSOLE
17 bool "Require a serial port for console"
18 # Running without a serial console is not supported by the
19 # non-dm serial code
20 depends on DM_SERIAL
21 default y
22 help
23 Require a serial port for the console, and panic if none is found
24 during serial port initialization (default y). Set this to n on
25 boards which have no debug serial port whatsoever.
26
Simon Glass92c55b62015-12-13 21:36:58 -070027config SERIAL_PRESENT
28 bool "Provide a serial driver"
29 depends on DM_SERIAL
30 default y
31 help
32 In very space-constrained devices even the full UART driver is too
33 large. In this case the debug UART can still be used in some cases.
34 This option enables the full UART in U-Boot, so if is it disabled,
35 the full UART driver will be omitted, thus saving space.
36
37config SPL_SERIAL_PRESENT
38 bool "Provide a serial driver in SPL"
39 depends on DM_SERIAL
40 default y
41 help
42 In very space-constrained devices even the full UART driver is too
43 large. In this case the debug UART can still be used in some cases.
44 This option enables the full UART in SPL, so if is it disabled,
45 the full UART driver will be omitted, thus saving space.
46
Mylène Josserand7095f862017-04-02 12:59:11 +020047config CONS_INDEX
48 int "UART used for console"
49 depends on ARCH_SUNXI
50 default 2 if MACH_SUN5I
Icenowy Zhenge8f86a02017-04-25 01:39:51 +080051 default 5 if MACH_SUN8I_A23 || MACH_SUN8I_A33
Mylène Josserand7095f862017-04-02 12:59:11 +020052 default 1
53 help
54 Configures the console index.
Icenowy Zhenge8f86a02017-04-25 01:39:51 +080055 For Allwinner SoC., default values are 2 for SUN5I and 5 for A23/A33.
Mylène Josserand7095f862017-04-02 12:59:11 +020056 Otherwise, the index equals 1.
57
Masahiro Yamadada333ae2014-10-23 22:26:09 +090058config DM_SERIAL
59 bool "Enable Driver Model for serial drivers"
60 depends on DM
61 help
Simon Glassf94a1be2015-02-05 21:41:35 -070062 Enable driver model for serial. This replaces
63 drivers/serial/serial.c with the serial uclass, which
64 implements serial_putc() etc. The uclass interface is
65 defined in include/serial.h.
Masahiro Yamadaff247b72014-10-23 22:26:11 +090066
Simon Glass891f7ae2017-04-02 09:50:32 -060067config SPL_DM_SERIAL
Heiko Schocher04249902017-06-21 06:23:10 +020068 bool "Enable Driver Model for serial drivers in SPL"
Simon Glass891f7ae2017-04-02 09:50:32 -060069 depends on DM_SERIAL
70 default y if SPL && DM_SERIAL
71 help
72 Enable driver model for serial in SPL. This replaces
73 drivers/serial/serial.c with the serial uclass, which
74 implements serial_putc() etc. The uclass interface is
75 defined in include/serial.h.
76
77config TPL_DM_SERIAL
Heiko Schocher04249902017-06-21 06:23:10 +020078 bool "Enable Driver Model for serial drivers in TPL"
Simon Glass891f7ae2017-04-02 09:50:32 -060079 depends on DM_SERIAL
80 default y if TPL && DM_SERIAL
81 help
82 Enable driver model for serial in TPL. This replaces
83 drivers/serial/serial.c with the serial uclass, which
84 implements serial_putc() etc. The uclass interface is
85 defined in include/serial.h.
86
Simon Glass2f964aa2015-01-26 18:27:07 -070087config DEBUG_UART
88 bool "Enable an early debug UART for debugging"
89 help
90 The debug UART is intended for use very early in U-Boot to debug
91 problems when an ICE or other debug mechanism is not available.
92
93 To use it you should:
94 - Make sure your UART supports this interface
95 - Enable CONFIG_DEBUG_UART
96 - Enable the CONFIG for your UART to tell it to provide this interface
97 (e.g. CONFIG_DEBUG_UART_NS16550)
98 - Define the required settings as needed (see below)
99 - Call debug_uart_init() before use
100 - Call debug_uart_putc() to output a character
101
102 Depending on your platform it may be possible to use this UART before
103 a stack is available.
104
105 If your UART does not support this interface you can probably add
106 support quite easily. Remember that you cannot use driver model and
107 it is preferred to use no stack.
108
109 You must not use this UART once driver model is working and the
110 serial drivers are up and running (done in serial_init()). Otherwise
111 the drivers may conflict and you will get strange output.
112
Simon Glass21d00432015-01-26 18:27:09 -0700113choice
114 prompt "Select which UART will provide the debug UART"
115 depends on DEBUG_UART
Thomas Choub1e361b2015-11-19 21:48:03 +0800116 default DEBUG_UART_NS16550
Simon Glass21d00432015-01-26 18:27:09 -0700117
Thomas Chou220e8022015-10-23 07:36:37 +0800118config DEBUG_UART_ALTERA_JTAGUART
119 bool "Altera JTAG UART"
120 help
121 Select this to enable a debug UART using the altera_jtag_uart driver.
122 You will need to provide parameters to make this work. The driver will
123 be available until the real driver model serial is running.
124
Thomas Chouda2f8382015-10-21 21:26:54 +0800125config DEBUG_UART_ALTERA_UART
126 bool "Altera UART"
127 help
128 Select this to enable a debug UART using the altera_uart driver.
129 You will need to provide parameters to make this work. The driver will
130 be available until the real driver model serial is running.
131
Wills Wang60b49762016-03-16 16:59:57 +0800132config DEBUG_UART_AR933X
133 bool "QCA/Atheros ar933x"
134 depends on AR933X_UART
135 help
136 Select this to enable a debug UART using the ar933x uart driver.
137 You will need to provide parameters to make this work. The
138 driver will be available until the real driver model serial is
139 running.
140
Wenyou Yang998cf3c2016-10-17 09:49:55 +0800141config DEBUG_UART_ATMEL
142 bool "Atmel USART"
143 help
144 Select this to enable a debug UART using the atmel usart 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
Álvaro Fernández Rojas30581042017-04-25 00:39:16 +0200148config DEBUG_UART_BCM6345
149 bool "BCM6345 UART"
150 depends on BCM6345_SERIAL
151 help
152 Select this to enable a debug UART on BCM6345 SoCs. You
153 will need to provide parameters to make this work. The driver will
154 be available until the real driver model serial is running.
155
Simon Glass21d00432015-01-26 18:27:09 -0700156config DEBUG_UART_NS16550
157 bool "ns16550"
158 help
159 Select this to enable a debug UART using the ns16550 driver. You
160 will need to provide parameters to make this work. The driver will
161 be available until the real driver model serial is running.
162
Simon Glass275854b2015-08-04 12:33:40 -0600163config DEBUG_EFI_CONSOLE
164 bool "EFI"
165 depends on EFI_APP
166 help
167 Select this to enable a debug console which calls back to EFI to
168 output to the console. This can be useful for early debugging of
169 U-Boot when running on top of EFI (Extensive Firmware Interface).
170 This is a type of BIOS used by PCs.
171
Simon Glassbf6e7022015-07-02 18:15:54 -0600172config DEBUG_UART_S5P
173 bool "Samsung S5P"
174 help
175 Select this to enable a debug UART using the serial_s5p driver. You
176 will need to provide parameters to make this work. The driver will
177 be available until the real driver-model serial is running.
178
Beniamino Galvanibfcef282016-05-08 08:30:16 +0200179config DEBUG_UART_MESON
180 bool "Amlogic Meson"
181 depends on MESON_SERIAL
182 help
183 Select this to enable a debug UART using the serial_meson driver. You
184 will need to provide parameters to make this work. The driver will
185 be available until the real driver-model serial is running.
186
Michal Simek4166ba32015-12-14 16:55:10 +0100187config DEBUG_UART_UARTLITE
188 bool "Xilinx Uartlite"
189 help
190 Select this to enable a debug UART using the serial_uartlite driver.
191 You will need to provide parameters to make this work. The driver will
192 be available until the real driver-model serial is running.
193
Michal Simek966bfa72016-02-23 10:02:28 +0100194config DEBUG_UART_ARM_DCC
195 bool "ARM DCC"
196 help
197 Select this to enable a debug UART using the ARM JTAG DCC port.
198 The DCC port can be used for very early debugging and doesn't require
199 any additional setting like address/baudrate/clock. On systems without
200 any serial interface this is the easiest way how to get console.
201 Every ARM core has own DCC port which is the part of debug interface.
202 This port is available at least on ARMv6, ARMv7, ARMv8 and XScale
203 architectures.
204
Stefan Roese6985d492016-05-17 16:36:00 +0200205config DEBUG_MVEBU_A3700_UART
206 bool "Marvell Armada 3700"
207 help
208 Select this to enable a debug UART using the serial_mvebu driver. You
209 will need to provide parameters to make this work. The driver will
210 be available until the real driver-model serial is running.
211
Simon Glassc54c0a42015-10-17 19:41:22 -0600212config DEBUG_UART_ZYNQ
213 bool "Xilinx Zynq"
214 help
Michal Simek6bf87da2015-12-01 14:29:34 +0100215 Select this to enable a debug UART using the serial_zynq driver. You
Simon Glassc54c0a42015-10-17 19:41:22 -0600216 will need to provide parameters to make this work. The driver will
217 be available until the real driver-model serial is running.
218
Francois Retiefe43ce3f2015-10-29 12:55:34 +0200219config DEBUG_UART_APBUART
220 depends on LEON3
221 bool "Gaisler APBUART"
222 help
223 Select this to enable a debug UART using the serial_leon3 driver. You
224 will need to provide parameters to make this work. The driver will
225 be available until the real driver model serial is running.
226
Sergey Temerkhanov19de8152015-10-14 09:54:24 -0700227config DEBUG_UART_PL010
228 bool "pl010"
229 help
230 Select this to enable a debug UART using the pl01x driver with the
231 PL010 UART type. You will need to provide parameters to make this
232 work. The driver will be available until the real driver model
233 serial is running.
234
235config DEBUG_UART_PL011
236 bool "pl011"
237 help
238 Select this to enable a debug UART using the pl01x driver with the
239 PL011 UART type. You will need to provide parameters to make this
240 work. The driver will be available until the real driver model
241 serial is running.
242
Paul Thacker9e160ee2016-01-28 15:30:14 +0530243config DEBUG_UART_PIC32
244 bool "Microchip PIC32"
245 depends on PIC32_SERIAL
246 help
247 Select this to enable a debug UART using the serial_pic32 driver. You
248 will need to provide parameters to make this work. The driver will
249 be available until the real driver model serial is running.
250
Masahiro Yamadad5cf3292016-03-18 16:41:52 +0900251config DEBUG_UART_UNIPHIER
252 bool "UniPhier on-chip UART"
253 depends on ARCH_UNIPHIER
254 help
255 Select this to enable a debug UART using the UniPhier on-chip UART.
256 You will need to provide DEBUG_UART_BASE to make this work. The
257 driver will be available until the real driver-model serial is
258 running.
259
Lokesh Vutlaa52cf082017-04-22 15:57:25 +0530260config DEBUG_UART_OMAP
261 bool "OMAP uart"
262 help
263 Select this to enable a debug UART using the omap ns16550 driver.
264 You will need to provide parameters to make this work. The driver
265 will be available until the real driver model serial is running.
266
Simon Glass21d00432015-01-26 18:27:09 -0700267endchoice
268
Simon Glass2f964aa2015-01-26 18:27:07 -0700269config DEBUG_UART_BASE
270 hex "Base address of UART"
271 depends on DEBUG_UART
272 help
273 This is the base address of your UART for memory-mapped UARTs.
274
275 A default should be provided by your board, but if not you will need
276 to use the correct value here.
277
278config DEBUG_UART_CLOCK
279 int "UART input clock"
280 depends on DEBUG_UART
281 help
282 The UART input clock determines the speed of the internal UART
283 circuitry. The baud rate is derived from this by dividing the input
284 clock down.
285
286 A default should be provided by your board, but if not you will need
287 to use the correct value here.
288
Simon Glassdd0b0122015-02-27 22:06:25 -0700289config DEBUG_UART_SHIFT
290 int "UART register shift"
291 depends on DEBUG_UART
292 default 0 if DEBUG_UART
293 help
294 Some UARTs (notably ns16550) support different register layouts
295 where the registers are spaced either as bytes, words or some other
296 value. Use this value to specify the shift to use, where 0=byte
297 registers, 2=32-bit word registers, etc.
298
Simon Glass0e977bc2015-10-18 19:51:24 -0600299config DEBUG_UART_BOARD_INIT
300 bool "Enable board-specific debug UART init"
301 depends on DEBUG_UART
302 help
303 Some boards need to set things up before the debug UART can be used.
304 On these boards a call to debug_uart_init() is insufficient. When
305 this option is enabled, the function board_debug_uart_init() will
306 be called when debug_uart_init() is called. You can put any code
307 here that is needed to set up the UART ready for use, such as set
308 pin multiplexing or enable clocks.
309
Simon Glassc7fefcb2015-10-18 19:51:25 -0600310config DEBUG_UART_ANNOUNCE
311 bool "Show a message when the debug UART starts up"
312 depends on DEBUG_UART
313 help
314 Enable this option to show a message when the debug UART is ready
315 for use. You will see a message like "<debug_uart> " as soon as
316 U-Boot has the UART ready for use (i.e. your code calls
317 debug_uart_init()). This can be useful just as a check that
318 everything is working.
319
Sergey Temerkhanov19de8152015-10-14 09:54:24 -0700320config DEBUG_UART_SKIP_INIT
321 bool "Skip UART initialization"
322 help
323 Select this if the UART you want to use for debug output is already
324 initialized by the time U-Boot starts its execution.
325
Thomas Chou220e8022015-10-23 07:36:37 +0800326config ALTERA_JTAG_UART
327 bool "Altera JTAG UART support"
328 depends on DM_SERIAL
329 help
330 Select this to enable an JTAG UART for Altera devices.The JTAG UART
331 core implements a method to communicate serial character streams
332 between a host PC and a Qsys system on an Altera FPGA. Please find
333 details on the "Embedded Peripherals IP User Guide" of Altera.
334
335config ALTERA_JTAG_UART_BYPASS
336 bool "Bypass output when no connection"
337 depends on ALTERA_JTAG_UART
338 help
339 Bypass console output and keep going even if there is no JTAG
340 terminal connection with the host. The console output will resume
341 once the JTAG terminal is connected. Without the bypass, the console
342 output will wait forever until a JTAG terminal is connected. If you
343 not are sure, say Y.
344
Thomas Chouda2f8382015-10-21 21:26:54 +0800345config ALTERA_UART
346 bool "Altera UART support"
347 depends on DM_SERIAL
348 help
349 Select this to enable an UART for Altera devices. Please find
350 details on the "Embedded Peripherals IP User Guide" of Altera.
351
Wills Wang60b49762016-03-16 16:59:57 +0800352config AR933X_UART
353 bool "QCA/Atheros ar933x UART support"
354 depends on DM_SERIAL && SOC_AR933X
355 help
356 Select this to enable UART support for QCA/Atheros ar933x
357 devices. This driver uses driver model and requires a device
358 tree binding to operate, please refer to the document at
359 doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
360
Wenyou Yang6ec739a2016-10-17 09:49:54 +0800361config ATMEL_USART
362 bool "Atmel USART support"
363 help
364 Select this to enable USART support for Atmel SoCs. It can be
365 configured in the device tree, and input clock frequency can
366 be got from the clk node.
367
Álvaro Fernández Rojas30581042017-04-25 00:39:16 +0200368config BCM6345_SERIAL
369 bool "Support for BCM6345 UART"
370 depends on DM_SERIAL && ARCH_BMIPS
371 help
372 Select this to enable UART on BCM6345 SoCs.
373
Bin Meng5ed07cf2016-01-13 19:39:00 -0800374config FSL_LPUART
375 bool "Freescale LPUART support"
376 help
377 Select this to enable a Low Power UART for Freescale VF610 and
378 QorIQ Layerscape devices.
379
Stefan Roese6985d492016-05-17 16:36:00 +0200380config MVEBU_A3700_UART
381 bool "UART support for Armada 3700"
382 default n
383 help
384 Choose this option to add support for UART driver on the Marvell
385 Armada 3700 SoC. The base address is configured via DT.
386
Jagan Teki8829e662016-10-08 18:00:08 +0530387config MXC_UART
388 bool "IMX serial port support"
Patrick Bruenn98d62e62016-11-04 11:57:02 +0100389 depends on MX5 || MX6
Jagan Teki8829e662016-10-08 18:00:08 +0530390 help
391 If you have a machine based on a Motorola IMX CPU you
392 can enable its onboard serial port by enabling this option.
393
Paul Thacker9e160ee2016-01-28 15:30:14 +0530394config PIC32_SERIAL
395 bool "Support for Microchip PIC32 on-chip UART"
396 depends on DM_SERIAL && MACH_PIC32
397 default y
398 help
399 Support for the UART found on Microchip PIC32 SoC's.
400
Thomas Chou9e390032015-11-19 21:48:14 +0800401config SYS_NS16550
402 bool "NS16550 UART or compatible"
403 help
404 Support NS16550 UART or compatible. This can be enabled in the
405 device tree with the correct input clock frequency. If the input
406 clock frequency is not defined in the device tree, the macro
407 CONFIG_SYS_NS16550_CLK defined in a legacy board header file will
408 be used. It can be a constant or a function to get clock, eg,
409 get_serial_clock().
410
Andy Shevchenkoc5f8dd42017-02-28 14:04:10 +0200411config INTEL_MID_SERIAL
412 bool "Intel MID platform UART support"
413 depends on DM_SERIAL && OF_CONTROL
414 depends on INTEL_MID
415 select SYS_NS16550
416 help
417 Select this to enable a UART for Intel MID platforms.
418 This uses the ns16550 driver as a library.
419
Simon Glass2fc24d52016-07-04 11:58:24 -0600420config ROCKCHIP_SERIAL
421 bool "Rockchip on-chip UART support"
422 depends on DM_SERIAL && SPL_OF_PLATDATA
423 help
424 Select this to enable a debug UART for Rockchip devices when using
Tom Rini7f73ca42017-01-14 12:20:23 -0500425 CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
Simon Glass2fc24d52016-07-04 11:58:24 -0600426 This uses the ns16550 driver, converting the platdata from of-platdata
427 to the ns16550 format.
428
Simon Glassaf282242015-03-06 13:19:03 -0700429config SANDBOX_SERIAL
430 bool "Sandbox UART support"
Masahiro Yamada2ea65f32015-08-28 20:14:21 +0900431 depends on SANDBOX
Simon Glassaf282242015-03-06 13:19:03 -0700432 help
433 Select this to enable a seral UART for sandbox. This is required to
434 operate correctly, otherwise you will see no serial output from
435 sandbox. The emulated UART will display to the console and console
436 input will be fed into the UART. This allows you to interact with
437 U-Boot.
438
439 The operation of the console is controlled by the -t command-line
440 flag. In raw mode, U-Boot sees all characters from the terminal
441 before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
442 is processed by the terminal, and terminates U-Boot. Valid options
443 are:
444
445 -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot
446 -t raw Raw mode, Ctrl-C is processed by U-Boot
447 -t cooked Cooked mode, Ctrl-C terminates
448
Masahiro Yamadaff247b72014-10-23 22:26:11 +0900449config UNIPHIER_SERIAL
Masahiro Yamadab6ef3a32015-05-29 17:30:01 +0900450 bool "Support for UniPhier on-chip UART"
Masahiro Yamada2ea65f32015-08-28 20:14:21 +0900451 depends on ARCH_UNIPHIER
Masahiro Yamada85dc2fe2016-08-25 19:00:37 +0900452 default y
Masahiro Yamadaff247b72014-10-23 22:26:11 +0900453 help
Masahiro Yamadab6ef3a32015-05-29 17:30:01 +0900454 If you have a UniPhier based board and want to use the on-chip
455 serial ports, say Y to this option. If unsure, say N.
Simon Glassdcfe4a52015-07-27 15:47:23 -0600456
Michal Simek54e24d32015-12-09 12:50:05 +0100457config XILINX_UARTLITE
458 bool "Xilinx Uarlite support"
Ricardo Ribalda Delgado80cce262016-01-26 11:24:19 +0100459 depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx)
Michal Simek54e24d32015-12-09 12:50:05 +0100460 help
461 If you have a Xilinx based board and want to use the uartlite
462 serial ports, say Y to this option. If unsure, say N.
463
Beniamino Galvanibfcef282016-05-08 08:30:16 +0200464config MESON_SERIAL
465 bool "Support for Amlogic Meson UART"
466 depends on DM_SERIAL && ARCH_MESON
467 help
468 If you have an Amlogic Meson based board and want to use the on-chip
469 serial ports, say Y to this option. If unsure, say N.
470
Mateusz Kulikowski142a20c2016-03-31 23:12:14 +0200471config MSM_SERIAL
472 bool "Qualcomm on-chip UART"
473 depends on DM_SERIAL
474 help
475 Support Data Mover UART used on Qualcomm Snapdragon SoCs.
476 It should support all Qualcomm devices with UARTDM version 1.4,
477 for example APQ8016 and MSM8916.
478 Single baudrate is supported in current implementation (115200).
Stefan Roese6985d492016-05-17 16:36:00 +0200479
Marcel Ziswilerd804a5e2016-11-14 21:40:25 +0100480config PXA_SERIAL
481 bool "PXA serial port support"
482 help
483 If you have a machine based on a Marvell XScale PXA2xx CPU you
484 can enable its onboard serial ports by enabling this option.
485
Patrice Chotard214a17e2017-02-21 13:37:07 +0100486config STI_ASC_SERIAL
487 bool "STMicroelectronics on-chip UART"
488 depends on DM_SERIAL && ARCH_STI
489 help
490 Select this to enable Asynchronous Serial Controller available
491 on STiH410 SoC. This is a basic implementation, it supports
492 following baudrate 9600, 19200, 38400, 57600 and 115200.
493
Masahiro Yamada0b11dbf2015-07-26 02:46:26 +0900494endmenu