xref: /openbmc/u-boot/drivers/serial/Kconfig (revision af282245)
1da333ae7SMasahiro Yamadaconfig DM_SERIAL
2da333ae7SMasahiro Yamada	bool "Enable Driver Model for serial drivers"
3da333ae7SMasahiro Yamada	depends on DM
4da333ae7SMasahiro Yamada	help
5f94a1bedSSimon Glass	  Enable driver model for serial. This replaces
6f94a1bedSSimon Glass	  drivers/serial/serial.c with the serial uclass, which
7f94a1bedSSimon Glass	  implements serial_putc() etc. The uclass interface is
8f94a1bedSSimon Glass	  defined in include/serial.h.
9ff247b7aSMasahiro Yamada
102f964aa7SSimon Glassconfig DEBUG_UART
112f964aa7SSimon Glass	bool "Enable an early debug UART for debugging"
122f964aa7SSimon Glass	help
132f964aa7SSimon Glass	  The debug UART is intended for use very early in U-Boot to debug
142f964aa7SSimon Glass	  problems when an ICE or other debug mechanism is not available.
152f964aa7SSimon Glass
162f964aa7SSimon Glass	  To use it you should:
172f964aa7SSimon Glass	  - Make sure your UART supports this interface
182f964aa7SSimon Glass	  - Enable CONFIG_DEBUG_UART
192f964aa7SSimon Glass	  - Enable the CONFIG for your UART to tell it to provide this interface
202f964aa7SSimon Glass	        (e.g. CONFIG_DEBUG_UART_NS16550)
212f964aa7SSimon Glass	  - Define the required settings as needed (see below)
222f964aa7SSimon Glass	  - Call debug_uart_init() before use
232f964aa7SSimon Glass	  - Call debug_uart_putc() to output a character
242f964aa7SSimon Glass
252f964aa7SSimon Glass	  Depending on your platform it may be possible to use this UART before
262f964aa7SSimon Glass	  a stack is available.
272f964aa7SSimon Glass
282f964aa7SSimon Glass	  If your UART does not support this interface you can probably add
292f964aa7SSimon Glass	  support quite easily. Remember that you cannot use driver model and
302f964aa7SSimon Glass	  it is preferred to use no stack.
312f964aa7SSimon Glass
322f964aa7SSimon Glass	  You must not use this UART once driver model is working and the
332f964aa7SSimon Glass	  serial drivers are up and running (done in serial_init()). Otherwise
342f964aa7SSimon Glass	  the drivers may conflict and you will get strange output.
352f964aa7SSimon Glass
3621d00436SSimon Glasschoice
3721d00436SSimon Glass	prompt "Select which UART will provide the debug UART"
3821d00436SSimon Glass	depends on DEBUG_UART
3921d00436SSimon Glass
4021d00436SSimon Glassconfig DEBUG_UART_NS16550
4121d00436SSimon Glass	bool "ns16550"
4221d00436SSimon Glass	help
4321d00436SSimon Glass	  Select this to enable a debug UART using the ns16550 driver. You
4421d00436SSimon Glass	  will need to provide parameters to make this work. The driver will
4521d00436SSimon Glass	  be available until the real driver model serial is running.
4621d00436SSimon Glass
4721d00436SSimon Glassendchoice
4821d00436SSimon Glass
492f964aa7SSimon Glassconfig DEBUG_UART_BASE
502f964aa7SSimon Glass	hex "Base address of UART"
512f964aa7SSimon Glass	depends on DEBUG_UART
522f964aa7SSimon Glass	help
532f964aa7SSimon Glass	  This is the base address of your UART for memory-mapped UARTs.
542f964aa7SSimon Glass
552f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
562f964aa7SSimon Glass	  to use the correct value here.
572f964aa7SSimon Glass
582f964aa7SSimon Glassconfig DEBUG_UART_CLOCK
592f964aa7SSimon Glass	int "UART input clock"
602f964aa7SSimon Glass	depends on DEBUG_UART
612f964aa7SSimon Glass	help
622f964aa7SSimon Glass	  The UART input clock determines the speed of the internal UART
632f964aa7SSimon Glass	  circuitry. The baud rate is derived from this by dividing the input
642f964aa7SSimon Glass	  clock down.
652f964aa7SSimon Glass
662f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
672f964aa7SSimon Glass	  to use the correct value here.
682f964aa7SSimon Glass
69dd0b0122SSimon Glassconfig DEBUG_UART_SHIFT
70dd0b0122SSimon Glass	int "UART register shift"
71dd0b0122SSimon Glass	depends on DEBUG_UART
72dd0b0122SSimon Glass	default 0 if DEBUG_UART
73dd0b0122SSimon Glass	help
74dd0b0122SSimon Glass	  Some UARTs (notably ns16550) support different register layouts
75dd0b0122SSimon Glass	  where the registers are spaced either as bytes, words or some other
76dd0b0122SSimon Glass	  value. Use this value to specify the shift to use, where 0=byte
77dd0b0122SSimon Glass	  registers, 2=32-bit word registers, etc.
78dd0b0122SSimon Glass
79*af282245SSimon Glassconfig SANDBOX_SERIAL
80*af282245SSimon Glass	bool "Sandbox UART support"
81*af282245SSimon Glass	depends on SANDBOX && DM
82*af282245SSimon Glass	help
83*af282245SSimon Glass	  Select this to enable a seral UART for sandbox. This is required to
84*af282245SSimon Glass	  operate correctly, otherwise you will see no serial output from
85*af282245SSimon Glass	  sandbox. The emulated UART will display to the console and console
86*af282245SSimon Glass	  input will be fed into the UART. This allows you to interact with
87*af282245SSimon Glass	  U-Boot.
88*af282245SSimon Glass
89*af282245SSimon Glass	  The operation of the console is controlled by the -t command-line
90*af282245SSimon Glass	  flag. In raw mode, U-Boot sees all characters from the terminal
91*af282245SSimon Glass	  before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
92*af282245SSimon Glass	  is processed by the terminal, and terminates U-Boot. Valid options
93*af282245SSimon Glass	  are:
94*af282245SSimon Glass
95*af282245SSimon Glass	     -t raw-with-sigs	Raw mode, Ctrl-C will terminate U-Boot
96*af282245SSimon Glass	     -t raw		Raw mode, Ctrl-C is processed by U-Boot
97*af282245SSimon Glass	     -t cooked		Cooked mode, Ctrl-C terminates
98*af282245SSimon Glass
99ff247b7aSMasahiro Yamadaconfig UNIPHIER_SERIAL
100b6ef3a3fSMasahiro Yamada	bool "Support for UniPhier on-chip UART"
101ff247b7aSMasahiro Yamada	depends on ARCH_UNIPHIER && DM_SERIAL
102ff247b7aSMasahiro Yamada	help
103b6ef3a3fSMasahiro Yamada	  If you have a UniPhier based board and want to use the on-chip
104b6ef3a3fSMasahiro Yamada	  serial ports, say Y to this option. If unsure, say N.
105