Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

drivers: serial: Add UART support in NPCM series. #111

Merged
merged 1 commit into from
May 29, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
16 changes: 16 additions & 0 deletions boards/nuvoton/npcm400f_evb/npcm400f_evb.dts
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,24 @@
chosen {
zephyr,sram = &sram0;
zephyr,flash = &flash0;
zephyr,shell-uart = &uart0;
zephyr,console = &uart0;
};

aliases {
};
};

&uart0 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&cr_uart1_sin_gp14 &cr_uart1_sout_gp15>;
pinctrl-names = "default";
};

&uart1 {
status = "okay";
current-speed = <115200>;
pinctrl-0 = <&cr_uart2_sin_gp30 &cr_uart2_sout_gp31>;
pinctrl-names = "default";
};
9 changes: 5 additions & 4 deletions boards/nuvoton/npcm400f_evb/npcm400f_evb_defconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,12 +22,13 @@ CONFIG_PINCTRL=y
CONFIG_PINCTRL_NPCM=y

# UART Driver
CONFIG_SERIAL=n

CONFIG_SERIAL=y
CONFIG_UART_INTERRUPT_DRIVEN=y
CONFIG_UART_NPCM=y

# Console Driver
CONFIG_CONSOLE=n
CONFIG_UART_CONSOLE=n
CONFIG_CONSOLE=y
CONFIG_UART_CONSOLE=y

# GPIO Driver
CONFIG_GPIO=y
Expand Down
1 change: 1 addition & 0 deletions drivers/serial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ zephyr_library_sources_ifdef(CONFIG_UART_RTT_DRIVER uart_rtt.c)
zephyr_library_sources_ifdef(CONFIG_UART_XLNX_PS uart_xlnx_ps.c)
zephyr_library_sources_ifdef(CONFIG_UART_XLNX_UARTLITE uart_xlnx_uartlite.c)
zephyr_library_sources_ifdef(CONFIG_UART_XMC4XXX uart_xmc4xxx.c)
zephyr_library_sources_ifdef(CONFIG_UART_NPCM uart_npcm.c)
zephyr_library_sources_ifdef(CONFIG_UART_NPCX uart_npcx.c)
zephyr_library_sources_ifdef(CONFIG_UART_APBUART uart_apbuart.c)
zephyr_library_sources_ifdef(CONFIG_USB_CDC_ACM ${ZEPHYR_BASE}/misc/empty_file.c)
Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -226,6 +226,8 @@ source "drivers/serial/Kconfig.xmc4xxx"

source "drivers/serial/Kconfig.lpc11u6x"

source "drivers/serial/Kconfig.npcm"

source "drivers/serial/Kconfig.npcx"

source "drivers/serial/Kconfig.apbuart"
Expand Down
13 changes: 13 additions & 0 deletions drivers/serial/Kconfig.npcm
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
# Copyright (c) 2024 Nuvoton Technology Corporation.
#
# SPDX-License-Identifier: Apache-2.0

config UART_NPCM
bool "NUVOTON NPCM serial driver"
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
depends on SOC_FAMILY_NPCM
help
This option enables the UART driver for Nuvoton NPCM
family of processors.
Say y to use serial port on Nuvoton MCU.
Loading
Loading