blob: ddb725d326bc276a6b73c8e192b739120beabef0 [file] [log] [blame]
Masahiro Yamada0b11dbf2015-07-26 02:46:26 +09001#
2# Serial device configuration
3#
4
5menu "Serial drivers"
6
Hans de Goede8c458582015-08-08 17:45:18 +02007config REQUIRE_SERIAL_CONSOLE
8 bool "Require a serial port for console"
9 # Running without a serial console is not supported by the
10 # non-dm serial code
11 depends on DM_SERIAL
12 default y
13 help
14 Require a serial port for the console, and panic if none is found
15 during serial port initialization (default y). Set this to n on
16 boards which have no debug serial port whatsoever.
17
Masahiro Yamadada333ae2014-10-23 22:26:09 +090018config DM_SERIAL
19 bool "Enable Driver Model for serial drivers"
20 depends on DM
21 help
Simon Glassf94a1be2015-02-05 21:41:35 -070022 Enable driver model for serial. This replaces
23 drivers/serial/serial.c with the serial uclass, which
24 implements serial_putc() etc. The uclass interface is
25 defined in include/serial.h.
Masahiro Yamadaff247b72014-10-23 22:26:11 +090026
Simon Glass2f964aa2015-01-26 18:27:07 -070027config DEBUG_UART
28 bool "Enable an early debug UART for debugging"
29 help
30 The debug UART is intended for use very early in U-Boot to debug
31 problems when an ICE or other debug mechanism is not available.
32
33 To use it you should:
34 - Make sure your UART supports this interface
35 - Enable CONFIG_DEBUG_UART
36 - Enable the CONFIG for your UART to tell it to provide this interface
37 (e.g. CONFIG_DEBUG_UART_NS16550)
38 - Define the required settings as needed (see below)
39 - Call debug_uart_init() before use
40 - Call debug_uart_putc() to output a character
41
42 Depending on your platform it may be possible to use this UART before
43 a stack is available.
44
45 If your UART does not support this interface you can probably add
46 support quite easily. Remember that you cannot use driver model and
47 it is preferred to use no stack.
48
49 You must not use this UART once driver model is working and the
50 serial drivers are up and running (done in serial_init()). Otherwise
51 the drivers may conflict and you will get strange output.
52
Simon Glass21d00432015-01-26 18:27:09 -070053choice
54 prompt "Select which UART will provide the debug UART"
55 depends on DEBUG_UART
56
57config DEBUG_UART_NS16550
58 bool "ns16550"
59 help
60 Select this to enable a debug UART using the ns16550 driver. You
61 will need to provide parameters to make this work. The driver will
62 be available until the real driver model serial is running.
63
Simon Glass275854b2015-08-04 12:33:40 -060064config DEBUG_EFI_CONSOLE
65 bool "EFI"
66 depends on EFI_APP
67 help
68 Select this to enable a debug console which calls back to EFI to
69 output to the console. This can be useful for early debugging of
70 U-Boot when running on top of EFI (Extensive Firmware Interface).
71 This is a type of BIOS used by PCs.
72
Simon Glassbf6e7022015-07-02 18:15:54 -060073config DEBUG_UART_S5P
74 bool "Samsung S5P"
75 help
76 Select this to enable a debug UART using the serial_s5p driver. You
77 will need to provide parameters to make this work. The driver will
78 be available until the real driver-model serial is running.
79
Simon Glass21d00432015-01-26 18:27:09 -070080endchoice
81
Simon Glass2f964aa2015-01-26 18:27:07 -070082config DEBUG_UART_BASE
83 hex "Base address of UART"
84 depends on DEBUG_UART
85 help
86 This is the base address of your UART for memory-mapped UARTs.
87
88 A default should be provided by your board, but if not you will need
89 to use the correct value here.
90
91config DEBUG_UART_CLOCK
92 int "UART input clock"
93 depends on DEBUG_UART
94 help
95 The UART input clock determines the speed of the internal UART
96 circuitry. The baud rate is derived from this by dividing the input
97 clock down.
98
99 A default should be provided by your board, but if not you will need
100 to use the correct value here.
101
Simon Glassdd0b0122015-02-27 22:06:25 -0700102config DEBUG_UART_SHIFT
103 int "UART register shift"
104 depends on DEBUG_UART
105 default 0 if DEBUG_UART
106 help
107 Some UARTs (notably ns16550) support different register layouts
108 where the registers are spaced either as bytes, words or some other
109 value. Use this value to specify the shift to use, where 0=byte
110 registers, 2=32-bit word registers, etc.
111
Simon Glass765a1b12015-08-30 16:55:19 -0600112config ROCKCHIP_SERIAL
113 bool "Rockchip on-chip UART support"
Masahiro Yamadad18f37c2015-09-29 12:32:03 +0900114 depends on ARCH_ROCKCHIP && DM_SERIAL
Simon Glass765a1b12015-08-30 16:55:19 -0600115 help
116 Select this to enable a debug UART for Rockchip devices. This uses
117 the ns16550 driver. You will need to #define CONFIG_SYS_NS16550 in
118 your board config header. The clock input is automatically set to
119 use the oscillator (24MHz).
120
Simon Glassaf282242015-03-06 13:19:03 -0700121config SANDBOX_SERIAL
122 bool "Sandbox UART support"
Masahiro Yamada2ea65f32015-08-28 20:14:21 +0900123 depends on SANDBOX
Simon Glassaf282242015-03-06 13:19:03 -0700124 help
125 Select this to enable a seral UART for sandbox. This is required to
126 operate correctly, otherwise you will see no serial output from
127 sandbox. The emulated UART will display to the console and console
128 input will be fed into the UART. This allows you to interact with
129 U-Boot.
130
131 The operation of the console is controlled by the -t command-line
132 flag. In raw mode, U-Boot sees all characters from the terminal
133 before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
134 is processed by the terminal, and terminates U-Boot. Valid options
135 are:
136
137 -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot
138 -t raw Raw mode, Ctrl-C is processed by U-Boot
139 -t cooked Cooked mode, Ctrl-C terminates
140
Masahiro Yamadaff247b72014-10-23 22:26:11 +0900141config UNIPHIER_SERIAL
Masahiro Yamadab6ef3a32015-05-29 17:30:01 +0900142 bool "Support for UniPhier on-chip UART"
Masahiro Yamada2ea65f32015-08-28 20:14:21 +0900143 depends on ARCH_UNIPHIER
Masahiro Yamadaff247b72014-10-23 22:26:11 +0900144 help
Masahiro Yamadab6ef3a32015-05-29 17:30:01 +0900145 If you have a UniPhier based board and want to use the on-chip
146 serial ports, say Y to this option. If unsure, say N.
Simon Glassdcfe4a52015-07-27 15:47:23 -0600147
148config X86_SERIAL
149 bool "Support for 16550 serial port on x86 machines"
150 depends on X86
151 default y
152 help
153 Most x86 machines have a ns16550 UART or compatible. This can be
154 enabled in the device tree with the correct input clock frequency
155 provided (default 1843200). Enable this to obtain serial console
156 output.
Masahiro Yamada0b11dbf2015-07-26 02:46:26 +0900157
158endmenu