Skip to content

Commit 930cbf9

Browse files
ychuang3gregkh
authored andcommitted
tty: serial: Add Nuvoton ma35d1 serial driver support
This adds UART and console driver for Nuvoton ma35d1 Soc. It supports full-duplex communication, FIFO control, and hardware flow control. Command line set "console=ttyNVT0,115200", NVT means Nuvoton MA35 UART port. The UART driver probe will create path named "/dev/ttyNVTx". Signed-off-by: Jacky Huang <ychuang3@nuvoton.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230619032330.233796-2-ychuang570808@gmail.com Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent e0edfdc commit 930cbf9

3 files changed

Lines changed: 845 additions & 0 deletions

File tree

drivers/tty/serial/Kconfig

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1555,6 +1555,29 @@ config SERIAL_SUNPLUS_CONSOLE
15551555
you can alter that using a kernel command line option such as
15561556
"console=ttySUPx".
15571557

1558+
config SERIAL_NUVOTON_MA35D1
1559+
tristate "Nuvoton MA35D1 family UART support"
1560+
depends on ARCH_MA35 || COMPILE_TEST
1561+
select SERIAL_CORE
1562+
help
1563+
This driver supports Nuvoton MA35D1 family UART ports. If you would
1564+
like to use them, you must answer Y or M to this option. Note that
1565+
for use as console, it must be included in kernel and not as a
1566+
module. If you enable this option, Ma35D1 serial ports in the system
1567+
will be registered as ttyNVTx.
1568+
1569+
config SERIAL_NUVOTON_MA35D1_CONSOLE
1570+
bool "Console on a Nuvotn MA35D1 family UART port"
1571+
depends on SERIAL_NUVOTON_MA35D1=y
1572+
select SERIAL_CORE_CONSOLE
1573+
help
1574+
Select this options if you'd like to use the UART port0 of the
1575+
Nuvoton MA35D1 family as a console.
1576+
Even if you say Y here, the currently visible virtual console
1577+
(/dev/tty0) will still be used as the system console by default,
1578+
but you can alter that using a kernel command line option such as
1579+
"console=ttyNVTx".
1580+
15581581
endmenu
15591582

15601583
config SERIAL_MCTRL_GPIO

drivers/tty/serial/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,3 +94,4 @@ obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o
9494

9595
obj-$(CONFIG_SERIAL_KGDB_NMI) += kgdb_nmi.o
9696
obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o
97+
obj-$(CONFIG_SERIAL_NUVOTON_MA35D1) += ma35d1_serial.o

0 commit comments

Comments
 (0)