xref: /openbmc/u-boot/drivers/serial/Kconfig (revision bf6e7022)
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
47275854baSSimon Glassconfig DEBUG_EFI_CONSOLE
48275854baSSimon Glass	bool "EFI"
49275854baSSimon Glass	depends on EFI_APP
50275854baSSimon Glass	help
51275854baSSimon Glass	  Select this to enable a debug console which calls back to EFI to
52275854baSSimon Glass	  output to the console. This can be useful for early debugging of
53275854baSSimon Glass	  U-Boot when running on top of EFI (Extensive Firmware Interface).
54275854baSSimon Glass	  This is a type of BIOS used by PCs.
55275854baSSimon Glass
56*bf6e7022SSimon Glassconfig DEBUG_UART_S5P
57*bf6e7022SSimon Glass	bool "Samsung S5P"
58*bf6e7022SSimon Glass	help
59*bf6e7022SSimon Glass	  Select this to enable a debug UART using the serial_s5p driver. You
60*bf6e7022SSimon Glass	  will need to provide parameters to make this work. The driver will
61*bf6e7022SSimon Glass	  be available until the real driver-model serial is running.
62*bf6e7022SSimon Glass
6321d00436SSimon Glassendchoice
6421d00436SSimon Glass
652f964aa7SSimon Glassconfig DEBUG_UART_BASE
662f964aa7SSimon Glass	hex "Base address of UART"
672f964aa7SSimon Glass	depends on DEBUG_UART
682f964aa7SSimon Glass	help
692f964aa7SSimon Glass	  This is the base address of your UART for memory-mapped UARTs.
702f964aa7SSimon Glass
712f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
722f964aa7SSimon Glass	  to use the correct value here.
732f964aa7SSimon Glass
742f964aa7SSimon Glassconfig DEBUG_UART_CLOCK
752f964aa7SSimon Glass	int "UART input clock"
762f964aa7SSimon Glass	depends on DEBUG_UART
772f964aa7SSimon Glass	help
782f964aa7SSimon Glass	  The UART input clock determines the speed of the internal UART
792f964aa7SSimon Glass	  circuitry. The baud rate is derived from this by dividing the input
802f964aa7SSimon Glass	  clock down.
812f964aa7SSimon Glass
822f964aa7SSimon Glass	  A default should be provided by your board, but if not you will need
832f964aa7SSimon Glass	  to use the correct value here.
842f964aa7SSimon Glass
85dd0b0122SSimon Glassconfig DEBUG_UART_SHIFT
86dd0b0122SSimon Glass	int "UART register shift"
87dd0b0122SSimon Glass	depends on DEBUG_UART
88dd0b0122SSimon Glass	default 0 if DEBUG_UART
89dd0b0122SSimon Glass	help
90dd0b0122SSimon Glass	  Some UARTs (notably ns16550) support different register layouts
91dd0b0122SSimon Glass	  where the registers are spaced either as bytes, words or some other
92dd0b0122SSimon Glass	  value. Use this value to specify the shift to use, where 0=byte
93dd0b0122SSimon Glass	  registers, 2=32-bit word registers, etc.
94dd0b0122SSimon Glass
95af282245SSimon Glassconfig SANDBOX_SERIAL
96af282245SSimon Glass	bool "Sandbox UART support"
97af282245SSimon Glass	depends on SANDBOX && DM
98af282245SSimon Glass	help
99af282245SSimon Glass	  Select this to enable a seral UART for sandbox. This is required to
100af282245SSimon Glass	  operate correctly, otherwise you will see no serial output from
101af282245SSimon Glass	  sandbox. The emulated UART will display to the console and console
102af282245SSimon Glass	  input will be fed into the UART. This allows you to interact with
103af282245SSimon Glass	  U-Boot.
104af282245SSimon Glass
105af282245SSimon Glass	  The operation of the console is controlled by the -t command-line
106af282245SSimon Glass	  flag. In raw mode, U-Boot sees all characters from the terminal
107af282245SSimon Glass	  before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
108af282245SSimon Glass	  is processed by the terminal, and terminates U-Boot. Valid options
109af282245SSimon Glass	  are:
110af282245SSimon Glass
111af282245SSimon Glass	     -t raw-with-sigs	Raw mode, Ctrl-C will terminate U-Boot
112af282245SSimon Glass	     -t raw		Raw mode, Ctrl-C is processed by U-Boot
113af282245SSimon Glass	     -t cooked		Cooked mode, Ctrl-C terminates
114af282245SSimon Glass
115ff247b7aSMasahiro Yamadaconfig UNIPHIER_SERIAL
116b6ef3a3fSMasahiro Yamada	bool "Support for UniPhier on-chip UART"
117ff247b7aSMasahiro Yamada	depends on ARCH_UNIPHIER && DM_SERIAL
118ff247b7aSMasahiro Yamada	help
119b6ef3a3fSMasahiro Yamada	  If you have a UniPhier based board and want to use the on-chip
120b6ef3a3fSMasahiro Yamada	  serial ports, say Y to this option. If unsure, say N.
121dcfe4a54SSimon Glass
122dcfe4a54SSimon Glassconfig X86_SERIAL
123dcfe4a54SSimon Glass	bool "Support for 16550 serial port on x86 machines"
124dcfe4a54SSimon Glass	depends on X86
125dcfe4a54SSimon Glass	default y
126dcfe4a54SSimon Glass	help
127dcfe4a54SSimon Glass	  Most x86 machines have a ns16550 UART or compatible. This can be
128dcfe4a54SSimon Glass	  enabled in the device tree with the correct input clock frequency
129dcfe4a54SSimon Glass	  provided (default 1843200). Enable this to obtain serial console
130dcfe4a54SSimon Glass	  output.
131