zephyr/drivers/serial/Kconfig.sifive
Kumar Gala 7d5215ff19 drivers: serial: Update drivers to use devicetree Kconfig symbol
Update serial drivers to use DT_HAS_<compat>_ENABLED Kconfig symbol
to expose the driver and enable it by default based on devicetree.

We remove 'depend on' Kconfig for symbols that would be implied by
the devicetree node existing.

Signed-off-by: Kumar Gala <galak@kernel.org>
2022-07-21 10:29:06 +02:00

60 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"
default y
depends on DT_HAS_SIFIVE_UART0_ENABLED
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 "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 "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.