]> git.kernelconcepts.de Git - karo-tx-uboot.git/blob - drivers/serial/Kconfig
dm: serial: Add a REQUIRE_SERIAL_CONSOLE option for boards with no serial port
[karo-tx-uboot.git] / drivers / serial / Kconfig
1 config REQUIRE_SERIAL_CONSOLE
2         bool "Require a serial port for console"
3         # Running without a serial console is not supported by the
4         # non-dm serial code
5         depends on DM_SERIAL
6         default y
7         help
8           Require a serial port for the console, and panic if none is found
9           during serial port initialization (default y). Set this to n on
10           boards which have no debug serial port whatsoever.
11
12 config DM_SERIAL
13         bool "Enable Driver Model for serial drivers"
14         depends on DM
15         help
16           Enable driver model for serial. This replaces
17           drivers/serial/serial.c with the serial uclass, which
18           implements serial_putc() etc. The uclass interface is
19           defined in include/serial.h.
20
21 config DEBUG_UART
22         bool "Enable an early debug UART for debugging"
23         help
24           The debug UART is intended for use very early in U-Boot to debug
25           problems when an ICE or other debug mechanism is not available.
26
27           To use it you should:
28           - Make sure your UART supports this interface
29           - Enable CONFIG_DEBUG_UART
30           - Enable the CONFIG for your UART to tell it to provide this interface
31                 (e.g. CONFIG_DEBUG_UART_NS16550)
32           - Define the required settings as needed (see below)
33           - Call debug_uart_init() before use
34           - Call debug_uart_putc() to output a character
35
36           Depending on your platform it may be possible to use this UART before
37           a stack is available.
38
39           If your UART does not support this interface you can probably add
40           support quite easily. Remember that you cannot use driver model and
41           it is preferred to use no stack.
42
43           You must not use this UART once driver model is working and the
44           serial drivers are up and running (done in serial_init()). Otherwise
45           the drivers may conflict and you will get strange output.
46
47 choice
48         prompt "Select which UART will provide the debug UART"
49         depends on DEBUG_UART
50
51 config DEBUG_UART_NS16550
52         bool "ns16550"
53         help
54           Select this to enable a debug UART using the ns16550 driver. You
55           will need to provide parameters to make this work. The driver will
56           be available until the real driver model serial is running.
57
58 config DEBUG_EFI_CONSOLE
59         bool "EFI"
60         depends on EFI_APP
61         help
62           Select this to enable a debug console which calls back to EFI to
63           output to the console. This can be useful for early debugging of
64           U-Boot when running on top of EFI (Extensive Firmware Interface).
65           This is a type of BIOS used by PCs.
66
67 config DEBUG_UART_S5P
68         bool "Samsung S5P"
69         help
70           Select this to enable a debug UART using the serial_s5p driver. You
71           will need to provide parameters to make this work. The driver will
72           be available until the real driver-model serial is running.
73
74 endchoice
75
76 config DEBUG_UART_BASE
77         hex "Base address of UART"
78         depends on DEBUG_UART
79         help
80           This is the base address of your UART for memory-mapped UARTs.
81
82           A default should be provided by your board, but if not you will need
83           to use the correct value here.
84
85 config DEBUG_UART_CLOCK
86         int "UART input clock"
87         depends on DEBUG_UART
88         help
89           The UART input clock determines the speed of the internal UART
90           circuitry. The baud rate is derived from this by dividing the input
91           clock down.
92
93           A default should be provided by your board, but if not you will need
94           to use the correct value here.
95
96 config DEBUG_UART_SHIFT
97         int "UART register shift"
98         depends on DEBUG_UART
99         default 0 if DEBUG_UART
100         help
101           Some UARTs (notably ns16550) support different register layouts
102           where the registers are spaced either as bytes, words or some other
103           value. Use this value to specify the shift to use, where 0=byte
104           registers, 2=32-bit word registers, etc.
105
106 config SANDBOX_SERIAL
107         bool "Sandbox UART support"
108         depends on SANDBOX && DM
109         help
110           Select this to enable a seral UART for sandbox. This is required to
111           operate correctly, otherwise you will see no serial output from
112           sandbox. The emulated UART will display to the console and console
113           input will be fed into the UART. This allows you to interact with
114           U-Boot.
115
116           The operation of the console is controlled by the -t command-line
117           flag. In raw mode, U-Boot sees all characters from the terminal
118           before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
119           is processed by the terminal, and terminates U-Boot. Valid options
120           are:
121
122              -t raw-with-sigs   Raw mode, Ctrl-C will terminate U-Boot
123              -t raw             Raw mode, Ctrl-C is processed by U-Boot
124              -t cooked          Cooked mode, Ctrl-C terminates
125
126 config UNIPHIER_SERIAL
127         bool "Support for UniPhier on-chip UART"
128         depends on ARCH_UNIPHIER && DM_SERIAL
129         help
130           If you have a UniPhier based board and want to use the on-chip
131           serial ports, say Y to this option. If unsure, say N.
132
133 config X86_SERIAL
134         bool "Support for 16550 serial port on x86 machines"
135         depends on X86
136         default y
137         help
138           Most x86 machines have a ns16550 UART or compatible. This can be
139           enabled in the device tree with the correct input clock frequency
140           provided (default 1843200). Enable this to obtain serial console
141           output.