Skip to contentSkip to conversation

serial: add NPCM UART driver

PATCH Superseded Tomer Maimon 1 participant 3 messages Dec 21, 2017

Subsystems (3)

v1 of 2 Superseded Latest is v2 →

lore
Share & tools
lore

Tomer Maimon

author maintainer
#0 lore raw

cover serial: add NPCM UART driver

This patch set adds UART support for the Nuvoton NPCM Baseboard Management Controller (BMC).

The NPCM7xx BMC contains four UART blocks and accessory logic.

Tomer Maimon (2):
dt-binding: serial: document NPCM UART DT bindings
serial: npcm: add NPCM UART driver

 .../bindings/serial/nuvoton,npcm-uart.txt          |   24 +
 drivers/tty/serial/Kconfig                         |   15 +
 drivers/tty/serial/Makefile                        |    1 +
 drivers/tty/serial/npcm_uart.c                     | 1592 ++++++++++++++++++++
 4 files changed, 1632 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/nuvoton,npcm-uart.txt
 create mode 100644 drivers/tty/serial/npcm_uart.c
Signature · 1 line
2.14.1
author maintainer
#1 lore raw

PATCH 1/2 dt-binding: serial: document NPCM UART DT bindings

Added device tree binding documentation for Nuvoton NPCM UART.

---
 .../bindings/serial/nuvoton,npcm-uart.txt          | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)
 create mode 100644 Documentation/devicetree/bindings/serial/nuvoton,npcm-uart.txt
Documentation/devicetree/bindings/serial/nuvoton,npcm-uart.txt new file +24 -0
new file mode 100644
index 000000000000..52c44f83d274
@@ -0,0 +1,24 @@
+Nuvoton NPCM Universal Asynchronous Receiver/Transmitter (UART)
+
+Required properties:
+- compatible      : "nuvoton,npcm750-uart" for Poleg NPCM750.
+- reg             : Offset and length of the register set for the device.
+- interrupts      : Contain the UART interrupt with flags for falling edge.
+- clocks          : phandle of UART reference clock.
+
+Note: Each uart controller should have an alias correctly numbered
+in "aliases" node.
+
+Example:
+
+aliases {
+	serial0 = &serial0;
+};
+
+serial0: serial0@f0001000 {
+	compatible = "nuvoton,npcm750-uart";
+	reg = <0xf0001000 0x1000>;
+	clocks = <&clk NPCM7XX_CLK_UART_CORE>;
+	interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
+	status = "disabled";
+};
\ No newline at end of file
Signature · 1 line
2.14.1
author maintainer
#2 lore raw

PATCH 2/2 serial: npcm: add NPCM UART driver

In reply to Tomer Maimon

Add Nuvoton BMC NPCM UART driver.

The NPCM7xx BMC contains four UART blocks and accessory logic.

---
 drivers/tty/serial/Kconfig     |   15 +
 drivers/tty/serial/Makefile    |    1 +
 drivers/tty/serial/npcm_uart.c | 1592 ++++++++++++++++++++++++++++++++++++++++
 3 files changed, 1608 insertions(+)
 create mode 100644 drivers/tty/serial/npcm_uart.c
drivers/tty/serial/Kconfig +15 -0
index 1f096e2bb398..353c8623c07a 100644
@@ -1707,6 +1707,21 @@ config SERIAL_OWL_CONSOLE
 	  Say 'Y' here if you wish to use Actions Semiconductor S500/S900 UART
 	  as the system console. Only earlycon is implemented currently.
 
+config SERIAL_NPCM
+	tristate "Nuvoton NPCM Serial port support"
+	depends on ARCH_NPCM
+	select SERIAL_CORE
+	help
+	  Support for the on-chip UARTs on the Nuvoton NPCM CPU,
+	  providing /dev/ttyS0, 1 and 2 (note, some machines may not
+	  provide all of these ports, depending on how the serial port
+	  pins are configured.
+
+config SERIAL_NPCM_CONSOLE
+	bool "Support for console on NPCM serial port"
+	depends on SERIAL_NPCM=y
+	select SERIAL_CORE_CONSOLE
+
 endmenu
 
 config SERIAL_MCTRL_GPIO
drivers/tty/serial/Makefile +1 -0
index fe88a75d9a59..863c2bb42873 100644
@@ -92,6 +92,7 @@ obj-$(CONFIG_SERIAL_STM32)	+= stm32-usart.o
 obj-$(CONFIG_SERIAL_MVEBU_UART)	+= mvebu-uart.o
 obj-$(CONFIG_SERIAL_PIC32)	+= pic32_uart.o
 obj-$(CONFIG_SERIAL_MPS2_UART)	+= mps2-uart.o
+obj-$(CONFIG_SERIAL_NPCM)	+= npcm_uart.o
 obj-$(CONFIG_SERIAL_OWL)	+= owl-uart.o
 
 # GPIOLIB helpers for modem control lines
drivers/tty/serial/npcm_uart.c new file +1592 -0

1,592 lines not on this page · raw message

Signature · 1 line
2.14.1