Skip to content

Commit 3053079

Browse files
Wilson Dinggregkh
authored andcommitted
serial: mvebu-uart: initial support for Armada-3700 serial port
Armada-3700's uart is a simple serial port, which doesn't support. Configuring the modem control lines. The uart port has a 32 bytes Tx FIFO and a 64 bytes Rx FIFO The uart driver implements the uart core operations. It also support the system (early) console based on Armada-3700's serial port. Known Issue: The uart driver currently doesn't support clock programming, which means the baud-rate stays with the default value configured by the bootloader at boot time [gregory.clement@free-electrons.com: Rewrite many part which are too long to enumerate] Signed-off-by: Wilson Ding <dingwei@marvell.com> Signed-off-by: Nadav Haklai <nadavh@marvell.com> Signed-off-by: Gregory CLEMENT <gregory.clement@free-electrons.com> Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
1 parent 82a3f87 commit 3053079

File tree

6 files changed

+695
-0
lines changed

6 files changed

+695
-0
lines changed
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
* Marvell UART : Non standard UART used in some of Marvell EBU SoCs (e.g., Armada-3700)
2+
3+
Required properties:
4+
- compatible: "marvell,armada-3700-uart"
5+
- reg: offset and length of the register set for the device.
6+
- interrupts: device interrupt
7+
8+
Example:
9+
serial@12000 {
10+
compatible = "marvell,armada-3700-uart";
11+
reg = <0x12000 0x400>;
12+
interrupts = <43>;
13+
};

Documentation/kernel-parameters.txt

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1058,6 +1058,12 @@ bytes respectively. Such letter suffixes can also be entirely omitted.
10581058
A valid base address must be provided, and the serial
10591059
port must already be setup and configured.
10601060

1061+
armada3700_uart,<addr>
1062+
Start an early, polled-mode console on the
1063+
Armada 3700 serial port at the specified
1064+
address. The serial port must already be setup
1065+
and configured. Options are not yet supported.
1066+
10611067
earlyprintk= [X86,SH,BLACKFIN,ARM,M68k]
10621068
earlyprintk=vga
10631069
earlyprintk=efi

drivers/tty/serial/Kconfig

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1602,6 +1602,28 @@ config SERIAL_STM32_CONSOLE
16021602
depends on SERIAL_STM32=y
16031603
select SERIAL_CORE_CONSOLE
16041604

1605+
config SERIAL_MVEBU_UART
1606+
bool "Marvell EBU serial port support"
1607+
select SERIAL_CORE
1608+
help
1609+
This driver is for Marvell EBU SoC's UART. If you have a machine
1610+
based on the Armada-3700 SoC and wish to use the on-board serial
1611+
port,
1612+
say 'Y' here.
1613+
Otherwise, say 'N'.
1614+
1615+
config SERIAL_MVEBU_CONSOLE
1616+
bool "Console on Marvell EBU serial port"
1617+
depends on SERIAL_MVEBU_UART
1618+
select SERIAL_CORE_CONSOLE
1619+
select SERIAL_EARLYCON
1620+
default y
1621+
help
1622+
Say 'Y' here if you wish to use Armada-3700 UART as the system console.
1623+
(the system console is the device which receives all kernel messages
1624+
and warnings and which allows logins in single user mode)
1625+
Otherwise, say 'N'.
1626+
16051627
endmenu
16061628

16071629
config SERIAL_MCTRL_GPIO

drivers/tty/serial/Makefile

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,7 @@ obj-$(CONFIG_SERIAL_CONEXANT_DIGICOLOR) += digicolor-usart.o
9090
obj-$(CONFIG_SERIAL_MEN_Z135) += men_z135_uart.o
9191
obj-$(CONFIG_SERIAL_SPRD) += sprd_serial.o
9292
obj-$(CONFIG_SERIAL_STM32) += stm32-usart.o
93+
obj-$(CONFIG_SERIAL_MVEBU_UART) += mvebu-uart.o
9394

9495
# GPIOLIB helpers for modem control lines
9596
obj-$(CONFIG_SERIAL_MCTRL_GPIO) += serial_mctrl_gpio.o

0 commit comments

Comments
 (0)