drivers/tty/serial: add LiteUART driver
Subsystems (2)
Mateusz Holenko
maintainerPATCH 3/3 drivers/tty/serial: add LiteUART driver
From: Filip Kokosinski <[email protected]>
This commit adds driver for the FPGA-based LiteUART serial controller from LiteX SoC builder.
The current implementation supports LiteUART configured for 32 bit data width and 8 bit CSR bus width.
It does not support IRQ.
Signed-off-by Filip Kokosinski <[email protected]>
Signed-off-by Mateusz Holenko <[email protected]>
--- MAINTAINERS | 1 + drivers/tty/serial/Kconfig | 30 +++ drivers/tty/serial/Makefile | 1 + drivers/tty/serial/liteuart.c | 382 +++++++++++++++++++++++++++++++ include/uapi/linux/serial_core.h | 3 + 5 files changed, 417 insertions(+) create mode 100644 drivers/tty/serial/liteuart.c
MAINTAINERS +1 -0
@@ -9467,6 +9467,7 @@ M: Karol Gugala <[email protected]> M: Mateusz Holenko <[email protected]> S: Maintained F: Documentation/devicetree/bindings/serial/litex,liteuart.txt +F: drivers/tty/serial/liteuart.c LIVE PATCHING M: Josh Poimboeuf <[email protected]>
drivers/tty/serial/Kconfig +30 -0
@@ -1571,6 +1571,36 @@ config SERIAL_MILBEAUT_USIO_CONSOLE receives all kernel messages and warnings and which allows logins in single user mode). +config SERIAL_LITEUART + tristate "LiteUART serial port support" + depends on HAS_IOMEM + depends on OF + select SERIAL_CORE + help + This driver is for the FPGA-based LiteUART serial controller from LiteX + SoC builder. + + Say 'Y' here if you wish to use the LiteUART serial controller. + Otherwise, say 'N'. + +config SERIAL_LITEUART_NR_PORTS + int "Number of LiteUART ports" + depends on SERIAL_LITEUART + default "1" + help + Set this to the number of serial ports you want the driver + to support. + +config SERIAL_LITEUART_CONSOLE + bool "LiteUART serial port console support" + depends on SERIAL_LITEUART=y + select SERIAL_CORE_CONSOLE + help + Say 'Y' here if you wish to use the FPGA-based LiteUART serial controller + from LiteX SoC builder as the system console (the system console is the + device which receives all kernel messages and warnings and which allows + logins in single user mode). Otherwise, say 'N'. + endmenu config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +1 -0
@@ -89,6 +89,7 @@ obj-$(CONFIG_SERIAL_OWL) += owl-uart.o obj-$(CONFIG_SERIAL_RDA) += rda-uart.o obj-$(CONFIG_SERIAL_MILBEAUT_USIO) += milbeaut_usio.o obj-$(CONFIG_SERIAL_SIFIVE) += sifive.o +obj-$(CONFIG_SERIAL_LITEUART) += liteuart.o # GPIOLIB helpers for modem control lines obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
drivers/tty/serial/liteuart.c new file +382 -0
382 lines not on this page · raw message
include/uapi/linux/serial_core.h +3 -0
@@ -293,4 +293,7 @@/* Freescale Linflex UART */ #define PORT_LINFLEXUART 121 +/* LiteUART */ +#define PORT_LITEUART 122 +#endif /* _UAPILINUX_SERIAL_CORE_H */
Signature · 1 line
2.23.0