]> git.ipfire.org Git - people/ms/u-boot.git/blob - drivers/serial/Kconfig
Merge branch 'master' of git://git.denx.de/u-boot-sunxi
[people/ms/u-boot.git] / 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 DM_SERIAL
48 bool "Enable Driver Model for serial drivers"
49 depends on DM
50 help
51 Enable driver model for serial. This replaces
52 drivers/serial/serial.c with the serial uclass, which
53 implements serial_putc() etc. The uclass interface is
54 defined in include/serial.h.
55
56 config SPL_DM_SERIAL
57 bool "Enable Driver Model for serial drivers"
58 depends on DM_SERIAL
59 default y if SPL && DM_SERIAL
60 help
61 Enable driver model for serial in SPL. This replaces
62 drivers/serial/serial.c with the serial uclass, which
63 implements serial_putc() etc. The uclass interface is
64 defined in include/serial.h.
65
66 config TPL_DM_SERIAL
67 bool "Enable Driver Model for serial drivers"
68 depends on DM_SERIAL
69 default y if TPL && DM_SERIAL
70 help
71 Enable driver model for serial in TPL. This replaces
72 drivers/serial/serial.c with the serial uclass, which
73 implements serial_putc() etc. The uclass interface is
74 defined in include/serial.h.
75
76 config DEBUG_UART
77 bool "Enable an early debug UART for debugging"
78 help
79 The debug UART is intended for use very early in U-Boot to debug
80 problems when an ICE or other debug mechanism is not available.
81
82 To use it you should:
83 - Make sure your UART supports this interface
84 - Enable CONFIG_DEBUG_UART
85 - Enable the CONFIG for your UART to tell it to provide this interface
86 (e.g. CONFIG_DEBUG_UART_NS16550)
87 - Define the required settings as needed (see below)
88 - Call debug_uart_init() before use
89 - Call debug_uart_putc() to output a character
90
91 Depending on your platform it may be possible to use this UART before
92 a stack is available.
93
94 If your UART does not support this interface you can probably add
95 support quite easily. Remember that you cannot use driver model and
96 it is preferred to use no stack.
97
98 You must not use this UART once driver model is working and the
99 serial drivers are up and running (done in serial_init()). Otherwise
100 the drivers may conflict and you will get strange output.
101
102 choice
103 prompt "Select which UART will provide the debug UART"
104 depends on DEBUG_UART
105 default DEBUG_UART_NS16550
106
107 config DEBUG_UART_ALTERA_JTAGUART
108 bool "Altera JTAG UART"
109 help
110 Select this to enable a debug UART using the altera_jtag_uart driver.
111 You will need to provide parameters to make this work. The driver will
112 be available until the real driver model serial is running.
113
114 config DEBUG_UART_ALTERA_UART
115 bool "Altera UART"
116 help
117 Select this to enable a debug UART using the altera_uart driver.
118 You will need to provide parameters to make this work. The driver will
119 be available until the real driver model serial is running.
120
121 config DEBUG_UART_AR933X
122 bool "QCA/Atheros ar933x"
123 depends on AR933X_UART
124 help
125 Select this to enable a debug UART using the ar933x uart driver.
126 You will need to provide parameters to make this work. The
127 driver will be available until the real driver model serial is
128 running.
129
130 config DEBUG_UART_ATMEL
131 bool "Atmel USART"
132 help
133 Select this to enable a debug UART using the atmel usart driver. You
134 will need to provide parameters to make this work. The driver will
135 be available until the real driver-model serial is running.
136
137 config DEBUG_UART_NS16550
138 bool "ns16550"
139 help
140 Select this to enable a debug UART using the ns16550 driver. You
141 will need to provide parameters to make this work. The driver will
142 be available until the real driver model serial is running.
143
144 config DEBUG_EFI_CONSOLE
145 bool "EFI"
146 depends on EFI_APP
147 help
148 Select this to enable a debug console which calls back to EFI to
149 output to the console. This can be useful for early debugging of
150 U-Boot when running on top of EFI (Extensive Firmware Interface).
151 This is a type of BIOS used by PCs.
152
153 config DEBUG_UART_S5P
154 bool "Samsung S5P"
155 help
156 Select this to enable a debug UART using the serial_s5p driver. You
157 will need to provide parameters to make this work. The driver will
158 be available until the real driver-model serial is running.
159
160 config DEBUG_UART_MESON
161 bool "Amlogic Meson"
162 depends on MESON_SERIAL
163 help
164 Select this to enable a debug UART using the serial_meson driver. You
165 will need to provide parameters to make this work. The driver will
166 be available until the real driver-model serial is running.
167
168 config DEBUG_UART_UARTLITE
169 bool "Xilinx Uartlite"
170 help
171 Select this to enable a debug UART using the serial_uartlite driver.
172 You 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_ARM_DCC
176 bool "ARM DCC"
177 help
178 Select this to enable a debug UART using the ARM JTAG DCC port.
179 The DCC port can be used for very early debugging and doesn't require
180 any additional setting like address/baudrate/clock. On systems without
181 any serial interface this is the easiest way how to get console.
182 Every ARM core has own DCC port which is the part of debug interface.
183 This port is available at least on ARMv6, ARMv7, ARMv8 and XScale
184 architectures.
185
186 config DEBUG_MVEBU_A3700_UART
187 bool "Marvell Armada 3700"
188 help
189 Select this to enable a debug UART using the serial_mvebu driver. You
190 will need to provide parameters to make this work. The driver will
191 be available until the real driver-model serial is running.
192
193 config DEBUG_UART_ZYNQ
194 bool "Xilinx Zynq"
195 help
196 Select this to enable a debug UART using the serial_zynq driver. You
197 will need to provide parameters to make this work. The driver will
198 be available until the real driver-model serial is running.
199
200 config DEBUG_UART_APBUART
201 depends on LEON3
202 bool "Gaisler APBUART"
203 help
204 Select this to enable a debug UART using the serial_leon3 driver. You
205 will need to provide parameters to make this work. The driver will
206 be available until the real driver model serial is running.
207
208 config DEBUG_UART_PL010
209 bool "pl010"
210 help
211 Select this to enable a debug UART using the pl01x driver with the
212 PL010 UART type. You will need to provide parameters to make this
213 work. The driver will be available until the real driver model
214 serial is running.
215
216 config DEBUG_UART_PL011
217 bool "pl011"
218 help
219 Select this to enable a debug UART using the pl01x driver with the
220 PL011 UART type. You will need to provide parameters to make this
221 work. The driver will be available until the real driver model
222 serial is running.
223
224 config DEBUG_UART_PIC32
225 bool "Microchip PIC32"
226 depends on PIC32_SERIAL
227 help
228 Select this to enable a debug UART using the serial_pic32 driver. You
229 will need to provide parameters to make this work. The driver will
230 be available until the real driver model serial is running.
231
232 config DEBUG_UART_UNIPHIER
233 bool "UniPhier on-chip UART"
234 depends on ARCH_UNIPHIER
235 help
236 Select this to enable a debug UART using the UniPhier on-chip UART.
237 You will need to provide DEBUG_UART_BASE to make this work. The
238 driver will be available until the real driver-model serial is
239 running.
240
241 endchoice
242
243 config DEBUG_UART_BASE
244 hex "Base address of UART"
245 depends on DEBUG_UART
246 help
247 This is the base address of your UART for memory-mapped UARTs.
248
249 A default should be provided by your board, but if not you will need
250 to use the correct value here.
251
252 config DEBUG_UART_CLOCK
253 int "UART input clock"
254 depends on DEBUG_UART
255 help
256 The UART input clock determines the speed of the internal UART
257 circuitry. The baud rate is derived from this by dividing the input
258 clock down.
259
260 A default should be provided by your board, but if not you will need
261 to use the correct value here.
262
263 config DEBUG_UART_SHIFT
264 int "UART register shift"
265 depends on DEBUG_UART
266 default 0 if DEBUG_UART
267 help
268 Some UARTs (notably ns16550) support different register layouts
269 where the registers are spaced either as bytes, words or some other
270 value. Use this value to specify the shift to use, where 0=byte
271 registers, 2=32-bit word registers, etc.
272
273 config DEBUG_UART_BOARD_INIT
274 bool "Enable board-specific debug UART init"
275 depends on DEBUG_UART
276 help
277 Some boards need to set things up before the debug UART can be used.
278 On these boards a call to debug_uart_init() is insufficient. When
279 this option is enabled, the function board_debug_uart_init() will
280 be called when debug_uart_init() is called. You can put any code
281 here that is needed to set up the UART ready for use, such as set
282 pin multiplexing or enable clocks.
283
284 config DEBUG_UART_ANNOUNCE
285 bool "Show a message when the debug UART starts up"
286 depends on DEBUG_UART
287 help
288 Enable this option to show a message when the debug UART is ready
289 for use. You will see a message like "<debug_uart> " as soon as
290 U-Boot has the UART ready for use (i.e. your code calls
291 debug_uart_init()). This can be useful just as a check that
292 everything is working.
293
294 config DEBUG_UART_SKIP_INIT
295 bool "Skip UART initialization"
296 help
297 Select this if the UART you want to use for debug output is already
298 initialized by the time U-Boot starts its execution.
299
300 config ALTERA_JTAG_UART
301 bool "Altera JTAG UART support"
302 depends on DM_SERIAL
303 help
304 Select this to enable an JTAG UART for Altera devices.The JTAG UART
305 core implements a method to communicate serial character streams
306 between a host PC and a Qsys system on an Altera FPGA. Please find
307 details on the "Embedded Peripherals IP User Guide" of Altera.
308
309 config ALTERA_JTAG_UART_BYPASS
310 bool "Bypass output when no connection"
311 depends on ALTERA_JTAG_UART
312 help
313 Bypass console output and keep going even if there is no JTAG
314 terminal connection with the host. The console output will resume
315 once the JTAG terminal is connected. Without the bypass, the console
316 output will wait forever until a JTAG terminal is connected. If you
317 not are sure, say Y.
318
319 config ALTERA_UART
320 bool "Altera UART support"
321 depends on DM_SERIAL
322 help
323 Select this to enable an UART for Altera devices. Please find
324 details on the "Embedded Peripherals IP User Guide" of Altera.
325
326 config AR933X_UART
327 bool "QCA/Atheros ar933x UART support"
328 depends on DM_SERIAL && SOC_AR933X
329 help
330 Select this to enable UART support for QCA/Atheros ar933x
331 devices. This driver uses driver model and requires a device
332 tree binding to operate, please refer to the document at
333 doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
334
335 config ATMEL_USART
336 bool "Atmel USART support"
337 help
338 Select this to enable USART support for Atmel SoCs. It can be
339 configured in the device tree, and input clock frequency can
340 be got from the clk node.
341
342 config FSL_LPUART
343 bool "Freescale LPUART support"
344 help
345 Select this to enable a Low Power UART for Freescale VF610 and
346 QorIQ Layerscape devices.
347
348 config MVEBU_A3700_UART
349 bool "UART support for Armada 3700"
350 default n
351 help
352 Choose this option to add support for UART driver on the Marvell
353 Armada 3700 SoC. The base address is configured via DT.
354
355 config MXC_UART
356 bool "IMX serial port support"
357 depends on MX5 || MX6
358 help
359 If you have a machine based on a Motorola IMX CPU you
360 can enable its onboard serial port by enabling this option.
361
362 config PIC32_SERIAL
363 bool "Support for Microchip PIC32 on-chip UART"
364 depends on DM_SERIAL && MACH_PIC32
365 default y
366 help
367 Support for the UART found on Microchip PIC32 SoC's.
368
369 config SYS_NS16550
370 bool "NS16550 UART or compatible"
371 help
372 Support NS16550 UART or compatible. This can be enabled in the
373 device tree with the correct input clock frequency. If the input
374 clock frequency is not defined in the device tree, the macro
375 CONFIG_SYS_NS16550_CLK defined in a legacy board header file will
376 be used. It can be a constant or a function to get clock, eg,
377 get_serial_clock().
378
379 config ROCKCHIP_SERIAL
380 bool "Rockchip on-chip UART support"
381 depends on DM_SERIAL && SPL_OF_PLATDATA
382 help
383 Select this to enable a debug UART for Rockchip devices when using
384 CONFIG_SPL_OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
385 This uses the ns16550 driver, converting the platdata from of-platdata
386 to the ns16550 format.
387
388 config SANDBOX_SERIAL
389 bool "Sandbox UART support"
390 depends on SANDBOX
391 help
392 Select this to enable a seral UART for sandbox. This is required to
393 operate correctly, otherwise you will see no serial output from
394 sandbox. The emulated UART will display to the console and console
395 input will be fed into the UART. This allows you to interact with
396 U-Boot.
397
398 The operation of the console is controlled by the -t command-line
399 flag. In raw mode, U-Boot sees all characters from the terminal
400 before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
401 is processed by the terminal, and terminates U-Boot. Valid options
402 are:
403
404 -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot
405 -t raw Raw mode, Ctrl-C is processed by U-Boot
406 -t cooked Cooked mode, Ctrl-C terminates
407
408 config UNIPHIER_SERIAL
409 bool "Support for UniPhier on-chip UART"
410 depends on ARCH_UNIPHIER
411 default y
412 help
413 If you have a UniPhier based board and want to use the on-chip
414 serial ports, say Y to this option. If unsure, say N.
415
416 config XILINX_UARTLITE
417 bool "Xilinx Uarlite support"
418 depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx)
419 help
420 If you have a Xilinx based board and want to use the uartlite
421 serial ports, say Y to this option. If unsure, say N.
422
423 config MESON_SERIAL
424 bool "Support for Amlogic Meson UART"
425 depends on DM_SERIAL && ARCH_MESON
426 help
427 If you have an Amlogic Meson based board and want to use the on-chip
428 serial ports, say Y to this option. If unsure, say N.
429
430 config MSM_SERIAL
431 bool "Qualcomm on-chip UART"
432 depends on DM_SERIAL
433 help
434 Support Data Mover UART used on Qualcomm Snapdragon SoCs.
435 It should support all Qualcomm devices with UARTDM version 1.4,
436 for example APQ8016 and MSM8916.
437 Single baudrate is supported in current implementation (115200).
438
439 config PXA_SERIAL
440 bool "PXA serial port support"
441 help
442 If you have a machine based on a Marvell XScale PXA2xx CPU you
443 can enable its onboard serial ports by enabling this option.
444
445 config STI_ASC_SERIAL
446 bool "STMicroelectronics on-chip UART"
447 depends on DM_SERIAL && ARCH_STI
448 help
449 Select this to enable Asynchronous Serial Controller available
450 on STiH410 SoC. This is a basic implementation, it supports
451 following baudrate 9600, 19200, 38400, 57600 and 115200.
452
453 endmenu