xref: /openbmc/u-boot/drivers/serial/Kconfig (revision 9e160ee8)
10b11dbf7SMasahiro Yamada#
20b11dbf7SMasahiro Yamada# Serial device configuration
30b11dbf7SMasahiro Yamada#
40b11dbf7SMasahiro Yamada
50b11dbf7SMasahiro Yamadamenu "Serial drivers"
60b11dbf7SMasahiro Yamada
78c458588SHans de Goedeconfig REQUIRE_SERIAL_CONSOLE
88c458588SHans de Goede	bool "Require a serial port for console"
98c458588SHans de Goede	# Running without a serial console is not supported by the
108c458588SHans de Goede	# non-dm serial code
118c458588SHans de Goede	depends on DM_SERIAL
128c458588SHans de Goede	default y
138c458588SHans de Goede	help
148c458588SHans de Goede	  Require a serial port for the console, and panic if none is found
158c458588SHans de Goede	  during serial port initialization (default y). Set this to n on
168c458588SHans de Goede	  boards which have no debug serial port whatsoever.
178c458588SHans de Goede
1892c55b68SSimon Glassconfig SERIAL_PRESENT
1992c55b68SSimon Glass	bool "Provide a serial driver"
2092c55b68SSimon Glass	depends on DM_SERIAL
2192c55b68SSimon Glass	default y
2292c55b68SSimon Glass	help
2392c55b68SSimon Glass	  In very space-constrained devices even the full UART driver is too
2492c55b68SSimon Glass	  large. In this case the debug UART can still be used in some cases.
2592c55b68SSimon Glass	  This option enables the full UART in U-Boot, so if is it disabled,
2692c55b68SSimon Glass	  the full UART driver will be omitted, thus saving space.
2792c55b68SSimon Glass
2892c55b68SSimon Glassconfig SPL_SERIAL_PRESENT
2992c55b68SSimon Glass	bool "Provide a serial driver in SPL"
3092c55b68SSimon Glass	depends on DM_SERIAL
3192c55b68SSimon Glass	default y
3292c55b68SSimon Glass	help
3392c55b68SSimon Glass	  In very space-constrained devices even the full UART driver is too
3492c55b68SSimon Glass	  large. In this case the debug UART can still be used in some cases.
3592c55b68SSimon Glass	  This option enables the full UART in SPL, so if is it disabled,
3692c55b68SSimon Glass	  the full UART driver will be omitted, thus saving space.
3792c55b68SSimon Glass
38da333ae7SMasahiro Yamadaconfig DM_SERIAL
39da333ae7SMasahiro Yamada	bool "Enable Driver Model for serial drivers"
40da333ae7SMasahiro Yamada	depends on DM
41da333ae7SMasahiro Yamada	help
42f94a1bedSSimon Glass	  Enable driver model for serial. This replaces
43f94a1bedSSimon Glass	  drivers/serial/serial.c with the serial uclass, which
44f94a1bedSSimon Glass	  implements serial_putc() etc. The uclass interface is
45f94a1bedSSimon Glass	  defined in include/serial.h.
46ff247b7aSMasahiro Yamada
472f964aa7SSimon Glassconfig DEBUG_UART
482f964aa7SSimon Glass	bool "Enable an early debug UART for debugging"
492f964aa7SSimon Glass	help
502f964aa7SSimon Glass	  The debug UART is intended for use very early in U-Boot to debug
512f964aa7SSimon Glass	  problems when an ICE or other debug mechanism is not available.
522f964aa7SSimon Glass
532f964aa7SSimon Glass	  To use it you should:
542f964aa7SSimon Glass	  - Make sure your UART supports this interface
552f964aa7SSimon Glass	  - Enable CONFIG_DEBUG_UART
562f964aa7SSimon Glass	  - Enable the CONFIG for your UART to tell it to provide this interface
572f964aa7SSimon Glass	        (e.g. CONFIG_DEBUG_UART_NS16550)
582f964aa7SSimon Glass	  - Define the required settings as needed (see below)
592f964aa7SSimon Glass	  - Call debug_uart_init() before use
602f964aa7SSimon Glass	  - Call debug_uart_putc() to output a character
612f964aa7SSimon Glass
622f964aa7SSimon Glass	  Depending on your platform it may be possible to use this UART before
632f964aa7SSimon Glass	  a stack is available.
642f964aa7SSimon Glass
652f964aa7SSimon Glass	  If your UART does not support this interface you can probably add
662f964aa7SSimon Glass	  support quite easily. Remember that you cannot use driver model and
672f964aa7SSimon Glass	  it is preferred to use no stack.
682f964aa7SSimon Glass
692f964aa7SSimon Glass	  You must not use this UART once driver model is working and the
702f964aa7SSimon Glass	  serial drivers are up and running (done in serial_init()). Otherwise
712f964aa7SSimon Glass	  the drivers may conflict and you will get strange output.
722f964aa7SSimon Glass
7321d00436SSimon Glasschoice
7421d00436SSimon Glass	prompt "Select which UART will provide the debug UART"
7521d00436SSimon Glass	depends on DEBUG_UART
76b1e361b6SThomas Chou	default DEBUG_UART_NS16550
7721d00436SSimon Glass
78220e8021SThomas Chouconfig DEBUG_UART_ALTERA_JTAGUART
79220e8021SThomas Chou	bool "Altera JTAG UART"
80220e8021SThomas Chou	help
81220e8021SThomas Chou	  Select this to enable a debug UART using the altera_jtag_uart driver.
82220e8021SThomas Chou	  You will need to provide parameters to make this work. The driver will
83220e8021SThomas Chou	  be available until the real driver model serial is running.
84220e8021SThomas Chou
85da2f838dSThomas Chouconfig DEBUG_UART_ALTERA_UART
86da2f838dSThomas Chou	bool "Altera UART"
87da2f838dSThomas Chou	help
88da2f838dSThomas Chou	  Select this to enable a debug UART using the altera_uart driver.
89da2f838dSThomas Chou	  You will need to provide parameters to make this work. The driver will
90da2f838dSThomas Chou	  be available until the real driver model serial is running.
91da2f838dSThomas Chou
9221d00436SSimon Glassconfig DEBUG_UART_NS16550
9321d00436SSimon Glass	bool "ns16550"
9421d00436SSimon Glass	help
9521d00436SSimon Glass	  Select this to enable a debug UART using the ns16550 driver. You
9621d00436SSimon Glass	  will need to provide parameters to make this work. The driver will
9721d00436SSimon Glass	  be available until the real driver model serial is running.
9821d00436SSimon Glass
99275854baSSimon Glassconfig DEBUG_EFI_CONSOLE
100275854baSSimon Glass	bool "EFI"
101275854baSSimon Glass	depends on EFI_APP
102275854baSSimon Glass	help
103275854baSSimon Glass	  Select this to enable a debug console which calls back to EFI to
104275854baSSimon Glass	  output to the console. This can be useful for early debugging of
105275854baSSimon Glass	  U-Boot when running on top of EFI (Extensive Firmware Interface).
106275854baSSimon Glass	  This is a type of BIOS used by PCs.
107275854baSSimon Glass
108bf6e7022SSimon Glassconfig DEBUG_UART_S5P
109bf6e7022SSimon Glass	bool "Samsung S5P"
110bf6e7022SSimon Glass	help
111bf6e7022SSimon Glass	  Select this to enable a debug UART using the serial_s5p driver. You
112bf6e7022SSimon Glass	  will need to provide parameters to make this work. The driver will
113bf6e7022SSimon Glass	  be available until the real driver-model serial is running.
114bf6e7022SSimon Glass
1154166ba3bSMichal Simekconfig DEBUG_UART_UARTLITE
1164166ba3bSMichal Simek	bool "Xilinx Uartlite"
1174166ba3bSMichal Simek	help
1184166ba3bSMichal Simek	  Select this to enable a debug UART using the serial_uartlite driver.
1194166ba3bSMichal Simek	  You will need to provide parameters to make this work. The driver will
1204166ba3bSMichal Simek	  be available until the real driver-model serial is running.
1214166ba3bSMichal Simek
122c54c0a4cSSimon Glassconfig DEBUG_UART_ZYNQ
123c54c0a4cSSimon Glass	bool "Xilinx Zynq"
124c54c0a4cSSimon Glass	help
1256bf87dacSMichal Simek	  Select this to enable a debug UART using the serial_zynq driver. You
126c54c0a4cSSimon Glass	  will need to provide parameters to make this work. The driver will
127c54c0a4cSSimon Glass	  be available until the real driver-model serial is running.
128c54c0a4cSSimon Glass
129e43ce3fcSFrancois Retiefconfig DEBUG_UART_APBUART
130e43ce3fcSFrancois Retief	depends on LEON3
131e43ce3fcSFrancois Retief	bool "Gaisler APBUART"
132e43ce3fcSFrancois Retief	help
133e43ce3fcSFrancois Retief	  Select this to enable a debug UART using the serial_leon3 driver. You
134e43ce3fcSFrancois Retief	  will need to provide parameters to make this work. The driver will
135e43ce3fcSFrancois Retief	  be available until the real driver model serial is running.
136e43ce3fcSFrancois Retief
13719de8150SSergey Temerkhanovconfig DEBUG_UART_PL010
13819de8150SSergey Temerkhanov	bool "pl010"
13919de8150SSergey Temerkhanov	help
14019de8150SSergey Temerkhanov	  Select this to enable a debug UART using the pl01x driver with the
14119de8150SSergey Temerkhanov	  PL010 UART type. You will need to provide parameters to make this
14219de8150SSergey Temerkhanov	  work. The driver will be available until the real driver model
14319de8150SSergey Temerkhanov	  serial is running.
14419de8150SSergey Temerkhanov
14519de8150SSergey Temerkhanovconfig DEBUG_UART_PL011
14619de8150SSergey Temerkhanov	bool "pl011"
14719de8150SSergey Temerkhanov	help
14819de8150SSergey Temerkhanov	  Select this to enable a debug UART using the pl01x driver with the
14919de8150SSergey Temerkhanov	  PL011 UART type. You will need to provide parameters to make this
15019de8150SSergey Temerkhanov	  work. The driver will be available until the real driver model
15119de8150SSergey Temerkhanov	  serial is running.
15219de8150SSergey Temerkhanov
153*9e160ee8SPaul Thackerconfig DEBUG_UART_PIC32
154*9e160ee8SPaul Thacker	bool "Microchip PIC32"
155*9e160ee8SPaul Thacker	depends on PIC32_SERIAL
156*9e160ee8SPaul Thacker	help
157*9e160ee8SPaul Thacker	  Select this to enable a debug UART using the serial_pic32 driver. You
158*9e160ee8SPaul Thacker	  will need to provide parameters to make this work. The driver will
159*9e160ee8SPaul Thacker	  be available until the real driver model serial is running.
160*9e160ee8SPaul Thacker
16121d00436SSimon Glassendchoice
16221d00436SSimon Glass
1632f964aa7SSimon Glassconfig DEBUG_UART_BASE
1642f964aa7SSimon Glass	hex "Base address of UART"
1652f964aa7SSimon Glass	depends on DEBUG_UART
1662f964aa7SSimon Glass	help
1672f964aa7SSimon Glass	  This is the base address of your UART for memory-mapped UARTs.
1682f964aa7SSimon Glass
1692f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
1702f964aa7SSimon Glass	  to use the correct value here.
1712f964aa7SSimon Glass
1722f964aa7SSimon Glassconfig DEBUG_UART_CLOCK
1732f964aa7SSimon Glass	int "UART input clock"
1742f964aa7SSimon Glass	depends on DEBUG_UART
1752f964aa7SSimon Glass	help
1762f964aa7SSimon Glass	  The UART input clock determines the speed of the internal UART
1772f964aa7SSimon Glass	  circuitry. The baud rate is derived from this by dividing the input
1782f964aa7SSimon Glass	  clock down.
1792f964aa7SSimon Glass
1802f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
1812f964aa7SSimon Glass	  to use the correct value here.
1822f964aa7SSimon Glass
183dd0b0122SSimon Glassconfig DEBUG_UART_SHIFT
184dd0b0122SSimon Glass	int "UART register shift"
185dd0b0122SSimon Glass	depends on DEBUG_UART
186dd0b0122SSimon Glass	default 0 if DEBUG_UART
187dd0b0122SSimon Glass	help
188dd0b0122SSimon Glass	  Some UARTs (notably ns16550) support different register layouts
189dd0b0122SSimon Glass	  where the registers are spaced either as bytes, words or some other
190dd0b0122SSimon Glass	  value. Use this value to specify the shift to use, where 0=byte
191dd0b0122SSimon Glass	  registers, 2=32-bit word registers, etc.
192dd0b0122SSimon Glass
1930e977bc1SSimon Glassconfig DEBUG_UART_BOARD_INIT
1940e977bc1SSimon Glass	bool "Enable board-specific debug UART init"
1950e977bc1SSimon Glass	depends on DEBUG_UART
1960e977bc1SSimon Glass	help
1970e977bc1SSimon Glass	  Some boards need to set things up before the debug UART can be used.
1980e977bc1SSimon Glass	  On these boards a call to debug_uart_init() is insufficient. When
1990e977bc1SSimon Glass	  this option is enabled, the function board_debug_uart_init() will
2000e977bc1SSimon Glass	  be called when debug_uart_init() is called. You can put any code
2010e977bc1SSimon Glass	  here that is needed to set up the UART ready for use, such as set
2020e977bc1SSimon Glass	  pin multiplexing or enable clocks.
2030e977bc1SSimon Glass
204c7fefcb9SSimon Glassconfig DEBUG_UART_ANNOUNCE
205c7fefcb9SSimon Glass	bool "Show a message when the debug UART starts up"
206c7fefcb9SSimon Glass	depends on DEBUG_UART
207c7fefcb9SSimon Glass	help
208c7fefcb9SSimon Glass	  Enable this option to show a message when the debug UART is ready
209c7fefcb9SSimon Glass	  for use. You will see a message like "<debug_uart> " as soon as
210c7fefcb9SSimon Glass	  U-Boot has the UART ready for use (i.e. your code calls
211c7fefcb9SSimon Glass	  debug_uart_init()). This can be useful just as a check that
212c7fefcb9SSimon Glass	  everything is working.
213c7fefcb9SSimon Glass
21419de8150SSergey Temerkhanovconfig DEBUG_UART_SKIP_INIT
21519de8150SSergey Temerkhanov	bool "Skip UART initialization"
21619de8150SSergey Temerkhanov	help
21719de8150SSergey Temerkhanov	  Select this if the UART you want to use for debug output is already
21819de8150SSergey Temerkhanov	  initialized by the time U-Boot starts its execution.
21919de8150SSergey Temerkhanov
220220e8021SThomas Chouconfig ALTERA_JTAG_UART
221220e8021SThomas Chou	bool "Altera JTAG UART support"
222220e8021SThomas Chou	depends on DM_SERIAL
223220e8021SThomas Chou	help
224220e8021SThomas Chou	  Select this to enable an JTAG UART for Altera devices.The JTAG UART
225220e8021SThomas Chou	  core implements a method to communicate serial character streams
226220e8021SThomas Chou	  between a host PC and a Qsys system on an Altera FPGA. Please find
227220e8021SThomas Chou	  details on the "Embedded Peripherals IP User Guide" of Altera.
228220e8021SThomas Chou
229220e8021SThomas Chouconfig ALTERA_JTAG_UART_BYPASS
230220e8021SThomas Chou	bool "Bypass output when no connection"
231220e8021SThomas Chou	depends on ALTERA_JTAG_UART
232220e8021SThomas Chou	help
233220e8021SThomas Chou	  Bypass console output and keep going even if there is no JTAG
234220e8021SThomas Chou	  terminal connection with the host. The console output will resume
235220e8021SThomas Chou	  once the JTAG terminal is connected. Without the bypass, the console
236220e8021SThomas Chou	  output will wait forever until a JTAG terminal is connected. If you
237220e8021SThomas Chou	  not are sure, say Y.
238220e8021SThomas Chou
239da2f838dSThomas Chouconfig ALTERA_UART
240da2f838dSThomas Chou	bool "Altera UART support"
241da2f838dSThomas Chou	depends on DM_SERIAL
242da2f838dSThomas Chou	help
243da2f838dSThomas Chou	  Select this to enable an UART for Altera devices. Please find
244da2f838dSThomas Chou	  details on the "Embedded Peripherals IP User Guide" of Altera.
245da2f838dSThomas Chou
2465ed07cf5SBin Mengconfig FSL_LPUART
2475ed07cf5SBin Meng	bool "Freescale LPUART support"
2485ed07cf5SBin Meng	help
2495ed07cf5SBin Meng	  Select this to enable a Low Power UART for Freescale VF610 and
2505ed07cf5SBin Meng	  QorIQ Layerscape devices.
2515ed07cf5SBin Meng
252*9e160ee8SPaul Thackerconfig PIC32_SERIAL
253*9e160ee8SPaul Thacker	bool "Support for Microchip PIC32 on-chip UART"
254*9e160ee8SPaul Thacker	depends on DM_SERIAL && MACH_PIC32
255*9e160ee8SPaul Thacker	default y
256*9e160ee8SPaul Thacker	help
257*9e160ee8SPaul Thacker	  Support for the UART found on Microchip PIC32 SoC's.
258*9e160ee8SPaul Thacker
2599e39003eSThomas Chouconfig SYS_NS16550
2609e39003eSThomas Chou	bool "NS16550 UART or compatible"
2619e39003eSThomas Chou	help
2629e39003eSThomas Chou	  Support NS16550 UART or compatible. This can be enabled in the
2639e39003eSThomas Chou	  device tree with the correct input clock frequency. If the input
2649e39003eSThomas Chou	  clock frequency is not defined in the device tree, the macro
2659e39003eSThomas Chou	  CONFIG_SYS_NS16550_CLK defined in a legacy board header file will
2669e39003eSThomas Chou	  be used. It can be a constant or a function to get clock, eg,
2679e39003eSThomas Chou	  get_serial_clock().
2689e39003eSThomas Chou
269af282245SSimon Glassconfig SANDBOX_SERIAL
270af282245SSimon Glass	bool "Sandbox UART support"
2712ea65f3eSMasahiro Yamada	depends on SANDBOX
272af282245SSimon Glass	help
273af282245SSimon Glass	  Select this to enable a seral UART for sandbox. This is required to
274af282245SSimon Glass	  operate correctly, otherwise you will see no serial output from
275af282245SSimon Glass	  sandbox. The emulated UART will display to the console and console
276af282245SSimon Glass	  input will be fed into the UART. This allows you to interact with
277af282245SSimon Glass	  U-Boot.
278af282245SSimon Glass
279af282245SSimon Glass	  The operation of the console is controlled by the -t command-line
280af282245SSimon Glass	  flag. In raw mode, U-Boot sees all characters from the terminal
281af282245SSimon Glass	  before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
282af282245SSimon Glass	  is processed by the terminal, and terminates U-Boot. Valid options
283af282245SSimon Glass	  are:
284af282245SSimon Glass
285af282245SSimon Glass	     -t raw-with-sigs	Raw mode, Ctrl-C will terminate U-Boot
286af282245SSimon Glass	     -t raw		Raw mode, Ctrl-C is processed by U-Boot
287af282245SSimon Glass	     -t cooked		Cooked mode, Ctrl-C terminates
288af282245SSimon Glass
289ff247b7aSMasahiro Yamadaconfig UNIPHIER_SERIAL
290b6ef3a3fSMasahiro Yamada	bool "Support for UniPhier on-chip UART"
2912ea65f3eSMasahiro Yamada	depends on ARCH_UNIPHIER
292ff247b7aSMasahiro Yamada	help
293b6ef3a3fSMasahiro Yamada	  If you have a UniPhier based board and want to use the on-chip
294b6ef3a3fSMasahiro Yamada	  serial ports, say Y to this option. If unsure, say N.
295dcfe4a54SSimon Glass
29654e24d33SMichal Simekconfig XILINX_UARTLITE
29754e24d33SMichal Simek	bool "Xilinx Uarlite support"
29880cce262SRicardo Ribalda Delgado	depends on DM_SERIAL && (MICROBLAZE || ARCH_ZYNQ || ARCH_ZYNQMP || 4xx)
29954e24d33SMichal Simek	help
30054e24d33SMichal Simek	  If you have a Xilinx based board and want to use the uartlite
30154e24d33SMichal Simek	  serial ports, say Y to this option. If unsure, say N.
30254e24d33SMichal Simek
3030b11dbf7SMasahiro Yamadaendmenu
304