Skip to content

Commit

Permalink
drivers: serial: uart_altera: add driver
Browse files Browse the repository at this point in the history
Add driver for altera avalon uart core.

Signed-off-by: Goh Shun Jing <[email protected]>
  • Loading branch information
gohshunjing authored and carlescufi committed Feb 23, 2023
1 parent f5ae6cc commit 9ecfa4d
Show file tree
Hide file tree
Showing 6 changed files with 1,086 additions and 0 deletions.
1 change: 1 addition & 0 deletions drivers/serial/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@

zephyr_library()
zephyr_library_sources_ifdef(CONFIG_UART_ALTERA_JTAG uart_altera_jtag.c)
zephyr_library_sources_ifdef(CONFIG_UART_ALTERA uart_altera.c)
zephyr_library_sources_ifdef(CONFIG_UART_TELINK_B91 uart_b91.c)
zephyr_library_sources_ifdef(CONFIG_UART_IMX uart_imx.c)
zephyr_library_sources_ifdef(CONFIG_UART_ITE_IT8XXX2 uart_ite_it8xxx2.c)
Expand Down
2 changes: 2 additions & 0 deletions drivers/serial/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -210,4 +210,6 @@ source "drivers/serial/Kconfig.cdns"

source "drivers/serial/Kconfig.opentitan"

source "drivers/serial/Kconfig.altera"

endif # SERIAL
24 changes: 24 additions & 0 deletions drivers/serial/Kconfig.altera
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# Copyright (c) 2023 Intel Corporation
# SPDX-License-Identifier: Apache-2.0

config UART_ALTERA
bool "ALTERA UART driver"
depends on DT_HAS_ALTR_UART_ENABLED
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
help
Enable the Altera UART driver, that can be built into Intel NiosV CPU designs.

config UART_ALTERA_EOP
bool "ALTERA UART end of packet feature"
depends on UART_ALTERA && UART_DRV_CMD && UART_INTERRUPT_DRIVEN
help
Use driver command CMD_ENABLE_EOP and CMD_DISABLE_EOP to use the feature.

config UART_ALTERA_LINE_CTRL_WORKAROUND
bool "ALTERA UART flow control workaround"
depends on UART_ALTERA && UART_LINE_CTRL
help
Before enabling this, please try to optimise the ISR to fetch the receive data faster.
Enabling this will cause the transmitter to wait for rising edge of CTS before sending.
The receiver will deassert RTS as soon as a byte is received and reassert after the byte is fetched.
Loading

0 comments on commit 9ecfa4d

Please sign in to comment.