xref: /openbmc/u-boot/drivers/serial/Kconfig (revision c54c0a4c)
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
18da333ae7SMasahiro Yamadaconfig DM_SERIAL
19da333ae7SMasahiro Yamada	bool "Enable Driver Model for serial drivers"
20da333ae7SMasahiro Yamada	depends on DM
21da333ae7SMasahiro Yamada	help
22f94a1bedSSimon Glass	  Enable driver model for serial. This replaces
23f94a1bedSSimon Glass	  drivers/serial/serial.c with the serial uclass, which
24f94a1bedSSimon Glass	  implements serial_putc() etc. The uclass interface is
25f94a1bedSSimon Glass	  defined in include/serial.h.
26ff247b7aSMasahiro Yamada
272f964aa7SSimon Glassconfig DEBUG_UART
282f964aa7SSimon Glass	bool "Enable an early debug UART for debugging"
292f964aa7SSimon Glass	help
302f964aa7SSimon Glass	  The debug UART is intended for use very early in U-Boot to debug
312f964aa7SSimon Glass	  problems when an ICE or other debug mechanism is not available.
322f964aa7SSimon Glass
332f964aa7SSimon Glass	  To use it you should:
342f964aa7SSimon Glass	  - Make sure your UART supports this interface
352f964aa7SSimon Glass	  - Enable CONFIG_DEBUG_UART
362f964aa7SSimon Glass	  - Enable the CONFIG for your UART to tell it to provide this interface
372f964aa7SSimon Glass	        (e.g. CONFIG_DEBUG_UART_NS16550)
382f964aa7SSimon Glass	  - Define the required settings as needed (see below)
392f964aa7SSimon Glass	  - Call debug_uart_init() before use
402f964aa7SSimon Glass	  - Call debug_uart_putc() to output a character
412f964aa7SSimon Glass
422f964aa7SSimon Glass	  Depending on your platform it may be possible to use this UART before
432f964aa7SSimon Glass	  a stack is available.
442f964aa7SSimon Glass
452f964aa7SSimon Glass	  If your UART does not support this interface you can probably add
462f964aa7SSimon Glass	  support quite easily. Remember that you cannot use driver model and
472f964aa7SSimon Glass	  it is preferred to use no stack.
482f964aa7SSimon Glass
492f964aa7SSimon Glass	  You must not use this UART once driver model is working and the
502f964aa7SSimon Glass	  serial drivers are up and running (done in serial_init()). Otherwise
512f964aa7SSimon Glass	  the drivers may conflict and you will get strange output.
522f964aa7SSimon Glass
5321d00436SSimon Glasschoice
5421d00436SSimon Glass	prompt "Select which UART will provide the debug UART"
5521d00436SSimon Glass	depends on DEBUG_UART
5621d00436SSimon Glass
57220e8021SThomas Chouconfig DEBUG_UART_ALTERA_JTAGUART
58220e8021SThomas Chou	bool "Altera JTAG UART"
59220e8021SThomas Chou	help
60220e8021SThomas Chou	  Select this to enable a debug UART using the altera_jtag_uart driver.
61220e8021SThomas Chou	  You will need to provide parameters to make this work. The driver will
62220e8021SThomas Chou	  be available until the real driver model serial is running.
63220e8021SThomas Chou
64da2f838dSThomas Chouconfig DEBUG_UART_ALTERA_UART
65da2f838dSThomas Chou	bool "Altera UART"
66da2f838dSThomas Chou	help
67da2f838dSThomas Chou	  Select this to enable a debug UART using the altera_uart driver.
68da2f838dSThomas Chou	  You will need to provide parameters to make this work. The driver will
69da2f838dSThomas Chou	  be available until the real driver model serial is running.
70da2f838dSThomas Chou
7121d00436SSimon Glassconfig DEBUG_UART_NS16550
7221d00436SSimon Glass	bool "ns16550"
7321d00436SSimon Glass	help
7421d00436SSimon Glass	  Select this to enable a debug UART using the ns16550 driver. You
7521d00436SSimon Glass	  will need to provide parameters to make this work. The driver will
7621d00436SSimon Glass	  be available until the real driver model serial is running.
7721d00436SSimon Glass
78275854baSSimon Glassconfig DEBUG_EFI_CONSOLE
79275854baSSimon Glass	bool "EFI"
80275854baSSimon Glass	depends on EFI_APP
81275854baSSimon Glass	help
82275854baSSimon Glass	  Select this to enable a debug console which calls back to EFI to
83275854baSSimon Glass	  output to the console. This can be useful for early debugging of
84275854baSSimon Glass	  U-Boot when running on top of EFI (Extensive Firmware Interface).
85275854baSSimon Glass	  This is a type of BIOS used by PCs.
86275854baSSimon Glass
87bf6e7022SSimon Glassconfig DEBUG_UART_S5P
88bf6e7022SSimon Glass	bool "Samsung S5P"
89bf6e7022SSimon Glass	help
90bf6e7022SSimon Glass	  Select this to enable a debug UART using the serial_s5p driver. You
91bf6e7022SSimon Glass	  will need to provide parameters to make this work. The driver will
92bf6e7022SSimon Glass	  be available until the real driver-model serial is running.
93bf6e7022SSimon Glass
94*c54c0a4cSSimon Glassconfig DEBUG_UART_ZYNQ
95*c54c0a4cSSimon Glass	bool "Xilinx Zynq"
96*c54c0a4cSSimon Glass	help
97*c54c0a4cSSimon Glass	  Select this to enable a debug UART using the serial_s5p driver. You
98*c54c0a4cSSimon Glass	  will need to provide parameters to make this work. The driver will
99*c54c0a4cSSimon Glass	  be available until the real driver-model serial is running.
100*c54c0a4cSSimon Glass
10121d00436SSimon Glassendchoice
10221d00436SSimon Glass
1032f964aa7SSimon Glassconfig DEBUG_UART_BASE
1042f964aa7SSimon Glass	hex "Base address of UART"
1052f964aa7SSimon Glass	depends on DEBUG_UART
1062f964aa7SSimon Glass	help
1072f964aa7SSimon Glass	  This is the base address of your UART for memory-mapped UARTs.
1082f964aa7SSimon Glass
1092f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
1102f964aa7SSimon Glass	  to use the correct value here.
1112f964aa7SSimon Glass
1122f964aa7SSimon Glassconfig DEBUG_UART_CLOCK
1132f964aa7SSimon Glass	int "UART input clock"
1142f964aa7SSimon Glass	depends on DEBUG_UART
1152f964aa7SSimon Glass	help
1162f964aa7SSimon Glass	  The UART input clock determines the speed of the internal UART
1172f964aa7SSimon Glass	  circuitry. The baud rate is derived from this by dividing the input
1182f964aa7SSimon Glass	  clock down.
1192f964aa7SSimon Glass
1202f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
1212f964aa7SSimon Glass	  to use the correct value here.
1222f964aa7SSimon Glass
123dd0b0122SSimon Glassconfig DEBUG_UART_SHIFT
124dd0b0122SSimon Glass	int "UART register shift"
125dd0b0122SSimon Glass	depends on DEBUG_UART
126dd0b0122SSimon Glass	default 0 if DEBUG_UART
127dd0b0122SSimon Glass	help
128dd0b0122SSimon Glass	  Some UARTs (notably ns16550) support different register layouts
129dd0b0122SSimon Glass	  where the registers are spaced either as bytes, words or some other
130dd0b0122SSimon Glass	  value. Use this value to specify the shift to use, where 0=byte
131dd0b0122SSimon Glass	  registers, 2=32-bit word registers, etc.
132dd0b0122SSimon Glass
1330e977bc1SSimon Glassconfig DEBUG_UART_BOARD_INIT
1340e977bc1SSimon Glass	bool "Enable board-specific debug UART init"
1350e977bc1SSimon Glass	depends on DEBUG_UART
1360e977bc1SSimon Glass	help
1370e977bc1SSimon Glass	  Some boards need to set things up before the debug UART can be used.
1380e977bc1SSimon Glass	  On these boards a call to debug_uart_init() is insufficient. When
1390e977bc1SSimon Glass	  this option is enabled, the function board_debug_uart_init() will
1400e977bc1SSimon Glass	  be called when debug_uart_init() is called. You can put any code
1410e977bc1SSimon Glass	  here that is needed to set up the UART ready for use, such as set
1420e977bc1SSimon Glass	  pin multiplexing or enable clocks.
1430e977bc1SSimon Glass
144c7fefcb9SSimon Glassconfig DEBUG_UART_ANNOUNCE
145c7fefcb9SSimon Glass	bool "Show a message when the debug UART starts up"
146c7fefcb9SSimon Glass	depends on DEBUG_UART
147c7fefcb9SSimon Glass	help
148c7fefcb9SSimon Glass	  Enable this option to show a message when the debug UART is ready
149c7fefcb9SSimon Glass	  for use. You will see a message like "<debug_uart> " as soon as
150c7fefcb9SSimon Glass	  U-Boot has the UART ready for use (i.e. your code calls
151c7fefcb9SSimon Glass	  debug_uart_init()). This can be useful just as a check that
152c7fefcb9SSimon Glass	  everything is working.
153c7fefcb9SSimon Glass
154220e8021SThomas Chouconfig ALTERA_JTAG_UART
155220e8021SThomas Chou	bool "Altera JTAG UART support"
156220e8021SThomas Chou	depends on DM_SERIAL
157220e8021SThomas Chou	help
158220e8021SThomas Chou	  Select this to enable an JTAG UART for Altera devices.The JTAG UART
159220e8021SThomas Chou	  core implements a method to communicate serial character streams
160220e8021SThomas Chou	  between a host PC and a Qsys system on an Altera FPGA. Please find
161220e8021SThomas Chou	  details on the "Embedded Peripherals IP User Guide" of Altera.
162220e8021SThomas Chou
163220e8021SThomas Chouconfig ALTERA_JTAG_UART_BYPASS
164220e8021SThomas Chou	bool "Bypass output when no connection"
165220e8021SThomas Chou	depends on ALTERA_JTAG_UART
166220e8021SThomas Chou	help
167220e8021SThomas Chou	  Bypass console output and keep going even if there is no JTAG
168220e8021SThomas Chou	  terminal connection with the host. The console output will resume
169220e8021SThomas Chou	  once the JTAG terminal is connected. Without the bypass, the console
170220e8021SThomas Chou	  output will wait forever until a JTAG terminal is connected. If you
171220e8021SThomas Chou	  not are sure, say Y.
172220e8021SThomas Chou
173da2f838dSThomas Chouconfig ALTERA_UART
174da2f838dSThomas Chou	bool "Altera UART support"
175da2f838dSThomas Chou	depends on DM_SERIAL
176da2f838dSThomas Chou	help
177da2f838dSThomas Chou	  Select this to enable an UART for Altera devices. Please find
178da2f838dSThomas Chou	  details on the "Embedded Peripherals IP User Guide" of Altera.
179da2f838dSThomas Chou
180765a1b1eSSimon Glassconfig ROCKCHIP_SERIAL
181765a1b1eSSimon Glass	bool "Rockchip on-chip UART support"
182d18f37c7SMasahiro Yamada	depends on ARCH_ROCKCHIP && DM_SERIAL
183765a1b1eSSimon Glass	help
184765a1b1eSSimon Glass	  Select this to enable a debug UART for Rockchip devices. This uses
185765a1b1eSSimon Glass	  the ns16550 driver. You will need to #define CONFIG_SYS_NS16550 in
186765a1b1eSSimon Glass	  your board config header. The clock input is automatically set to
187765a1b1eSSimon Glass	  use the oscillator (24MHz).
188765a1b1eSSimon Glass
189af282245SSimon Glassconfig SANDBOX_SERIAL
190af282245SSimon Glass	bool "Sandbox UART support"
1912ea65f3eSMasahiro Yamada	depends on SANDBOX
192af282245SSimon Glass	help
193af282245SSimon Glass	  Select this to enable a seral UART for sandbox. This is required to
194af282245SSimon Glass	  operate correctly, otherwise you will see no serial output from
195af282245SSimon Glass	  sandbox. The emulated UART will display to the console and console
196af282245SSimon Glass	  input will be fed into the UART. This allows you to interact with
197af282245SSimon Glass	  U-Boot.
198af282245SSimon Glass
199af282245SSimon Glass	  The operation of the console is controlled by the -t command-line
200af282245SSimon Glass	  flag. In raw mode, U-Boot sees all characters from the terminal
201af282245SSimon Glass	  before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
202af282245SSimon Glass	  is processed by the terminal, and terminates U-Boot. Valid options
203af282245SSimon Glass	  are:
204af282245SSimon Glass
205af282245SSimon Glass	     -t raw-with-sigs	Raw mode, Ctrl-C will terminate U-Boot
206af282245SSimon Glass	     -t raw		Raw mode, Ctrl-C is processed by U-Boot
207af282245SSimon Glass	     -t cooked		Cooked mode, Ctrl-C terminates
208af282245SSimon Glass
209ff247b7aSMasahiro Yamadaconfig UNIPHIER_SERIAL
210b6ef3a3fSMasahiro Yamada	bool "Support for UniPhier on-chip UART"
2112ea65f3eSMasahiro Yamada	depends on ARCH_UNIPHIER
212ff247b7aSMasahiro Yamada	help
213b6ef3a3fSMasahiro Yamada	  If you have a UniPhier based board and want to use the on-chip
214b6ef3a3fSMasahiro Yamada	  serial ports, say Y to this option. If unsure, say N.
215dcfe4a54SSimon Glass
216dcfe4a54SSimon Glassconfig X86_SERIAL
217dcfe4a54SSimon Glass	bool "Support for 16550 serial port on x86 machines"
218dcfe4a54SSimon Glass	depends on X86
219dcfe4a54SSimon Glass	default y
220dcfe4a54SSimon Glass	help
221dcfe4a54SSimon Glass	  Most x86 machines have a ns16550 UART or compatible. This can be
222dcfe4a54SSimon Glass	  enabled in the device tree with the correct input clock frequency
223dcfe4a54SSimon Glass	  provided (default 1843200). Enable this to obtain serial console
224dcfe4a54SSimon Glass	  output.
2250b11dbf7SMasahiro Yamada
2260b11dbf7SMasahiro Yamadaendmenu
227