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