zephyr/drivers/serial/Kconfig.sifive
Sören Tempel fd089b361d uart: sifive: align txcnt of UART1 with UART0
The UART1 is not actually accessible on the HiFive1 since the
QFN48 package for the FE310, used by this board, does not expose the
required pads. However, it is still possible to use the UART1 on HiFive1
emulators (e.g. using UART0 for debugging and UART1 for SLIP).

Unfortunately, the UART0 and UART1 currently have different default
configurations when it comes to the configured transmission watermark
(txcnt). With a txcnt of zero (the default for UART1) the UART is not
actually usable (see #18118). Contrary to UART0 (see #23699), the UART1
does therefore not work by default on Zephyr which took me some time to
figure out.

This commit aligns the default UART1 configuration with the UART0,
thereby making it work by default.

Signed-off-by: Sören Tempel <tempel@uni-bremen.de>
2021-12-02 11:42:46 -06:00

59 lines
1.6 KiB
Plaintext

# SiFive Freedom UART configuration option
# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
# SPDX-License-Identifier: Apache-2.0
menuconfig UART_SIFIVE
bool "SiFive Freedom serial driver"
depends on SOC_SERIES_RISCV_SIFIVE_FREEDOM
select SERIAL_HAS_DRIVER
select SERIAL_SUPPORT_INTERRUPT
help
This option enables the SiFive Freedom serial driver.
# ---------- Port 0 ----------
menuconfig UART_SIFIVE_PORT_0
bool "Enable SIFIVE Port 0"
depends on UART_SIFIVE
help
This tells the driver to configure the UART port at boot, depending on
the additional configure options below.
config UART_SIFIVE_PORT_0_RXCNT_IRQ
int "Port 0 RX Interrupt Threshold Count"
default 0
depends on UART_SIFIVE_PORT_0
help
Port 0 RX Threshold at which the RX FIFO interrupt triggers.
config UART_SIFIVE_PORT_0_TXCNT_IRQ
int "Port 0 TX Interrupt Threshold Count"
default 1
depends on UART_SIFIVE_PORT_0
help
Port 0 TX Threshold at which the TX FIFO interrupt triggers.
# ---------- Port 1 ----------
menuconfig UART_SIFIVE_PORT_1
bool "Enable SIFIVE Port 1"
depends on UART_SIFIVE
help
This tells the driver to configure the UART port at boot, depending on
the additional configure options below.
config UART_SIFIVE_PORT_1_RXCNT_IRQ
int "Port 0 RX Interrupt Threshold Count"
default 0
depends on UART_SIFIVE_PORT_1
help
Port 1 RX Threshold at which the RX FIFO interrupt triggers.
config UART_SIFIVE_PORT_1_TXCNT_IRQ
int "Port 1 TX Interrupt Threshold Count"
default 1
depends on UART_SIFIVE_PORT_1
help
Port 1 TX Threshold at which the TX FIFO interrupt triggers.