serial: Add driver for LPC32xx High Speed UARTs
PATCH v2 1/1 serial: Add driver for LPC32xx High Speed UARTs
This patch adds a driver for the 3 High Speed UARTs of the LPC32xx SoC that support up to 921600bps. These UARTs are different from the 4 "Standard" UARTs of the LPC32xx.
Signed-off-by Roland Stigge <[email protected]>
---
Applies to v3.5-rc1
Changes since v1:
* Remove reference to MAJOR/MINOR numbers, dynamically allocate now
* Removed tty_schedule_flip() for framing error case
* Added tty_flip_buffer_push() for rx
* Use tty_port_tty_get() and tty_kref_put() in case tty is NULL
* Updated commit description
* Fixed locking in interrupt handler
* Write baudrate change (set_termios) back to termios
Thanks to Alan Cox for reviewing!
Documentation/devicetree/bindings/tty/serial/nxp-lpc32xx-hsuart.txt | 14 drivers/tty/serial/Kconfig | 19 drivers/tty/serial/Makefile | 1 drivers/tty/serial/lpc32xx_hs.c | 823 ++++++++++ 4 files changed, 857 insertions(+)
Documentation/devicetree/bindings/tty/serial/nxp-lpc32xx-hsuart.txt new file +14 -0
@@ -0,0 +1,14 @@ +* NXP LPC32xx SoC High Speed UART + +Required properties: +- compatible: Should be "nxp,lpc3220-hsuart" +- reg: Should contain registers location and length +- interrupts: Should contain interrupt + +Example: + + uart1: serial at 40014000 { + compatible = "nxp,lpc3220-hsuart"; + reg = <0x40014000 0x1000>; + interrupts = <26 0>; + };
drivers/tty/serial/Kconfig +19 -0
@@ -704,6 +704,25 @@ config SERIAL_PNX8XXX_CONSOLE If you have a MIPS-based Philips SoC such as PNX8550 or PNX8330 and you want to use serial console, say Y. Otherwise, say N. +config SERIAL_HS_LPC32XX + tristate "LPC32XX high speed serial port support" + depends on ARCH_LPC32XX && OF + select SERIAL_CORE + help + Support for the LPC32XX high speed serial ports (up to 900kbps). + Those are UARTs completely different from the Standard UARTs on the + LPC32XX SoC. + Choose M or Y here to build this driver. + +config SERIAL_HS_LPC32XX_CONSOLE + bool "Enable LPC32XX high speed UART serial console" + depends on SERIAL_HS_LPC32XX + select SERIAL_CORE_CONSOLE + help + If you would like to be able to use one of the high speed serial + ports on the LPC32XX as the console, you can do so by answering + Y to this option. + config SERIAL_CORE tristate
drivers/tty/serial/Makefile +1 -0
@@ -34,6 +34,7 @@ obj-$(CONFIG_SERIAL_MUX) += mux.o obj-$(CONFIG_SERIAL_68328) += 68328serial.o obj-$(CONFIG_SERIAL_MCF) += mcf.o obj-$(CONFIG_SERIAL_PMACZILOG) += pmac_zilog.o +obj-$(CONFIG_SERIAL_HS_LPC32XX) += lpc32xx_hs.o obj-$(CONFIG_SERIAL_DZ) += dz.o obj-$(CONFIG_SERIAL_ZS) += zs.o obj-$(CONFIG_SERIAL_SH_SCI) += sh-sci.o
drivers/tty/serial/lpc32xx_hs.c new file +823 -0
823 lines not on this page · raw message