]> git.sur5r.net Git - u-boot/blob - drivers/serial/Kconfig
1c2c5d66e1d67a6f8a73d1ef48556bc8eaa6dc6a
[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 SPL_DM_SERIAL
68         bool "Enable Driver Model for serial drivers in SPL"
69         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
77 config TPL_DM_SERIAL
78         bool "Enable Driver Model for serial drivers in TPL"
79         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
87 config 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
113 choice
114         prompt "Select which UART will provide the debug UART"
115         depends on DEBUG_UART
116         default DEBUG_UART_NS16550
117
118 config 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
125 config 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
132 config 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
141 config 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
148 config 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
156 config 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
163 config 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
172 config 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
179 config 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
187 config 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
194 config 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
205 config 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
212 config DEBUG_UART_ZYNQ
213         bool "Xilinx Zynq"
214         help
215           Select this to enable a debug UART using the serial_zynq driver. You
216           will need to provide parameters to make this work. The driver will
217           be available until the real driver-model serial is running.
218
219 config 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
227 config 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
235 config 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
243 config 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
251 config DEBUG_UART_MXC
252         bool "IMX Serial port"
253         depends on MXC_UART
254         help
255           Select this to enable a debug UART using the serial_mxc driver. You
256           will need to provide parameters to make this work. The driver will
257           be available until the real driver model serial is running.
258
259 config DEBUG_UART_UNIPHIER
260         bool "UniPhier on-chip UART"
261         depends on ARCH_UNIPHIER
262         help
263           Select this to enable a debug UART using the UniPhier on-chip UART.
264           You will need to provide DEBUG_UART_BASE to make this work.  The
265           driver will be available until the real driver-model serial is
266           running.
267
268 config DEBUG_UART_OMAP
269         bool "OMAP uart"
270         help
271           Select this to enable a debug UART using the omap ns16550 driver.
272           You will need to provide parameters to make this work. The driver
273           will be available until the real driver model serial is running.
274
275 endchoice
276
277 config DEBUG_UART_BASE
278         hex "Base address of UART"
279         depends on DEBUG_UART
280         help
281           This is the base address of your UART for memory-mapped UARTs.
282
283           A default should be provided by your board, but if not you will need
284           to use the correct value here.
285
286 config DEBUG_UART_CLOCK
287         int "UART input clock"
288         depends on DEBUG_UART
289         help
290           The UART input clock determines the speed of the internal UART
291           circuitry. The baud rate is derived from this by dividing the input
292           clock down.
293
294           A default should be provided by your board, but if not you will need
295           to use the correct value here.
296
297 config DEBUG_UART_SHIFT
298         int "UART register shift"
299         depends on DEBUG_UART
300         default 0 if DEBUG_UART
301         help
302           Some UARTs (notably ns16550) support different register layouts
303           where the registers are spaced either as bytes, words or some other
304           value. Use this value to specify the shift to use, where 0=byte
305           registers, 2=32-bit word registers, etc.
306
307 config DEBUG_UART_BOARD_INIT
308         bool "Enable board-specific debug UART init"
309         depends on DEBUG_UART
310         help
311           Some boards need to set things up before the debug UART can be used.
312           On these boards a call to debug_uart_init() is insufficient. When
313           this option is enabled, the function board_debug_uart_init() will
314           be called when debug_uart_init() is called. You can put any code
315           here that is needed to set up the UART ready for use, such as set
316           pin multiplexing or enable clocks.
317
318 config DEBUG_UART_ANNOUNCE
319         bool "Show a message when the debug UART starts up"
320         depends on DEBUG_UART
321         help
322           Enable this option to show a message when the debug UART is ready
323           for use. You will see a message like "<debug_uart> " as soon as
324           U-Boot has the UART ready for use (i.e. your code calls
325           debug_uart_init()). This can be useful just as a check that
326           everything is working.
327
328 config DEBUG_UART_SKIP_INIT
329         bool "Skip UART initialization"
330         help
331           Select this if the UART you want to use for debug output is already
332           initialized by the time U-Boot starts its execution.
333
334 config ALTERA_JTAG_UART
335         bool "Altera JTAG UART support"
336         depends on DM_SERIAL
337         help
338           Select this to enable an JTAG UART for Altera devices.The JTAG UART
339           core implements a method to communicate serial character streams
340           between a host PC and a Qsys system on an Altera FPGA. Please find
341           details on the "Embedded Peripherals IP User Guide" of Altera.
342
343 config ALTERA_JTAG_UART_BYPASS
344         bool "Bypass output when no connection"
345         depends on ALTERA_JTAG_UART
346         help
347           Bypass console output and keep going even if there is no JTAG
348           terminal connection with the host. The console output will resume
349           once the JTAG terminal is connected. Without the bypass, the console
350           output will wait forever until a JTAG terminal is connected. If you
351           not are sure, say Y.
352
353 config ALTERA_UART
354         bool "Altera UART support"
355         depends on DM_SERIAL
356         help
357           Select this to enable an UART for Altera devices. Please find
358           details on the "Embedded Peripherals IP User Guide" of Altera.
359
360 config AR933X_UART
361         bool "QCA/Atheros ar933x UART support"
362         depends on DM_SERIAL && SOC_AR933X
363         help
364           Select this to enable UART support for QCA/Atheros ar933x
365           devices. This driver uses driver model and requires a device
366           tree binding to operate, please refer to the document at
367           doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
368
369 config ATMEL_USART
370         bool "Atmel USART support"
371         help
372           Select this to enable USART support for Atmel SoCs. It can be
373           configured in the device tree, and input clock frequency can
374           be got from the clk node.
375
376 config BCM6345_SERIAL
377         bool "Support for BCM6345 UART"
378         depends on DM_SERIAL && ARCH_BMIPS
379         help
380           Select this to enable UART on BCM6345 SoCs.
381
382 config FSL_LPUART
383         bool "Freescale LPUART support"
384         help
385           Select this to enable a Low Power UART for Freescale VF610 and
386           QorIQ Layerscape devices.
387
388 config MVEBU_A3700_UART
389         bool "UART support for Armada 3700"
390         default n
391         help
392           Choose this option to add support for UART driver on the Marvell
393           Armada 3700 SoC. The base address is configured via DT.
394
395 config MXC_UART
396         bool "IMX serial port support"
397         depends on MX5 || MX6
398         help
399           If you have a machine based on a Motorola IMX CPU you
400           can enable its onboard serial port by enabling this option.
401
402 config PIC32_SERIAL
403         bool "Support for Microchip PIC32 on-chip UART"
404         depends on DM_SERIAL && MACH_PIC32
405         default y
406         help
407           Support for the UART found on Microchip PIC32 SoC's.
408
409 config SYS_NS16550
410         bool "NS16550 UART or compatible"
411         help
412           Support NS16550 UART or compatible. This can be enabled in the
413           device tree with the correct input clock frequency. If the input
414           clock frequency is not defined in the device tree, the macro
415           CONFIG_SYS_NS16550_CLK defined in a legacy board header file will
416           be used. It can be a constant or a function to get clock, eg,
417           get_serial_clock().
418
419 config INTEL_MID_SERIAL
420         bool "Intel MID platform UART support"
421         depends on DM_SERIAL && OF_CONTROL
422         depends on INTEL_MID
423         select SYS_NS16550
424         help
425           Select this to enable a UART for Intel MID platforms.
426           This uses the ns16550 driver as a library.
427
428 config ROCKCHIP_SERIAL
429         bool "Rockchip on-chip UART support"
430         depends on DM_SERIAL && SPL_OF_PLATDATA
431         help
432           Select this to enable a debug UART for Rockchip devices when using
433           CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
434           This uses the ns16550 driver, converting the platdata from of-platdata
435           to the ns16550 format.
436
437 config SANDBOX_SERIAL
438         bool "Sandbox UART support"
439         depends on SANDBOX
440         help
441           Select this to enable a seral UART for sandbox. This is required to
442           operate correctly, otherwise you will see no serial output from
443           sandbox. The emulated UART will display to the console and console
444           input will be fed into the UART. This allows you to interact with
445           U-Boot.
446
447           The operation of the console is controlled by the -t command-line
448           flag. In raw mode, U-Boot sees all characters from the terminal
449           before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
450           is processed by the terminal, and terminates U-Boot. Valid options
451           are:
452
453              -t raw-with-sigs   Raw mode, Ctrl-C will terminate U-Boot
454              -t raw             Raw mode, Ctrl-C is processed by U-Boot
455              -t cooked          Cooked mode, Ctrl-C terminates
456
457 config SCIF_CONSOLE
458         bool "Renesas SCIF UART support"
459         depends on SH || ARCH_RMOBILE
460         help
461           Select this to enable Renesas SCIF UART. To operate serial ports
462           on systems with RCar or SH SoCs, say Y to this option. If unsure,
463           say N.
464
465 config UNIPHIER_SERIAL
466         bool "Support for UniPhier on-chip UART"
467         depends on ARCH_UNIPHIER
468         default y
469         help
470           If you have a UniPhier based board and want to use the on-chip
471           serial ports, say Y to this option. If unsure, say N.
472
473 config XILINX_UARTLITE
474         bool "Xilinx Uarlite support"
475         depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx)
476         help
477           If you have a Xilinx based board and want to use the uartlite
478           serial ports, say Y to this option. If unsure, say N.
479
480 config MESON_SERIAL
481         bool "Support for Amlogic Meson UART"
482         depends on DM_SERIAL && ARCH_MESON
483         help
484           If you have an Amlogic Meson based board and want to use the on-chip
485           serial ports, say Y to this option. If unsure, say N.
486
487 config MSM_SERIAL
488         bool "Qualcomm on-chip UART"
489         depends on DM_SERIAL
490         help
491           Support Data Mover UART used on Qualcomm Snapdragon SoCs.
492           It should support all Qualcomm devices with UARTDM version 1.4,
493           for example APQ8016 and MSM8916.
494           Single baudrate is supported in current implementation (115200).
495
496 config PXA_SERIAL
497         bool "PXA serial port support"
498         help
499           If you have a machine based on a Marvell XScale PXA2xx CPU you
500           can enable its onboard serial ports by enabling this option.
501
502 config STI_ASC_SERIAL
503         bool "STMicroelectronics on-chip UART"
504         depends on DM_SERIAL && ARCH_STI
505         help
506           Select this to enable Asynchronous Serial Controller available
507           on STiH410 SoC. This is a basic implementation,  it supports
508           following baudrate 9600, 19200, 38400, 57600 and 115200.
509
510 config STM32X7_SERIAL
511         bool "STMicroelectronics STM32 SoCs on-chip UART"
512         depends on DM_SERIAL && STM32F7
513         help
514           If you have a machine based on a STM32 F7 you can enable its
515           onboard serial ports, say Y to this option. If unsure, say N.
516
517 config MPC8XX_CONS
518         bool "Console driver for MPC8XX"
519         depends on 8xx
520         default y
521
522 choice
523         prompt "Console port"
524         default 8xx_CONS_SMC1
525         depends on MPC8XX_CONS
526         help
527           Depending on board, select one serial port
528           (CONFIG_8xx_CONS_SMC1 or CONFIG_8xx_CONS_SMC2)
529
530 config 8xx_CONS_SMC1
531         bool "SMC1"
532
533 config 8xx_CONS_SMC2
534         bool "SMC2"
535
536 endchoice
537
538 config SYS_SMC_RXBUFLEN
539         int "Console Rx buffer length"
540         depends on MPC8XX_CONS
541         default 1
542         help
543           With CONFIG_SYS_SMC_RXBUFLEN it is possible to define
544           the maximum receive buffer length for the SMC.
545           This option is actual only for 8xx possible.
546           If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE
547           must be defined, to setup the maximum idle timeout for
548           the SMC.
549
550 config SYS_MAXIDLE
551         int "maximum idle timeout"
552         depends on MPC8XX_CONS
553         default 0
554
555 config SYS_BRGCLK_PRESCALE
556         int "BRG Clock Prescale"
557         depends on MPC8XX_CONS
558         default 1
559
560 config SYS_SDSR
561         hex "SDSR Value"
562         depends on MPC8XX_CONS
563         default 0x83
564
565 config SYS_SDMR
566         hex "SDMR Value"
567         depends on MPC8XX_CONS
568         default 0
569
570 endmenu