Commit 9e8d5470 authored by Hammer Hsieh's avatar Hammer Hsieh Committed by Greg Kroah-Hartman

serial: sunplus-uart: Add Sunplus SoC UART Driver

Add Sunplus SoC UART Driver.
SP7021 UART block contains 5 UARTs.
There are UART0~4 that supported in SP7021, the features list as below.
Support Full-duplex communication.
Support data packet length configurable.
Support stop bit number configurable.
Support force break condition.
Support baud rate configurable.
Support error detection and report.
Support RXD Noise Rejection Vote configurable.

UART0 pinout only support TX/RX two pins.
UART1 to UART4 pinout support TX/RX/CTS/RTS four pins.
Normally UART0 used for kernel console, also can be used for normal uart.
Command line set "console=ttySUP0,115200", SUP means Sunplus Uart Port.
UART driver probe will create path named "/dev/ttySUPx".

https://sunplus.atlassian.net/wiki/spaces/doc/pages/1873412290/13.+Universal+Asynchronous+Receiver+Transmitter+UARTSigned-off-by: default avatarHammer Hsieh <hammerh0314@gmail.com>
Link: https://lore.kernel.org/r/1645522563-17183-3-git-send-email-hammerh0314@gmail.comSigned-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent b48b9f6d
......@@ -18553,6 +18553,7 @@ SUNPLUS UART DRIVER
M: Hammer Hsieh <hammerh0314@gmail.com>
S: Maintained
F: Documentation/devicetree/bindings/serial/sunplus,sp7021-uart.yaml
F: drivers/tty/serial/sunplus-uart.c
SUPERH
M: Yoshinori Sato <ysato@users.sourceforge.jp>
......
......@@ -1564,6 +1564,31 @@ config SERIAL_LITEUART_CONSOLE
and warnings and which allows logins in single user mode).
Otherwise, say 'N'.
config SERIAL_SUNPLUS
tristate "Sunplus UART support"
depends on OF || COMPILE_TEST
select SERIAL_CORE
help
Select this option if you would like to use Sunplus serial port on
Sunplus SoC SP7021.
If you enable this option, Sunplus serial ports in the system will
be registered as ttySUPx.
This driver can also be built as a module. If so, the module will be
called sunplus-uart.
config SERIAL_SUNPLUS_CONSOLE
bool "Console on Sunplus UART"
depends on SERIAL_SUNPLUS
select SERIAL_CORE_CONSOLE
select SERIAL_EARLYCON
help
Select this option if you would like to use a Sunplus UART as the
system console.
Even if you say Y here, the currently visible virtual console
(/dev/tty0) will still be used as the system console by default, but
you can alter that using a kernel command line option such as
"console=ttySUPx".
endmenu
config SERIAL_MCTRL_GPIO
......
......@@ -87,6 +87,7 @@ 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
obj-$(CONFIG_SERIAL_SUNPLUS) += sunplus-uart.o
# GPIOLIB helpers for modem control lines
obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
......
This diff is collapsed.
......@@ -277,4 +277,7 @@
/* Freescale LINFlexD UART */
#define PORT_LINFLEXUART 122
/* Sunplus UART */
#define PORT_SUNPLUS 123
#endif /* _UAPILINUX_SERIAL_CORE_H */
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment