xref: /openbmc/u-boot/drivers/serial/Kconfig (revision 21d00436)
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
36*21d00436SSimon Glasschoice
37*21d00436SSimon Glass	prompt "Select which UART will provide the debug UART"
38*21d00436SSimon Glass	depends on DEBUG_UART
39*21d00436SSimon Glass
40*21d00436SSimon Glassconfig DEBUG_UART_NS16550
41*21d00436SSimon Glass	bool "ns16550"
42*21d00436SSimon Glass	help
43*21d00436SSimon Glass	  Select this to enable a debug UART using the ns16550 driver. You
44*21d00436SSimon Glass	  will need to provide parameters to make this work. The driver will
45*21d00436SSimon Glass	  be available until the real driver model serial is running.
46*21d00436SSimon Glass
47*21d00436SSimon Glassendchoice
48*21d00436SSimon 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
69ff247b7aSMasahiro Yamadaconfig UNIPHIER_SERIAL
70ff247b7aSMasahiro Yamada	bool "UniPhier on-chip UART support"
71ff247b7aSMasahiro Yamada	depends on ARCH_UNIPHIER && DM_SERIAL
72ff247b7aSMasahiro Yamada	help
73ff247b7aSMasahiro Yamada	  Support for the on-chip UARTs on the Panasonic UniPhier platform.
74