Skip to content

Commit

Permalink
tty: serial: Add Nuvoton ma35d1 serial driver support
Browse files Browse the repository at this point in the history
This adds UART and console driver for Nuvoton ma35d1 Soc.

MA35D1 SoC provides up to 17 UART controllers, each with one uart port.
The ma35d1 uart controller is not compatible with 8250.
The uart controller supports:
  - Full-duplex asynchronous communications
  - Separates tx and tx 32/32 bytes entry FIFO for data payloads
  - Hardware auto-flow control
  - Programmable rx buffer trigger level (1/4/8/14/30 bytes)
  - Individual programmable baud rate generator for each channel
  - Supports nCTS, incoming data, rx FIFO reached threshold and
    RS-485 Address Match (AAD mode) wake-up function
  - Supports 8-bit rx buffer time-out detection function
  - Programmable tx data delay time
  - Supports Auto-Baud Rate measurement and baud rate compensation
  - Supports break error, frame error, parity error and rx/tx buffer
    overflow detection function
  – Programmable number of data bit, 5-, 6-, 7-, 8- bit character
  – Programmable parity bit, even, odd, no parity or stick parity bit
    generation and detection
  – Programmable stop bit, 1, 1.5, or 2 stop bit generation
  - Supports IrDA SIR function mode
  - Supports RS-485 function mode
  – Supports RS-485 9-bit mode
  – Supports hardware or software enables to program nRTS pin to control
    RS-485 transmission direction
  - Supports PDMA transfer function
  - Support Single-wire function mode.

Signed-off-by: Jacky Huang <ychuang3@nuvoton.com>
  • Loading branch information
ychuang3 authored and intel-lab-lkp committed Mar 15, 2023
1 parent 2c95b7d commit 064028d
Show file tree
Hide file tree
Showing 5 changed files with 957 additions and 0 deletions.
18 changes: 18 additions & 0 deletions drivers/tty/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -1562,6 +1562,24 @@ config SERIAL_SUNPLUS_CONSOLE
you can alter that using a kernel command line option such as
"console=ttySUPx".

config SERIAL_NUVOTON_MA35D1
tristate "Nuvoton MA35D1 family UART support"
depends on ARCH_NUVOTON || COMPILE_TEST
select SERIAL_CORE
help
This driver supports Nuvoton MA35D1 family UART ports. If you would
like to use them, you must answer Y or M to this option. Note that
for use as console, it must be included in kernel and not as a
module

config SERIAL_NUVOTON_MA35D1_CONSOLE
bool "Console on a Nuvotn MA35D1 family UART port"
depends on SERIAL_NUVOTON_MA35D1=y
select SERIAL_CORE_CONSOLE
help
Select this options if you'd like to use the UART port0 of the
Nuvoton MA35D1 family as a console.

endmenu

config SERIAL_MCTRL_GPIO
Expand Down
1 change: 1 addition & 0 deletions drivers/tty/serial/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -93,3 +93,4 @@ obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o

obj-$(CONFIG_SERIAL_KGDB_NMI) += kgdb_nmi.o
obj-$(CONFIG_KGDB_SERIAL_CONSOLE) += kgdboc.o
obj-$(CONFIG_SERIAL_NUVOTON_MA35D1) += ma35d1_serial.o
Loading

0 comments on commit 064028d

Please sign in to comment.