Kconfig 37 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643644645646647648649650651652653654655656657658659660661662663664665666667668669670671672673674675676677678679680681682683684685686687688689690691692693694695696697698699700701702703704705706707708709710711712713714715716717718719720721722723724725726727728729730731732733734735736737738739740741742743744745746747748749750751752753754755756757758759760761762763764765766767768769770771772773774775776777778779780781782783784785786787788789790791792793794795796797798799800801802803804805806807808809810811812813814815816817818819820821822823824825826827828829830831832833834835836837838839840841842843844845846847848849850851852853854855856857858859860861862863864865866867868869870871872873874875876877878879880881882883884885886887888889890891892893894895896897898899900901902903904905906907908909910911912913914915916917918919920921922923924925926927928929930931932933934935936937938939940941942943944945946947948949950951952953954955956957958959960961962963964965966967968969970971972973974975976977978979980981982983984985986987988989990991992993994995996997998999100010011002100310041005100610071008100910101011101210131014101510161017101810191020102110221023102410251026102710281029103010311032103310341035103610371038103910401041104210431044104510461047104810491050105110521053105410551056105710581059106010611062106310641065106610671068106910701071107210731074107510761077107810791080108110821083108410851086108710881089109010911092109310941095109610971098109911001101110211031104110511061107110811091110111111121113111411151116111711181119112011211122112311241125112611271128112911301131113211331134113511361137113811391140114111421143114411451146114711481149115011511152115311541155115611571158115911601161
  1. #
  2. # Serial device configuration
  3. #
  4. menuconfig SERIAL
  5. bool "Serial"
  6. default y
  7. help
  8. Enable support for serial drivers. This allows use of a serial UART
  9. for displaying messages while U-Boot is running. It also brings in
  10. printf() and panic() functions. This should normally be enabled
  11. unless there are space reasons not to. If you just need to disable
  12. the console you can adjust the stdout environment variable or use
  13. SILENT_CONSOLE.
  14. if SERIAL
  15. config BAUDRATE
  16. int "Default baudrate"
  17. default 115200
  18. help
  19. Select a default baudrate, where "default" has a driver-specific
  20. meaning of either setting the baudrate for the early debug UART
  21. in the SPL stage (most drivers) or for choosing a default baudrate
  22. in the absence of an environment setting (serial_mxc.c).
  23. config REQUIRE_SERIAL_CONSOLE
  24. bool "Require a serial port for console"
  25. # Running without a serial console is not supported by the
  26. # non-dm serial code
  27. depends on DM_SERIAL
  28. default y
  29. help
  30. Require a serial port for the console, and panic if none is found
  31. during serial port initialization (default y). Set this to n on
  32. boards which have no debug serial port whatsoever.
  33. config SPECIFY_CONSOLE_INDEX
  34. bool "Specify the port number used for console"
  35. default y if !DM_SERIAL || (SPL && !SPL_DM_SERIAL) || \
  36. (TPL && !TPL_DM_SERIAL)
  37. help
  38. In various cases, we need to specify which of the UART devices that
  39. a board or SoC has available are to be used for the console device
  40. in U-Boot.
  41. config SERIAL_PRESENT
  42. bool "Provide a serial driver"
  43. depends on DM_SERIAL
  44. default y
  45. help
  46. In very space-constrained devices even the full UART driver is too
  47. large. In this case the debug UART can still be used in some cases.
  48. This option enables the full UART in U-Boot, so if is it disabled,
  49. the full UART driver will be omitted, thus saving space.
  50. config SPL_SERIAL_PRESENT
  51. bool "Provide a serial driver in SPL"
  52. depends on DM_SERIAL && SPL
  53. default y
  54. help
  55. In very space-constrained devices even the full UART driver is too
  56. large. In this case the debug UART can still be used in some cases.
  57. This option enables the full UART in SPL, so if is it disabled,
  58. the full UART driver will be omitted, thus saving space.
  59. config TPL_SERIAL_PRESENT
  60. bool "Provide a serial driver in TPL"
  61. depends on DM_SERIAL && TPL
  62. default y
  63. help
  64. In very space-constrained devices even the full UART driver is too
  65. large. In this case the debug UART can still be used in some cases.
  66. This option enables the full UART in TPL, so if is it disabled,
  67. the full UART driver will be omitted, thus saving space.
  68. config VPL_SERIAL_PRESENT
  69. bool "Provide a serial driver in VPL"
  70. depends on DM_SERIAL && VPL
  71. default y
  72. help
  73. In very space-constrained devices even the full UART driver is too
  74. large. In this case the debug UART can still be used in some cases.
  75. This option enables the full UART in TPL, so if is it disabled,
  76. the full UART driver will be omitted, thus saving space.
  77. config CONS_INDEX
  78. int "UART used for console"
  79. depends on SPECIFY_CONSOLE_INDEX
  80. range 0 6
  81. default 1
  82. help
  83. Set this to match the UART number of the serial console.
  84. config DM_SERIAL
  85. bool "Enable Driver Model for serial drivers"
  86. depends on DM
  87. select SYS_MALLOC_F
  88. help
  89. Enable driver model for serial. This replaces
  90. drivers/serial/serial.c with the serial uclass, which
  91. implements serial_putc() etc. The uclass interface is
  92. defined in include/serial.h.
  93. config SERIAL_RX_BUFFER
  94. bool "Enable RX buffer for serial input"
  95. depends on DM_SERIAL
  96. help
  97. Enable RX buffer support for the serial driver. This enables
  98. pasting longer strings, even when the RX FIFO of the UART is
  99. not big enough (e.g. 16 bytes on the normal NS16550).
  100. config SERIAL_RX_BUFFER_SIZE
  101. int "RX buffer size"
  102. depends on SERIAL_RX_BUFFER
  103. default 256
  104. help
  105. The size of the RX buffer (needs to be power of 2)
  106. config SERIAL_PUTS
  107. bool "Enable printing strings all at once"
  108. depends on DM_SERIAL
  109. help
  110. Some serial drivers are much more efficient when printing multiple
  111. characters at once rather than printing characters individually. This
  112. can be because they can load a fifo, or because individual print
  113. calls have a constant overhead. With this option set, the serial
  114. subsystem will try to provide serial drivers with as many characters
  115. at once as possible, instead of printing characters one by one. Most
  116. serial drivers do not need this config to print efficiently. If
  117. unsure, say N.
  118. config SERIAL_SEARCH_ALL
  119. bool "Search for serial devices after default one failed"
  120. depends on DM_SERIAL
  121. help
  122. The serial subsystem only searches for a single serial device
  123. that was instantiated, but does not check whether it was probed
  124. correctly. With this option set, we make successful probing
  125. mandatory and search for fallback serial devices if the default
  126. device does not work.
  127. If unsure, say N.
  128. config SERIAL_PROBE_ALL
  129. bool "Probe all available serial devices"
  130. depends on DM_SERIAL
  131. help
  132. The serial subsystem only probes for a single serial device,
  133. but does not probe for other remaining serial devices.
  134. With this option set, we make probing and searching for
  135. all available devices optional.
  136. Normally, U-Boot talks to one serial port at a time, but SBSA
  137. compliant UART devices like PL011 require initialization
  138. by firmware and to let the kernel use serial port for sending
  139. and receiving the characters.
  140. If unsure, say N.
  141. config SPL_DM_SERIAL
  142. bool "Enable Driver Model for serial drivers in SPL"
  143. depends on DM_SERIAL && SPL_DM
  144. select SYS_SPL_MALLOC_F
  145. default y
  146. help
  147. Enable driver model for serial in SPL. This replaces
  148. drivers/serial/serial.c with the serial uclass, which
  149. implements serial_putc() etc. The uclass interface is
  150. defined in include/serial.h.
  151. config TPL_DM_SERIAL
  152. bool "Enable Driver Model for serial drivers in TPL"
  153. depends on DM_SERIAL && TPL_DM
  154. select SYS_TPL_MALLOC_F
  155. default y if TPL && DM_SERIAL
  156. help
  157. Enable driver model for serial in TPL. This replaces
  158. drivers/serial/serial.c with the serial uclass, which
  159. implements serial_putc() etc. The uclass interface is
  160. defined in include/serial.h.
  161. config VPL_DM_SERIAL
  162. bool "Enable Driver Model for serial drivers in VPL"
  163. depends on DM_SERIAL
  164. default y if VPL && DM_SERIAL
  165. help
  166. Enable driver model for serial in VPL. This replaces
  167. drivers/serial/serial.c with the serial uclass, which
  168. implements serial_putc() etc. The uclass interface is
  169. defined in include/serial.h.
  170. config DEBUG_UART
  171. bool "Enable an early debug UART for debugging"
  172. help
  173. The debug UART is intended for use very early in U-Boot to debug
  174. problems when an ICE or other debug mechanism is not available.
  175. To use it you should:
  176. - Make sure your UART supports this interface
  177. - Enable CONFIG_DEBUG_UART
  178. - Enable the CONFIG for your UART to tell it to provide this interface
  179. (e.g. CONFIG_DEBUG_UART_NS16550)
  180. - Define the required settings as needed (see below)
  181. - Call debug_uart_init() before use
  182. - Call debug_uart_putc() to output a character
  183. Depending on your platform it may be possible to use this UART before
  184. a stack is available.
  185. If your UART does not support this interface you can probably add
  186. support quite easily. Remember that you cannot use driver model and
  187. it is preferred to use no stack.
  188. You must not use this UART once driver model is working and the
  189. serial drivers are up and running (done in serial_init()). Otherwise
  190. the drivers may conflict and you will get strange output.
  191. choice
  192. prompt "Select which UART will provide the debug UART"
  193. depends on DEBUG_UART
  194. default DEBUG_SBI_CONSOLE if RISCV_SMODE
  195. default DEBUG_UART_NS16550
  196. config DEBUG_UART_ALTERA_JTAGUART
  197. bool "Altera JTAG UART"
  198. depends on ALTERA_JTAG_UART
  199. help
  200. Select this to enable a debug UART using the altera_jtag_uart driver.
  201. You will need to provide parameters to make this work. The driver will
  202. be available until the real driver model serial is running.
  203. config DEBUG_UART_ALTERA_UART
  204. bool "Altera UART"
  205. depends on ALTERA_UART
  206. help
  207. Select this to enable a debug UART using the altera_uart driver.
  208. You will need to provide parameters to make this work. The driver will
  209. be available until the real driver model serial is running.
  210. config DEBUG_UART_AR933X
  211. bool "QCA/Atheros ar933x"
  212. depends on AR933X_UART
  213. help
  214. Select this to enable a debug UART using the ar933x uart driver.
  215. You will need to provide parameters to make this work. The
  216. driver will be available until the real driver model serial is
  217. running.
  218. config DEBUG_ARC_SERIAL
  219. bool "ARC UART"
  220. depends on ARC_SERIAL
  221. help
  222. Select this to enable a debug UART using the ARC UART driver.
  223. You will need to provide parameters to make this work. The
  224. driver will be available until the real driver model serial is
  225. running.
  226. config DEBUG_UART_ATMEL
  227. bool "Atmel USART"
  228. depends on ATMEL_USART
  229. help
  230. Select this to enable a debug UART using the atmel usart driver. You
  231. will need to provide parameters to make this work. The driver will
  232. be available until the real driver-model serial is running.
  233. config DEBUG_UART_BCM6345
  234. bool "BCM6345 UART"
  235. depends on BCM6345_SERIAL
  236. help
  237. Select this to enable a debug UART on BCM6345 SoCs. You
  238. will need to provide parameters to make this work. The driver will
  239. be available until the real driver model serial is running.
  240. config DEBUG_UART_NS16550
  241. bool "ns16550"
  242. depends on SYS_NS16550
  243. help
  244. Select this to enable a debug UART using the ns16550 driver. You
  245. will need to provide parameters to make this work. The driver will
  246. be available until the real driver model serial is running.
  247. config DEBUG_EFI_CONSOLE
  248. bool "EFI"
  249. depends on EFI_APP
  250. help
  251. Select this to enable a debug console which calls back to EFI to
  252. output to the console. This can be useful for early debugging of
  253. U-Boot when running on top of EFI (Extensive Firmware Interface).
  254. This is a type of BIOS used by PCs.
  255. config DEBUG_SBI_CONSOLE
  256. bool "SBI"
  257. depends on RISCV_SMODE
  258. help
  259. Select this to enable a debug console which calls back to SBI to
  260. output to the console. This can be useful for early debugging of
  261. U-Boot when running on top of SBI (Supervisor Binary Interface).
  262. This implementation of the debug UART is not available while in
  263. M-mode (e.g. during SPL).
  264. config DEBUG_UART_S5P
  265. bool "Samsung S5P"
  266. depends on ARCH_APPLE || ARCH_EXYNOS || ARCH_S5PC1XX
  267. help
  268. Select this to enable a debug UART using the serial_s5p driver. You
  269. will need to provide parameters to make this work. The driver will
  270. be available until the real driver-model serial is running.
  271. config DEBUG_UART_MSM_GENI
  272. bool "Qualcomm snapdragon"
  273. depends on ARCH_SNAPDRAGON
  274. help
  275. Select this to enable a debug UART using the serial_msm driver. You
  276. will need to provide parameters to make this work. The driver will
  277. be available until the real driver-model serial is running.
  278. config DEBUG_UART_MESON
  279. bool "Amlogic Meson"
  280. depends on MESON_SERIAL
  281. help
  282. Select this to enable a debug UART using the serial_meson driver. You
  283. will need to provide parameters to make this work. The driver will
  284. be available until the real driver-model serial is running.
  285. config DEBUG_UART_UARTLITE
  286. bool "Xilinx Uartlite"
  287. depends on XILINX_UARTLITE
  288. help
  289. Select this to enable a debug UART using the serial_uartlite driver.
  290. You will need to provide parameters to make this work. The driver will
  291. be available until the real driver-model serial is running.
  292. config DEBUG_UART_ARM_DCC
  293. bool "ARM DCC"
  294. depends on ARM_DCC
  295. help
  296. Select this to enable a debug UART using the ARM JTAG DCC port.
  297. The DCC port can be used for very early debugging and doesn't require
  298. any additional setting like address/baudrate/clock. On systems without
  299. any serial interface this is the easiest way how to get console.
  300. Every ARM core has own DCC port which is the part of debug interface.
  301. This port is available at least on ARMv6, ARMv7, ARMv8 and XScale
  302. architectures.
  303. config DEBUG_MVEBU_A3700_UART
  304. bool "Marvell Armada 3700"
  305. depends on MVEBU_A3700_UART
  306. help
  307. Select this to enable a debug UART using the serial_mvebu driver. You
  308. will need to provide parameters to make this work. The driver will
  309. be available until the real driver-model serial is running.
  310. config DEBUG_UART_ZYNQ
  311. bool "Xilinx Zynq"
  312. depends on ZYNQ_SERIAL
  313. help
  314. Select this to enable a debug UART using the serial_zynq driver. You
  315. will need to provide parameters to make this work. The driver will
  316. be available until the real driver-model serial is running.
  317. config DEBUG_UART_APBUART
  318. depends on LEON3
  319. bool "Gaisler APBUART"
  320. help
  321. Select this to enable a debug UART using the serial_leon3 driver. You
  322. will need to provide parameters to make this work. The driver will
  323. be available until the real driver model serial is running.
  324. config DEBUG_UART_PL010
  325. bool "pl010"
  326. depends on PL01X_SERIAL
  327. help
  328. Select this to enable a debug UART using the pl01x driver with the
  329. PL010 UART type. You will need to provide parameters to make this
  330. work. The driver will be available until the real driver model
  331. serial is running.
  332. config DEBUG_UART_PL011
  333. bool "pl011"
  334. depends on PL01X_SERIAL || PL011_SERIAL
  335. help
  336. Select this to enable a debug UART using the pl01x driver with the
  337. PL011 UART type. You will need to provide parameters to make this
  338. work. The driver will be available until the real driver model
  339. serial is running.
  340. config DEBUG_UART_PIC32
  341. bool "Microchip PIC32"
  342. depends on PIC32_SERIAL
  343. help
  344. Select this to enable a debug UART using the serial_pic32 driver. You
  345. will need to provide parameters to make this work. The driver will
  346. be available until the real driver model serial is running.
  347. config DEBUG_UART_MXC
  348. bool "IMX Serial port"
  349. depends on MXC_UART
  350. help
  351. Select this to enable a debug UART using the serial_mxc driver. You
  352. will need to provide parameters to make this work. The driver will
  353. be available until the real driver model serial is running.
  354. config DEBUG_UART_SANDBOX
  355. bool "sandbox"
  356. depends on SANDBOX_SERIAL
  357. help
  358. Select this to enable the debug UART using the sandbox driver. This
  359. provides basic serial output from the console without needing to
  360. start up driver model. The driver will be available until the real
  361. driver model serial is running.
  362. config DEBUG_UART_SEMIHOSTING
  363. bool "semihosting"
  364. depends on SEMIHOSTING_SERIAL
  365. help
  366. Select this to enable the debug UART using the semihosting driver.
  367. This provides basic serial output from the console without needing to
  368. start up driver model. The driver will be available until the real
  369. driver model serial is running.
  370. config DEBUG_UART_SCIF
  371. bool "Renesas SCIF UART"
  372. depends on SH || ARCH_RMOBILE
  373. help
  374. Select this to enable a debug UART using the serial_sh driver. You
  375. will need to provide parameters to make this work. The driver will
  376. be available until the real driver-model serial is running.
  377. config DEBUG_UART_SIFIVE
  378. bool "SiFive UART"
  379. depends on SIFIVE_SERIAL
  380. help
  381. Select this to enable a debug UART using the serial_sifive driver. You
  382. will need to provide parameters to make this work. The driver will
  383. be available until the real driver-model serial is running.
  384. config DEBUG_UART_STM32
  385. bool "STMicroelectronics STM32"
  386. depends on STM32_SERIAL
  387. help
  388. Select this to enable a debug UART using the serial_stm32 driver
  389. You will need to provide parameters to make this work.
  390. The driver will be available until the real driver model
  391. serial is running.
  392. config DEBUG_UART_UNIPHIER
  393. bool "UniPhier on-chip UART"
  394. depends on ARCH_UNIPHIER
  395. help
  396. Select this to enable a debug UART using the UniPhier on-chip UART.
  397. You will need to provide DEBUG_UART_BASE to make this work. The
  398. driver will be available until the real driver-model serial is
  399. running.
  400. config DEBUG_UART_OMAP
  401. bool "OMAP uart"
  402. depends on OMAP_SERIAL
  403. help
  404. Select this to enable a debug UART using the omap ns16550 driver.
  405. You will need to provide parameters to make this work. The driver
  406. will be available until the real driver model serial is running.
  407. config DEBUG_UART_MTK
  408. bool "MediaTek High-speed UART"
  409. depends on MTK_SERIAL
  410. help
  411. Select this to enable a debug UART using the MediaTek High-speed
  412. UART driver.
  413. You will need to provide parameters to make this work. The
  414. driver will be available until the real driver model serial is
  415. running.
  416. config DEBUG_UART_MT7620
  417. bool "UART driver for MediaTek MT7620 and earlier SoCs"
  418. depends on MT7620_SERIAL
  419. help
  420. Select this to enable a debug UART using the UART driver for
  421. MediaTek MT7620 and earlier SoCs.
  422. You will need to provide parameters to make this work. The
  423. driver will be available until the real driver model serial is
  424. running.
  425. config DEBUG_UART_DW
  426. bool "DW-apb-uart"
  427. help
  428. Select this to enable a debug UART using the dw-apb-uart driver with the
  429. dw-apb-uart UART type. You will need to provide parameters to make this
  430. work. The driver will be available until the real driver model
  431. serial is running.
  432. endchoice
  433. config DEBUG_UART_BASE
  434. hex "Base address of UART"
  435. depends on DEBUG_UART
  436. default 0 if DEBUG_SBI_CONSOLE
  437. default 0 if DEBUG_UART_SANDBOX
  438. default 0xff000000 if DEBUG_UART_ZYNQ && ARCH_ZYNQMP
  439. default 0xe0000000 if DEBUG_UART_ZYNQ && ARCH_ZYNQ
  440. help
  441. This is the base address of your UART for memory-mapped UARTs.
  442. A default should be provided by your board, but if not you will need
  443. to use the correct value here.
  444. config SPL_DEBUG_UART_BASE
  445. hex "Base address of UART for SPL"
  446. depends on SPL && DEBUG_UART
  447. default DEBUG_UART_BASE
  448. help
  449. This is the base address of your UART for memory-mapped UARTs for SPL.
  450. config TPL_DEBUG_UART_BASE
  451. hex "Base address of UART for TPL"
  452. depends on TPL && DEBUG_UART
  453. default DEBUG_UART_BASE
  454. help
  455. This is the base address of your UART for memory-mapped UARTs for TPL.
  456. config DEBUG_UART_CLOCK
  457. int "UART input clock"
  458. depends on DEBUG_UART
  459. default 0 if DEBUG_SBI_CONSOLE
  460. default 0 if DEBUG_UART_SANDBOX
  461. default 0 if DEBUG_MVEBU_A3700_UART
  462. default 100000000 if DEBUG_UART_ZYNQ && ARCH_ZYNQMP
  463. default 50000000 if DEBUG_UART_ZYNQ && ARCH_ZYNQ
  464. help
  465. The UART input clock determines the speed of the internal UART
  466. circuitry. The baud rate is derived from this by dividing the input
  467. clock down.
  468. A default should be provided by your board, but if not you will need
  469. to use the correct value here.
  470. config DEBUG_UART_SHIFT
  471. int "UART register shift"
  472. depends on DEBUG_UART
  473. default 0 if DEBUG_UART
  474. help
  475. Some UARTs (notably ns16550) support different register layouts
  476. where the registers are spaced either as bytes, words or some other
  477. value. Use this value to specify the shift to use, where 0=byte
  478. registers, 2=32-bit word registers, etc.
  479. config DEBUG_UART_BOARD_INIT
  480. bool "Enable board-specific debug UART init"
  481. depends on DEBUG_UART
  482. help
  483. Some boards need to set things up before the debug UART can be used.
  484. On these boards a call to debug_uart_init() is insufficient. When
  485. this option is enabled, the function board_debug_uart_init() will
  486. be called when debug_uart_init() is called. You can put any code
  487. here that is needed to set up the UART ready for use, such as set
  488. pin multiplexing or enable clocks.
  489. config DEBUG_UART_ANNOUNCE
  490. bool "Show a message when the debug UART starts up"
  491. depends on DEBUG_UART
  492. help
  493. Enable this option to show a message when the debug UART is ready
  494. for use. You will see a message like "<debug_uart> " as soon as
  495. U-Boot has the UART ready for use (i.e. your code calls
  496. debug_uart_init()). This can be useful just as a check that
  497. everything is working.
  498. config DEBUG_UART_SKIP_INIT
  499. bool "Skip UART initialization"
  500. depends on DEBUG_UART
  501. help
  502. Select this if the UART you want to use for debug output is already
  503. initialized by the time U-Boot starts its execution.
  504. config DEBUG_UART_NS16550_CHECK_ENABLED
  505. bool "Check if UART is enabled on output"
  506. depends on DEBUG_UART
  507. depends on DEBUG_UART_NS16550
  508. help
  509. Select this if puts()/putc() might be called before the debug UART
  510. has been initialized. If this is disabled, putc() might sit in a
  511. tight loop if it is called before debug_uart_init() has been called.
  512. Note that this does not work for every ns16550-compatible UART and
  513. so has to be enabled carefully or you might notice lost characters.
  514. config ALTERA_JTAG_UART
  515. bool "Altera JTAG UART support"
  516. depends on DM_SERIAL
  517. help
  518. Select this to enable an JTAG UART for Altera devices.The JTAG UART
  519. core implements a method to communicate serial character streams
  520. between a host PC and a Qsys system on an Altera FPGA. Please find
  521. details on the "Embedded Peripherals IP User Guide" of Altera.
  522. config ALTERA_JTAG_UART_BYPASS
  523. bool "Bypass output when no connection"
  524. depends on ALTERA_JTAG_UART
  525. help
  526. Bypass console output and keep going even if there is no JTAG
  527. terminal connection with the host. The console output will resume
  528. once the JTAG terminal is connected. Without the bypass, the console
  529. output will wait forever until a JTAG terminal is connected. If you
  530. not are sure, say Y.
  531. config ALTERA_UART
  532. bool "Altera UART support"
  533. depends on DM_SERIAL
  534. help
  535. Select this to enable an UART for Altera devices. Please find
  536. details on the "Embedded Peripherals IP User Guide" of Altera.
  537. config AR933X_UART
  538. bool "QCA/Atheros ar933x UART support"
  539. depends on DM_SERIAL && SOC_AR933X
  540. help
  541. Select this to enable UART support for QCA/Atheros ar933x
  542. devices. This driver uses driver model and requires a device
  543. tree binding to operate, please refer to the document at
  544. doc/device-tree-bindings/serial/qca,ar9330-uart.txt.
  545. config ARC_SERIAL
  546. bool "ARC UART support"
  547. depends on DM_SERIAL
  548. help
  549. Select this to enable support for ARC UART now typically
  550. only used in Synopsys DesignWare ARC simulators like nSIM.
  551. config ARM_DCC
  552. bool "ARM Debug Communication Channel (DCC) as UART support"
  553. depends on ARM
  554. help
  555. Select this to enable using the ARM DCC as a form of UART.
  556. config ATMEL_USART
  557. bool "Atmel USART support"
  558. help
  559. Select this to enable USART support for Atmel SoCs. It can be
  560. configured in the device tree, and input clock frequency can
  561. be got from the clk node.
  562. config SPL_UART_CLOCK
  563. int "SPL fixed UART input clock"
  564. depends on ATMEL_USART && SPL && !SPL_CLK
  565. default 132096000 if ARCH_AT91
  566. help
  567. Provide a fixed clock value as input to the UART controller. This
  568. might be needed on platforms which can't enable CONFIG_SPL_CLK
  569. because of SPL image size restrictions.
  570. config BCM283X_MU_SERIAL
  571. bool "Support for BCM283x Mini-UART"
  572. depends on DM_SERIAL && ARCH_BCM283X
  573. default y
  574. help
  575. Select this to enable Mini-UART support on BCM283X family of SoCs.
  576. config BCM283X_PL011_SERIAL
  577. bool "Support for BCM283x PL011 UART"
  578. depends on PL01X_SERIAL && ARCH_BCM283X
  579. default y
  580. help
  581. Select this to enable an overriding PL011 driver for BCM283X SoCs
  582. that supports automatic disable, so that it only gets used when
  583. the UART is actually muxed.
  584. config BCM6345_SERIAL
  585. bool "Support for BCM6345 UART"
  586. depends on DM_SERIAL
  587. help
  588. Select this to enable UART on BCM6345 SoCs.
  589. config COREBOOT_SERIAL
  590. bool "Coreboot UART support"
  591. depends on DM_SERIAL
  592. default y if SYS_COREBOOT
  593. select SYS_NS16550
  594. help
  595. Select this to enable a ns16550-style UART where the platform data
  596. comes from the coreboot 'sysinfo' tables. This allows U-Boot to have
  597. a serial console on any platform without needing to change the
  598. device tree, etc.
  599. config COREBOOT_SERIAL_FROM_DBG2
  600. bool "Obtain UART from ACPI tables"
  601. depends on COREBOOT_SERIAL
  602. default y if !SPL
  603. help
  604. Select this to try to find a DBG2 record in the ACPI tables, in the
  605. event that coreboot does not provide information about the UART in the
  606. normal sysinfo tables. This provides a useful fallback when serial
  607. is not enabled in coreboot.
  608. config CORTINA_UART
  609. bool "Cortina UART support"
  610. depends on DM_SERIAL
  611. help
  612. Select this to enable UART support for Cortina-Access UART devices
  613. found on CAxxxx SoCs.
  614. config FSL_LINFLEXUART
  615. bool "Freescale Linflex UART support"
  616. depends on DM_SERIAL
  617. help
  618. Select this to enable the Linflex serial module found on some
  619. NXP SoCs like S32V234.
  620. config FSL_LPUART
  621. bool "Freescale LPUART support"
  622. help
  623. Select this to enable a Low Power UART for Freescale VF610 and
  624. QorIQ Layerscape devices.
  625. config LPUART
  626. bool "Use the LPUART as console"
  627. depends on FSL_LPUART
  628. config MVEBU_A3700_UART
  629. bool "UART support for Armada 3700"
  630. help
  631. Choose this option to add support for UART driver on the Marvell
  632. Armada 3700 SoC. The base address is configured via DT.
  633. config MCFUART
  634. bool "Freescale ColdFire UART support"
  635. help
  636. Choose this option to add support for UART driver on the ColdFire
  637. SoC's family. The serial communication channel provides a full-duplex
  638. asynchronous/synchronous receiver and transmitter deriving an
  639. operating frequency from the internal bus clock or an external clock.
  640. config MXC_UART
  641. bool "IMX serial port support"
  642. depends on ARCH_MX31 || MX5 || MX6 || MX7 || IMX8M
  643. help
  644. If you have a machine based on a Motorola IMX CPU you
  645. can enable its onboard serial port by enabling this option.
  646. config NULLDEV_SERIAL
  647. bool "Null serial device"
  648. help
  649. Select this to enable null serial device support. A null serial
  650. device merely acts as a placeholder for a serial device and does
  651. nothing for all it's operation.
  652. config PIC32_SERIAL
  653. bool "Support for Microchip PIC32 on-chip UART"
  654. depends on DM_SERIAL && MACH_PIC32
  655. default y
  656. help
  657. Support for the UART found on Microchip PIC32 SoC's.
  658. config SYS_NS16550_SERIAL
  659. bool "NS16550 UART or compatible legacy driver"
  660. depends on !DM_SERIAL
  661. select SYS_NS16550
  662. config SPL_SYS_NS16550_SERIAL
  663. bool "NS16550 UART or compatible legacy driver in SPL"
  664. depends on SPL && !SPL_DM_SERIAL
  665. default y if SYS_NS16550_SERIAL || ARCH_SUNXI || ARCH_OMAP2PLUS
  666. select SYS_NS16550
  667. config SYS_NS16550
  668. bool "NS16550 UART or compatible"
  669. help
  670. Support NS16550 UART or compatible. This can be enabled in the
  671. device tree with the correct input clock frequency. If the input
  672. clock frequency is not defined in the device tree, the macro
  673. CFG_SYS_NS16550_CLK defined in a legacy board header file will
  674. be used. It can be a constant or a function to get clock, eg,
  675. get_serial_clock().
  676. config NS16550_DYNAMIC
  677. bool "Allow NS16550 to be configured at runtime"
  678. depends on SYS_NS16550
  679. default y if SYS_COREBOOT || SYS_SLIMBOOTLOADER
  680. help
  681. Enable this option to allow device-tree control of the driver.
  682. Normally this driver is controlled by the following options:
  683. It is not a good practice for a driver to be statically configured,
  684. since it prevents the same driver being used for different types of
  685. UARTs in a system. This option avoids this problem at the cost of a
  686. slightly increased code size.
  687. config SYS_NS16550_MEM32
  688. bool "If memory-mapped, 32bit access is needed for ns16550 register access"
  689. depends on SYS_NS16550
  690. help
  691. If enabled, if memory-mapped, indicates that 32-bit access should be
  692. used (instead of 8-bit) for register access.
  693. config SYS_NS16550_PORT_MAPPED
  694. bool "Port I/O is used for ns16550 register access"
  695. depends on SYS_NS16550
  696. help
  697. If enabled, port I/O is used for ns16550 register access. If not
  698. enabled, then the UART is memory-mapped.
  699. config SYS_NS16550_REG_SIZE
  700. int "ns16550 register width and endianness"
  701. depends on SYS_NS16550_SERIAL || SPL_SYS_NS16550_SERIAL
  702. range -4 4
  703. default -4 if ARCH_OMAP2PLUS || ARCH_SUNXI
  704. default 1
  705. help
  706. Indicates register width and also endianness. If positive, big-endian
  707. access is used. If negative, little-endian is used.
  708. config SPL_NS16550_MIN_FUNCTIONS
  709. bool "Only provide NS16550_init and NS16550_putc in SPL"
  710. depends on SPL_SYS_NS16550_SERIAL && PPC
  711. help
  712. Enable this if you desire to only have use of the NS16550_init and
  713. NS16550_putc functions for the serial driver located at
  714. drivers/serial/ns16550.c. This option is useful for saving space for
  715. already greatly restricted images, including but not limited to
  716. NAND_SPL configurations.
  717. config INTEL_MID_SERIAL
  718. bool "Intel MID platform UART support"
  719. depends on DM_SERIAL && OF_CONTROL
  720. depends on INTEL_MID
  721. select SYS_NS16550
  722. help
  723. Select this to enable a UART for Intel MID platforms.
  724. This uses the ns16550 driver as a library.
  725. config PL011_SERIAL
  726. bool "ARM PL011 driver"
  727. depends on !DM_SERIAL
  728. help
  729. Select this to enable a UART for platforms using PL011.
  730. config PL01X_SERIAL
  731. bool "ARM PL010 and PL011 driver"
  732. depends on DM_SERIAL
  733. help
  734. Select this to enable a UART for platforms using PL010 or PL011.
  735. config DW_SERIAL
  736. bool "ARM DW-apb-uart driver"
  737. depends on !DM_SERIAL
  738. help
  739. Select this to enable a UART for platforms using DW-apb-uart.
  740. config ROCKCHIP_SERIAL
  741. bool "Rockchip on-chip UART support"
  742. depends on DM_SERIAL
  743. select SYS_NS16550
  744. help
  745. Select this to enable a debug UART for Rockchip devices when using
  746. OF_PLATDATA (i.e. a compiled-in device tree replacemenmt).
  747. This uses the ns16550 driver, converting the platdata from of-platdata
  748. to the ns16550 format.
  749. config S5P_SERIAL
  750. bool "Support for Samsung S5P UART"
  751. depends on ARCH_APPLE || ARCH_EXYNOS || ARCH_S5PC1XX
  752. default y
  753. help
  754. Select this to enable Samsung S5P UART support.
  755. config S5P4418_PL011_SERIAL
  756. bool "Extended PL011 driver for S5P4418"
  757. depends on DM_SERIAL && PL01X_SERIAL && ARCH_NEXELL
  758. default y
  759. help
  760. Select this to enable support of the PL011 UARTs in the S5P4418 SOC.
  761. With this driver the UART-clocks are set to the appropriate rate
  762. (if not 'skip-init').
  763. config SANDBOX_SERIAL
  764. bool "Sandbox UART support"
  765. depends on SANDBOX
  766. imply SERIAL_PUTS
  767. help
  768. Select this to enable a seral UART for sandbox. This is required to
  769. operate correctly, otherwise you will see no serial output from
  770. sandbox. The emulated UART will display to the console and console
  771. input will be fed into the UART. This allows you to interact with
  772. U-Boot.
  773. The operation of the console is controlled by the -t command-line
  774. flag. In raw mode, U-Boot sees all characters from the terminal
  775. before they are processed, including Ctrl-C. In cooked mode, Ctrl-C
  776. is processed by the terminal, and terminates U-Boot. Valid options
  777. are:
  778. -t raw-with-sigs Raw mode, Ctrl-C will terminate U-Boot
  779. -t raw Raw mode, Ctrl-C is processed by U-Boot
  780. -t cooked Cooked mode, Ctrl-C terminates
  781. config SCIF_CONSOLE
  782. bool "Renesas SCIF UART support"
  783. depends on SH || ARCH_RMOBILE
  784. help
  785. Select this to enable Renesas SCIF UART. To operate serial ports
  786. on systems with RCar or SH SoCs, say Y to this option. If unsure,
  787. say N.
  788. choice
  789. prompt "SCIF console port"
  790. depends on SCIF_CONSOLE && (!DM_SERIAL || (SPL && !SPL_DM_SERIAL))
  791. config CONS_SCIF0
  792. bool "SCIF0"
  793. config CONS_SCIF1
  794. bool "SCIF1"
  795. config CONS_SCIF2
  796. bool "SCIF2"
  797. config CONS_SCIF4
  798. bool "SCIF4"
  799. config CONS_SCIFA0
  800. bool "SCIFA0"
  801. endchoice
  802. config SH_SCIF_CLK_FREQ
  803. int "SCIF console clock frequency"
  804. depends on SCIF_CONSOLE && (!DM_SERIAL || (SPL && !SPL_DM_SERIAL))
  805. default 65000000
  806. config SEMIHOSTING_SERIAL
  807. bool "Semihosting UART support"
  808. depends on SEMIHOSTING && !SERIAL_RX_BUFFER
  809. imply SERIAL_PUTS
  810. help
  811. Select this to enable a serial UART using semihosting. Special halt
  812. instructions will be issued which an external debugger (such as a
  813. JTAG emulator) may interpret. The debugger will display U-Boot's
  814. console output on the host system.
  815. Enable this option only if you are using a debugger which supports
  816. semihosting. If you are not using a debugger, this driver will halt
  817. the boot.
  818. config UNIPHIER_SERIAL
  819. bool "Support for UniPhier on-chip UART"
  820. depends on ARCH_UNIPHIER
  821. default y
  822. help
  823. If you have a UniPhier based board and want to use the on-chip
  824. serial ports, say Y to this option. If unsure, say N.
  825. config XILINX_UARTLITE
  826. bool "Xilinx Uarlite support"
  827. depends on DM_SERIAL
  828. help
  829. If you have a Xilinx based board and want to use the uartlite
  830. serial ports, say Y to this option. If unsure, say N.
  831. config MESON_SERIAL
  832. bool "Support for Amlogic Meson UART"
  833. depends on DM_SERIAL && ARCH_MESON
  834. help
  835. If you have an Amlogic Meson based board and want to use the on-chip
  836. serial ports, say Y to this option. If unsure, say N.
  837. config MSM_SERIAL
  838. bool "Qualcomm on-chip UART"
  839. depends on DM_SERIAL
  840. help
  841. Support Data Mover UART used on Qualcomm Snapdragon SoCs.
  842. It should support all Qualcomm devices with UARTDM version 1.4,
  843. for example APQ8016 and MSM8916.
  844. Single baudrate is supported in current implementation (115200).
  845. config MSM_GENI_SERIAL
  846. bool "Qualcomm on-chip GENI UART"
  847. select MISC
  848. imply QCOM_GENI_SE
  849. help
  850. Support UART based on Generic Interface (GENI) Serial Engine (SE),
  851. used on Qualcomm Snapdragon SoCs. Should support all qualcomm SOCs
  852. with Qualcomm Universal Peripheral (QUP) Wrapper cores,
  853. i.e. newer ones, starting from SDM845.
  854. Driver works in FIFO mode.
  855. Multiple baudrates supported.
  856. config MXS_AUART_SERIAL
  857. bool "MXS AUART"
  858. depends on DM_SERIAL
  859. help
  860. Support for Freescale i.MX23 / i.MX28 AUART or Application UART IP.
  861. This IP is present in the aforementioned SoCs, however this is not
  862. the IP used to drive the Debug UART port, for that see PL01X_SERIAL .
  863. config OCTEON_SERIAL_BOOTCMD
  864. bool "MIPS Octeon PCI remote bootcmd input"
  865. depends on ARCH_OCTEON
  866. depends on DM_SERIAL
  867. select SYS_IS_IN_ENV
  868. select CONSOLE_MUX
  869. help
  870. This driver supports remote input over the PCIe bus from a host
  871. to U-Boot for entering commands. It is utilized by the host
  872. commands 'oct-remote-load' and 'oct-remote-bootcmd'.
  873. config OCTEON_SERIAL_PCIE_CONSOLE
  874. bool "MIPS Octeon PCIe remote console"
  875. depends on ARCH_OCTEON
  876. depends on (DM_SERIAL && DM_STDIO)
  877. select SYS_STDIO_DEREGISTER
  878. select SYS_CONSOLE_IS_IN_ENV
  879. select CONSOLE_MUX
  880. help
  881. This driver supports remote console over the PCIe bus when the
  882. Octeon is running in PCIe target mode. The host program
  883. 'oct-remote-console' can be used to connect to this console.
  884. The console number will likely be 0 or 1.
  885. config OMAP_SERIAL
  886. bool "Support for OMAP specific UART"
  887. depends on DM_SERIAL
  888. default y if (ARCH_OMAP2PLUS || ARCH_K3)
  889. select SYS_NS16550
  890. help
  891. If you have an TI based SoC and want to use the on-chip serial
  892. port, say Y to this option. If unsure say N.
  893. config OWL_SERIAL
  894. bool "Actions Semi OWL UART"
  895. depends on DM_SERIAL && ARCH_OWL
  896. help
  897. If you have a Actions Semi OWL based board and want to use the on-chip
  898. serial port, say Y to this option. If unsure, say N.
  899. Single baudrate is supported in current implementation (115200).
  900. config HTIF_CONSOLE
  901. bool "RISC-V HTIF console support"
  902. depends on DM_SERIAL && 64BIT
  903. help
  904. Select this to enable host transfer interface (HTIF) based serial
  905. console. The HTIF device is quite common in RISC-V emulators and
  906. RISC-V ISS so this driver allows using U-Boot on such platforms.
  907. config SIFIVE_SERIAL
  908. bool "SiFive UART support"
  909. depends on DM_SERIAL
  910. help
  911. This driver supports the SiFive UART. If unsure say N.
  912. config STI_ASC_SERIAL
  913. bool "STMicroelectronics on-chip UART"
  914. depends on DM_SERIAL && ARCH_STI
  915. help
  916. Select this to enable Asynchronous Serial Controller available
  917. on STiH410 SoC. This is a basic implementation, it supports
  918. following baudrate 9600, 19200, 38400, 57600 and 115200.
  919. config STM32_SERIAL
  920. bool "STMicroelectronics STM32 SoCs on-chip UART"
  921. depends on DM_SERIAL && (STM32F4 || STM32F7 || STM32H7 || ARCH_STM32MP)
  922. help
  923. If you have a machine based on a STM32 F4, F7, H7 or MP1 SOC
  924. you can enable its onboard serial ports, say Y to this option.
  925. If unsure, say N.
  926. config ZYNQ_SERIAL
  927. bool "Cadence (Xilinx Zynq) UART support"
  928. depends on DM_SERIAL
  929. help
  930. This driver supports the Cadence UART. It is found e.g. in Xilinx
  931. Zynq/ZynqMP.
  932. config MTK_SERIAL
  933. bool "MediaTek High-speed UART support"
  934. depends on DM_SERIAL
  935. help
  936. Select this to enable UART support for MediaTek High-speed UART
  937. devices. This driver uses driver model and requires a device
  938. tree binding to operate.
  939. The High-speed UART is compatible with the ns16550a UART and have
  940. its own high-speed registers.
  941. config MT7620_SERIAL
  942. bool "UART driver for MediaTek MT7620 and earlier SoCs"
  943. depends on DM_SERIAL
  944. help
  945. Select this to enable UART support for MediaTek MT7620 and earlier
  946. SoCs. This driver uses driver model and requires a device tree
  947. binding to operate.
  948. The UART driver for MediaTek MT7620 and earlier SoCs is *NOT*
  949. compatible with the ns16550a UART.
  950. config MPC8XX_CONS
  951. bool "Console driver for MPC8XX"
  952. depends on MPC8xx
  953. default y
  954. config NPCM_SERIAL
  955. bool "Nuvoton NPCM UART driver"
  956. depends on DM_SERIAL
  957. help
  958. Select this to enable UART support for Nuvoton BMCs
  959. (NPCM7xx and NPCM8xx).
  960. The driver enables the onboard serial port with 8-N-1
  961. configuration.
  962. config XEN_SERIAL
  963. bool "XEN serial support"
  964. depends on XEN
  965. help
  966. If built without DM support, then requires Xen
  967. to be built with CONFIG_VERBOSE_DEBUG.
  968. choice
  969. prompt "Console port"
  970. default 8xx_CONS_SMC1
  971. depends on MPC8XX_CONS
  972. help
  973. Depending on board, select one serial port
  974. (CONFIG_8xx_CONS_SMC1 or CONFIG_8xx_CONS_SMC2)
  975. config 8xx_CONS_SMC1
  976. bool "SMC1"
  977. config 8xx_CONS_SMC2
  978. bool "SMC2"
  979. endchoice
  980. config SYS_SMC_RXBUFLEN
  981. int "Console Rx buffer length"
  982. depends on MPC8XX_CONS
  983. default 1
  984. help
  985. With CONFIG_SYS_SMC_RXBUFLEN it is possible to define
  986. the maximum receive buffer length for the SMC.
  987. This option is actual only for 8xx possible.
  988. If using CONFIG_SYS_SMC_RXBUFLEN also CONFIG_SYS_MAXIDLE
  989. must be defined, to setup the maximum idle timeout for
  990. the SMC.
  991. config SYS_MAXIDLE
  992. int "maximum idle timeout"
  993. depends on MPC8XX_CONS
  994. default 0
  995. config SYS_BRGCLK_PRESCALE
  996. int "BRG Clock Prescale"
  997. depends on MPC8XX_CONS
  998. default 1
  999. config SYS_SDSR
  1000. hex "SDSR Value"
  1001. depends on MPC8XX_CONS
  1002. default 0x83
  1003. config SYS_SDMR
  1004. hex "SDMR Value"
  1005. depends on MPC8XX_CONS
  1006. default 0
  1007. endif