blob: f683924464ef36c5dd4b60fa26496caac2e1dfd6 [file] [log] [blame]
Ulf Magnussonbd6e0442019-11-01 13:45:29 +01001# SiFive Freedom UART configuration option
2
Nathaniel Graff218d7a02018-08-15 15:41:21 -07003# Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com>
Nathaniel Graff218d7a02018-08-15 15:41:21 -07004# SPDX-License-Identifier: Apache-2.0
Nathaniel Graff218d7a02018-08-15 15:41:21 -07005
6menuconfig UART_SIFIVE
7 bool "SiFive Freedom serial driver"
Kumar Gala7d5215f2022-07-20 13:46:30 -05008 default y
9 depends on DT_HAS_SIFIVE_UART0_ENABLED
Nathaniel Graff218d7a02018-08-15 15:41:21 -070010 select SERIAL_HAS_DRIVER
11 select SERIAL_SUPPORT_INTERRUPT
Filip Kokosinski0abc9fb2024-09-18 11:11:49 +020012 select PINCTRL if SOC_SERIES_SIFIVE_FREEDOM_FE300
Nathaniel Graff218d7a02018-08-15 15:41:21 -070013 help
14 This option enables the SiFive Freedom serial driver.
15
16# ---------- Port 0 ----------
17
18menuconfig UART_SIFIVE_PORT_0
Gerard Marull-Paretas95fb0de2022-03-09 12:05:12 +010019 bool "SIFIVE Port 0"
Nathaniel Graff218d7a02018-08-15 15:41:21 -070020 depends on UART_SIFIVE
21 help
22 This tells the driver to configure the UART port at boot, depending on
23 the additional configure options below.
24
Nathaniel Graff218d7a02018-08-15 15:41:21 -070025config UART_SIFIVE_PORT_0_RXCNT_IRQ
26 int "Port 0 RX Interrupt Threshold Count"
27 default 0
28 depends on UART_SIFIVE_PORT_0
29 help
30 Port 0 RX Threshold at which the RX FIFO interrupt triggers.
31
32config UART_SIFIVE_PORT_0_TXCNT_IRQ
33 int "Port 0 TX Interrupt Threshold Count"
Peter A. Bigot93309312020-03-23 16:09:21 -050034 default 1
Nathaniel Graff218d7a02018-08-15 15:41:21 -070035 depends on UART_SIFIVE_PORT_0
36 help
37 Port 0 TX Threshold at which the TX FIFO interrupt triggers.
38
39# ---------- Port 1 ----------
40
41menuconfig UART_SIFIVE_PORT_1
Gerard Marull-Paretas95fb0de2022-03-09 12:05:12 +010042 bool "SIFIVE Port 1"
Nathaniel Graff218d7a02018-08-15 15:41:21 -070043 depends on UART_SIFIVE
44 help
45 This tells the driver to configure the UART port at boot, depending on
46 the additional configure options below.
47
Nathaniel Graff218d7a02018-08-15 15:41:21 -070048config UART_SIFIVE_PORT_1_RXCNT_IRQ
49 int "Port 0 RX Interrupt Threshold Count"
50 default 0
51 depends on UART_SIFIVE_PORT_1
52 help
53 Port 1 RX Threshold at which the RX FIFO interrupt triggers.
54
55config UART_SIFIVE_PORT_1_TXCNT_IRQ
56 int "Port 1 TX Interrupt Threshold Count"
Sören Tempelfd089b32021-10-28 01:49:44 +020057 default 1
Nathaniel Graff218d7a02018-08-15 15:41:21 -070058 depends on UART_SIFIVE_PORT_1
59 help
60 Port 1 TX Threshold at which the TX FIFO interrupt triggers.