]> git.sur5r.net Git - u-boot/blob - drivers/serial/Kconfig
93e602e0ee0edfabfd79943843e20b688d8672fe
[u-boot] / drivers / serial / Kconfig
1 #
2 # Serial device configuration
3 #
4
5 menu "Serial drivers"
6
7 config 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
16 config 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
27 config 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
37 config 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
47 config CONS_INDEX
48         int "UART used for console"
49         depends on ARCH_SUNXI
50         default 2 if MACH_SUN5I
51         default 5 if MACH_SUN8I_A23 || MACH_SUN8I_A33
52         default 1
53         help
54           Configures the console index.
55           For Allwinner SoC., default values are 2 for SUN5I and 5 for A23/A33.
56           Otherwise, the index equals 1.
57
58 config DM_SERIAL
59         bool "Enable Driver Model for serial drivers"
60         depends on DM
61         help
62           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.
66
67 config SERIAL_RX_BUFFER
68         bool "Enable RX buffer for serial input"
69         depends on DM_SERIAL
70         help
71           Enable RX buffer support for the serial driver. This enables
72           pasting longer strings, even when the RX FIFO of the UART is
73           not big enough (e.g. 16 bytes on the normal NS16550).
74
75 config SERIAL_RX_BUFFER_SIZE
76         int "RX buffer size"
77         depends on SERIAL_RX_BUFFER
78         default 256
79         help
80           The size of the RX buffer (needs to be power of 2)
81
82 config SERIAL_SEARCH_ALL
83         bool "Search for serial devices after default one failed"
84         depends on DM_SERIAL
85         help
86           The serial subsystem only searches for a single serial device
87           that was instantiated, but does not check whether it was probed
88           correctly. With this option set, we make successful probing
89           mandatory and search for fallback serial devices if the default
90           device does not work.
91
92           If unsure, say N.
93
94 config SPL_DM_SERIAL
95         bool "Enable Driver Model for serial drivers in SPL"
96         depends on DM_SERIAL
97         default y if SPL && DM_SERIAL
98         help
99           Enable driver model for serial in SPL. This replaces
100           drivers/serial/serial.c with the serial uclass, which
101           implements serial_putc() etc. The uclass interface is
102           defined in include/serial.h.
103
104 config TPL_DM_SERIAL
105         bool "Enable Driver Model for serial drivers in TPL"
106         depends on DM_SERIAL
107         default y if TPL && DM_SERIAL
108         help
109           Enable driver model for serial in TPL. This replaces
110           drivers/serial/serial.c with the serial uclass, which
111           implements serial_putc() etc. The uclass interface is
112           defined in include/serial.h.
113
114 config DEBUG_UART
115         bool "Enable an early debug UART for debugging"
116         help
117           The debug UART is intended for use very early in U-Boot to debug
118           problems when an ICE or other debug mechanism is not available.
119
120           To use it you should:
121           - Make sure your UART supports this interface
122           - Enable CONFIG_DEBUG_UART
123           - Enable the CONFIG for your UART to tell it to provide this interface
124                 (e.g. CONFIG_DEBUG_UART_NS16550)
125           - Define the required settings as needed (see below)
126           - Call debug_uart_init() before use
127           - Call debug_uart_putc() to output a character
128
129           Depending on your platform it may be possible to use this UART before
130           a stack is available.
131
132           If your UART does not support this interface you can probably add
133           support quite easily. Remember that you cannot use driver model and
134           it is preferred to use no stack.
135
136           You must not use this UART once driver model is working and the
137           serial drivers are up and running (done in serial_init()). Otherwise
138           the drivers may conflict and you will get strange output.
139
140 choice
141         prompt "Select which UART will provide the debug UART"
142         depends on DEBUG_UART
143         default DEBUG_UART_NS16550
144
145 config DEBUG_UART_ALTERA_JTAGUART
146         bool "Altera JTAG UART"
147         help
148           Select this to enable a debug UART using the altera_jtag_uart driver.
149           You will need to provide parameters to make this work. The driver will
150           be available until the real driver model serial is running.
151
152 config DEBUG_UART_ALTERA_UART
153         bool "Altera UART"
154         help
155           Select this to enable a debug UART using the altera_uart driver.
156           You will need to provide parameters to make this work. The driver will
157           be available until the real driver model serial is running.
158
159 config DEBUG_UART_AR933X
160         bool "QCA/Atheros ar933x"
161         depends on AR933X_UART
162         help
163           Select this to enable a debug UART using the ar933x uart driver.
164           You will need to provide parameters to make this work. The
165           driver will be available until the real driver model serial is
166           running.
167
168 config DEBUG_UART_ATMEL
169         bool "Atmel USART"
170         help
171           Select this to enable a debug UART using the atmel usart driver. You
172           will need to provide parameters to make this work. The driver will
173           be available until the real driver-model serial is running.
174
175 config DEBUG_UART_BCM6345
176         bool "BCM6345 UART"
177         depends on BCM6345_SERIAL
178         help
179           Select this to enable a debug UART on BCM6345 SoCs. You
180           will need to provide parameters to make this work. The driver will
181           be available until the real driver model serial is running.
182
183 config DEBUG_UART_NS16550
184         bool "ns16550"
185         help
186           Select this to enable a debug UART using the ns16550 driver. You
187           will need to provide parameters to make this work. The driver will
188           be available until the real driver model serial is running.
189
190 config DEBUG_EFI_CONSOLE
191         bool "EFI"
192         depends on EFI_APP
193         help
194           Select this to enable a debug console which calls back to EFI to
195           output to the console. This can be useful for early debugging of
196           U-Boot when running on top of EFI (Extensive Firmware Interface).
197           This is a type of BIOS used by PCs.
198
199 config DEBUG_UART_S5P
200         bool "Samsung S5P"
201         help
202           Select this to enable a debug UART using the serial_s5p driver. You
203           will need to provide parameters to make this work. The driver will
204           be available until the real driver-model serial is running.
205
206 config DEBUG_UART_MESON
207         bool "Amlogic Meson"
208         depends on MESON_SERIAL
209         help
210           Select this to enable a debug UART using the serial_meson driver. You
211           will need to provide parameters to make this work. The driver will
212           be available until the real driver-model serial is running.
213
214 config DEBUG_UART_UARTLITE
215         bool "Xilinx Uartlite"
216         help
217           Select this to enable a debug UART using the serial_uartlite driver.
218           You will need to provide parameters to make this work. The driver will
219           be available until the real driver-model serial is running.
220
221 config DEBUG_UART_ARM_DCC
222         bool "ARM DCC"
223         help
224           Select this to enable a debug UART using the ARM JTAG DCC port.
225           The DCC port can be used for very early debugging and doesn't require
226           any additional setting like address/baudrate/clock. On systems without
227           any serial interface this is the easiest way how to get console.
228           Every ARM core has own DCC port which is the part of debug interface.
229           This port is available at least on ARMv6, ARMv7, ARMv8 and XScale
230           architectures.
231
232 config DEBUG_MVEBU_A3700_UART
233         bool "Marvell Armada 3700"
234         help
235           Select this to enable a debug UART using the serial_mvebu driver. You
236           will need to provide parameters to make this work. The driver will
237           be available until the real driver-model serial is running.
238
239 config DEBUG_UART_ZYNQ
240         bool "Xilinx Zynq"
241         help
242           Select this to enable a debug UART using the serial_zynq driver. You
243           will need to provide parameters to make this work. The driver will
244           be available until the real driver-model serial is running.
245
246 config DEBUG_UART_APBUART
247         depends on LEON3
248         bool "Gaisler APBUART"
249         help
250           Select this to enable a debug UART using the serial_leon3 driver. You
251           will need to provide parameters to make this work. The driver will
252           be available until the real driver model serial is running.
253
254 config DEBUG_UART_PL010
255         bool "pl010"
256         help
257           Select this to enable a debug UART using the pl01x driver with the
258           PL010 UART type. You will need to provide parameters to make this
259           work. The driver will be available until the real driver model
260           serial is running.
261
262 config DEBUG_UART_PL011
263         bool "pl011"
264         help
265           Select this to enable a debug UART using the pl01x driver with the
266           PL011 UART type. You will need to provide parameters to make this
267           work. The driver will be available until the real driver model
268           serial is running.
269
270 config DEBUG_UART_PIC32
271         bool "Microchip PIC32"
272         depends on PIC32_SERIAL
273         help
274           Select this to enable a debug UART using the serial_pic32 driver. You
275           will need to provide parameters to make this work. The driver will
276           be available until the real driver model serial is running.
277
278 config DEBUG_UART_MXC
279         bool "IMX Serial port"
280         depends on MXC_UART
281         help
282           Select this to enable a debug UART using the serial_mxc driver. You
283           will need to provide parameters to make this work. The driver will
284           be available until the real driver model serial is running.
285
286 config DEBUG_UART_UNIPHIER
287         bool "UniPhier on-chip UART"
288         depends on ARCH_UNIPHIER
289         help
290           Select this to enable a debug UART using the UniPhier on-chip UART.
291           You will need to provide DEBUG_UART_BASE to make this work.  The
292           driver will be available until the real driver-model serial is
293           running.
294
295 config DEBUG_UART_OMAP
296         bool "OMAP uart"
297         help
298           Select this to enable a debug UART using the omap ns16550 driver.
299           You will need to provide parameters to make this work. The driver
300           will be available until the real driver model serial is running.
301
302 endchoice
303
304 config DEBUG_UART_BASE
305         hex "Base address of UART"
306         depends on DEBUG_UART
307         help
308           This is the base address of your UART for memory-mapped UARTs.
309
310           A default should be provided by your board, but if not you will need
311           to use the correct value here.
312
313 config DEBUG_UART_CLOCK
314         int "UART input clock"
315         depends on DEBUG_UART
316         help
317           The UART input clock determines the speed of the internal UART
318           circuitry. The baud rate is derived from this by dividing the input
319           clock down.
320
321           A default should be provided by your board, but if not you will need
322           to use the correct value here.
323
324 config DEBUG_UART_SHIFT
325         int "UART register shift"
326         depends on DEBUG_UART
327         default 0 if DEBUG_UART
328         help
329           Some UARTs (notably ns16550) support different register layouts
330           where the registers are spaced either as bytes, words or some other
331           value. Use this value to specify the shift to use, where 0=byte
332           registers, 2=32-bit word registers, etc.
333
334 config DEBUG_UART_BOARD_INIT
335         bool "Enable board-specific debug UART init"
336         depends on DEBUG_UART
337         help
338           Some boards need to set things up before the debug UART can be used.
339           On these boards a call to debug_uart_init() is insufficient. When
340           this option is enabled, the function board_debug_uart_init() will
341           be called when debug_uart_init() is called. You can put any code
342           here that is needed to set up the UART ready for use, such as set
343           pin multiplexing or enable clocks.
344
345 config DEBUG_UART_ANNOUNCE
346         bool "Show a message when the debug UART starts up"
347         depends on DEBUG_UART
348         help
349           Enable this option to show a message when the debug UART is ready
350           for use. You will see a message like "<debug_uart> " as soon as
351           U-Boot has the UART ready for use (i.e. your code calls
352           debug_uart_init()). This can be useful just as a check that
353           everything is working.
354
355 config DEBUG_UART_SKIP_INIT
356         bool "Skip UART initialization"
357         help
358           Select this if the UART you want to use for debug output is already
359           initialized by the time U-Boot starts its execution.
360
361 config ALTERA_JTAG_UART
362         bool "Altera JTAG UART support"
363         depends on DM_SERIAL
364         help
365           Select this to enable an JTAG UART for Altera devices.The JTAG UART
366           core implements a method to communicate serial character streams
367           between a host PC and a Qsys system on an Altera FPGA. Please find
368           details on the "Embedded Peripherals IP User Guide" of Altera.
369
370 config ALTERA_JTAG_UART_BYPASS
371         bool "Bypass output when no connection"
372         depends on ALTERA_JTAG_UART
373         help
374           Bypass console output and keep going even if there is no JTAG
375           terminal connection with the host. The console output will resume
376           once the JTAG terminal is connected. Without the bypass, the console
377           output will wait forever until a JTAG terminal is connected. If you
378           not are sure, say Y.
379
380 config ALTERA_UART
381         bool "Altera UART support"
382         depends on DM_SERIAL
383         help
384           Select this to enable an UART for Altera devices. Please find
385           details on the "Embedded Peripherals IP User Guide" of Altera.
386
387 config AR933X_UART
388         bool "QCA/Atheros ar933x UART support"
389         depends on DM_SERIAL && SOC_AR933X
390         help
391           Select this to enable UART support for QCA/Atheros ar933x
392           devices. This driver uses driver model and requires a device
393           tree binding to operate, please refer to the document at
394           doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
395
396 config ATMEL_USART
397         bool "Atmel USART support"
398         help
399           Select this to enable USART support for Atmel SoCs. It can be
400           configured in the device tree, and input clock frequency can
401           be got from the clk node.
402
403 config BCM283X_MU_SERIAL
404         bool "Support for BCM283x Mini-UART"
405         depends on DM_SERIAL && ARCH_BCM283X
406         default y
407         help
408           Select this to enable Mini-UART support on BCM283X family of SoCs.
409
410 config BCM283X_PL011_SERIAL
411         bool "Support for BCM283x PL011 UART"
412         depends on PL01X_SERIAL && ARCH_BCM283X
413         default y
414         help
415           Select this to enable an overriding PL011 driver for BCM283X SoCs
416           that supports automatic disable, so that it only gets used when
417           the UART is actually muxed.
418
419 config BCM6345_SERIAL
420         bool "Support for BCM6345 UART"
421         depends on DM_SERIAL && ARCH_BMIPS
422         help
423           Select this to enable UART on BCM6345 SoCs.
424
425 config FSL_LPUART
426         bool "Freescale LPUART support"
427         help
428           Select this to enable a Low Power UART for Freescale VF610 and
429           QorIQ Layerscape devices.
430
431 config MVEBU_A3700_UART
432         bool "UART support for Armada 3700"
433         default n
434         help
435           Choose this option to add support for UART driver on the Marvell
436           Armada 3700 SoC. The base address is configured via DT.
437
438 config MXC_UART
439         bool "IMX serial port support"
440         depends on MX5 || MX6
441         help
442           If you have a machine based on a Motorola IMX CPU you
443           can enable its onboard serial port by enabling this option.
444
445 config NULLDEV_SERIAL
446         bool "Null serial device"
447         help
448           Select this to enable null serial device support. A null serial
449           device merely acts as a placeholder for a serial device and does
450           nothing for all it's operation.
451
452 config PIC32_SERIAL
453         bool "Support for Microchip PIC32 on-chip UART"
454         depends on DM_SERIAL && MACH_PIC32
455         default y
456         help
457           Support for the UART found on Microchip PIC32 SoC's.
458
459 config SYS_NS16550
460         bool "NS16550 UART or compatible"
461         help
462           Support NS16550 UART or compatible. This can be enabled in the
463           device tree with the correct input clock frequency. If the input
464           clock frequency is not defined in the device tree, the macro
465           CONFIG_SYS_NS16550_CLK defined in a legacy board header file will
466           be used. It can be a constant or a function to get clock, eg,
467           get_serial_clock().
468
469 config INTEL_MID_SERIAL
470         bool "Intel MID platform UART support"
471         depends on DM_SERIAL && OF_CONTROL
472         depends on INTEL_MID
473         select SYS_NS16550
474         help
475           Select this to enable a UART for Intel MID platforms.
476           This uses the ns16550 driver as a library.
477
478 config PL010_SERIAL
479         bool "ARM PL010 driver"
480         depends on !DM_SERIAL
481         help
482           Select this to enable a UART for platforms using PL010.
483
484 config PL011_SERIAL
485         bool "ARM PL011 driver"
486         depends on !DM_SERIAL
487         help
488           Select this to enable a UART for platforms using PL011.
489
490 config PL01X_SERIAL
491         bool "ARM PL010 and PL011 driver"
492         depends on DM_SERIAL
493         help
494           Select this to enable a UART for platforms using PL010 or PL011.
495
496 config ROCKCHIP_SERIAL
497         bool "Rockchip on-chip UART support"
498         depends on DM_SERIAL && SPL_OF_PLATDATA
499         help
500           Select this to enable a debug UART for Rockchip devices when using
501           CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
502           This uses the ns16550 driver, converting the platdata from of-platdata
503           to the ns16550 format.
504
505 config SANDBOX_SERIAL
506         bool "Sandbox UART support"
507         depends on SANDBOX
508         help
509           Select this to enable a seral UART for sandbox. This is required to
510           operate correctly, otherwise you will see no serial output from
511           sandbox. The emulated UART will display to the console and console
512           input will be fed into the UART. This allows you to interact with
513           U-Boot.
514
515           The operation of the console is controlled by the -t command-line
516           flag. In raw mode, U-Boot sees all characters from the terminal
517           before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
518           is processed by the terminal, and terminates U-Boot. Valid options
519           are:
520
521              -t raw-with-sigs   Raw mode, Ctrl-C will terminate U-Boot
522              -t raw             Raw mode, Ctrl-C is processed by U-Boot
523              -t cooked          Cooked mode, Ctrl-C terminates
524
525 config SCIF_CONSOLE
526         bool "Renesas SCIF UART support"
527         depends on SH || ARCH_RMOBILE
528         help
529           Select this to enable Renesas SCIF UART. To operate serial ports
530           on systems with RCar or SH SoCs, say Y to this option. If unsure,
531           say N.
532
533 config UNIPHIER_SERIAL
534         bool "Support for UniPhier on-chip UART"
535         depends on ARCH_UNIPHIER
536         default y
537         help
538           If you have a UniPhier based board and want to use the on-chip
539           serial ports, say Y to this option. If unsure, say N.
540
541 config XILINX_UARTLITE
542         bool "Xilinx Uarlite support"
543         depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx)
544         help
545           If you have a Xilinx based board and want to use the uartlite
546           serial ports, say Y to this option. If unsure, say N.
547
548 config MESON_SERIAL
549         bool "Support for Amlogic Meson UART"
550         depends on DM_SERIAL && ARCH_MESON
551         help
552           If you have an Amlogic Meson based board and want to use the on-chip
553           serial ports, say Y to this option. If unsure, say N.
554
555 config MSM_SERIAL
556         bool "Qualcomm on-chip UART"
557         depends on DM_SERIAL
558         help
559           Support Data Mover UART used on Qualcomm Snapdragon SoCs.
560           It should support all Qualcomm devices with UARTDM version 1.4,
561           for example APQ8016 and MSM8916.
562           Single baudrate is supported in current implementation (115200).
563
564 config PXA_SERIAL
565         bool "PXA serial port support"
566         help
567           If you have a machine based on a Marvell XScale PXA2xx CPU you
568           can enable its onboard serial ports by enabling this option.
569
570 config STI_ASC_SERIAL
571         bool "STMicroelectronics on-chip UART"
572         depends on DM_SERIAL && ARCH_STI
573         help
574           Select this to enable Asynchronous Serial Controller available
575           on STiH410 SoC. This is a basic implementation,  it supports
576           following baudrate 9600, 19200, 38400, 57600 and 115200.
577
578 config STM32_SERIAL
579         bool "STMicroelectronics STM32 SoCs on-chip UART"
580         depends on DM_SERIAL && (STM32F4 || STM32F7 || STM32H7)
581         help
582           If you have a machine based on a STM32 F4, F7 or H7 SoC you can
583           enable its onboard serial ports, say Y to this option.
584           If unsure, say N.
585
586 config ZYNQ_SERIAL
587         bool "Cadence (Xilinx Zynq) UART support"
588         depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP)
589         help
590           This driver supports the Cadence UART. It is found e.g. in Xilinx
591           Zynq/ZynqMP.
592
593 config MPC8XX_CONS
594         bool "Console driver for MPC8XX"
595         depends on 8xx
596         default y
597
598 choice
599         prompt "Console port"
600         default 8xx_CONS_SMC1
601         depends on MPC8XX_CONS
602         help
603           Depending on board, select one serial port
604           (CONFIG_8xx_CONS_SMC1 or CONFIG_8xx_CONS_SMC2)
605
606 config 8xx_CONS_SMC1
607         bool "SMC1"
608
609 config 8xx_CONS_SMC2
610         bool "SMC2"
611
612 endchoice
613
614 config SYS_SMC_RXBUFLEN
615         int "Console Rx buffer length"
616         depends on MPC8XX_CONS
617         default 1
618         help
619           With CONFIG_SYS_SMC_RXBUFLEN it is possible to define
620           the maximum receive buffer length for the SMC.
621           This option is actual only for 8xx possible.
622           If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE
623           must be defined, to setup the maximum idle timeout for
624           the SMC.
625
626 config SYS_MAXIDLE
627         int "maximum idle timeout"
628         depends on MPC8XX_CONS
629         default 0
630
631 config SYS_BRGCLK_PRESCALE
632         int "BRG Clock Prescale"
633         depends on MPC8XX_CONS
634         default 1
635
636 config SYS_SDSR
637         hex "SDSR Value"
638         depends on MPC8XX_CONS
639         default 0x83
640
641 config SYS_SDMR
642         hex "SDMR Value"
643         depends on MPC8XX_CONS
644         default 0
645
646 endmenu