serial: add uart driver for MediaTek MT7620 SoC

This patch adds uart support for MediaTek MT7620 and earlier SoCs.

The UART used by MT7620 is incompatible with the ns16550a driver.
All registers of this UART have different addresses. A special 16-bit
register for Divisor Latch is used to set the baudrate instead of the
original two 8-bit registers (DLL and DLM).

The driver supports of-platdata which is useful for tiny SPL.

Reviewed-by: Stefan Roese <sr@denx.de>
Reviewed-by: Simon Glass <sjg@chromium.org>
Signed-off-by: Weijie Gao <weijie.gao@mediatek.com>
This commit is contained in:
Weijie Gao
2020-11-12 16:36:05 +08:00
committed by Daniel Schwierzeck
parent 803c8ad204
commit 2161f1fcb3
3 changed files with 267 additions and 0 deletions

View File

@@ -417,6 +417,16 @@ config DEBUG_UART_MTK
driver will be available until the real driver model serial is
running.
config DEBUG_UART_MT7620
bool "UART driver for MediaTek MT7620 and earlier SoCs"
depends on MT7620_SERIAL
help
Select this to enable a debug UART using the UART driver for
MediaTek MT7620 and earlier SoCs.
You will need to provide parameters to make this work. The
driver will be available until the real driver model serial is
running.
endchoice
config DEBUG_UART_BASE
@@ -833,6 +843,16 @@ config MTK_SERIAL
The High-speed UART is compatible with the ns16550a UART and have
its own high-speed registers.
config MT7620_SERIAL
bool "UART driver for MediaTek MT7620 and earlier SoCs"
depends on DM_SERIAL
help
Select this to enable UART support for MediaTek MT7620 and earlier
SoCs. This driver uses driver model and requires a device tree
binding to operate.
The UART driver for MediaTek MT7620 and earlier SoCs is *NOT*
compatible with the ns16550a UART.
config MPC8XX_CONS
bool "Console driver for MPC8XX"
depends on MPC8xx