Ulf Magnusson | bd6e044 | 2019-11-01 13:45:29 +0100 | [diff] [blame] | 1 | # SiFive Freedom UART configuration option |
| 2 | |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 3 | # Copyright (c) 2017 Jean-Paul Etienne <fractalclone@gmail.com> |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 4 | # SPDX-License-Identifier: Apache-2.0 |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 5 | |
| 6 | menuconfig UART_SIFIVE |
| 7 | bool "SiFive Freedom serial driver" |
Kumar Gala | 7d5215f | 2022-07-20 13:46:30 -0500 | [diff] [blame] | 8 | default y |
| 9 | depends on DT_HAS_SIFIVE_UART0_ENABLED |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 10 | select SERIAL_HAS_DRIVER |
| 11 | select SERIAL_SUPPORT_INTERRUPT |
Filip Kokosinski | 0abc9fb | 2024-09-18 11:11:49 +0200 | [diff] [blame] | 12 | select PINCTRL if SOC_SERIES_SIFIVE_FREEDOM_FE300 |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 13 | help |
| 14 | This option enables the SiFive Freedom serial driver. |
| 15 | |
| 16 | # ---------- Port 0 ---------- |
| 17 | |
| 18 | menuconfig UART_SIFIVE_PORT_0 |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 19 | bool "SIFIVE Port 0" |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 20 | 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 Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 25 | config 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 | |
| 32 | config UART_SIFIVE_PORT_0_TXCNT_IRQ |
| 33 | int "Port 0 TX Interrupt Threshold Count" |
Peter A. Bigot | 9330931 | 2020-03-23 16:09:21 -0500 | [diff] [blame] | 34 | default 1 |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 35 | 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 | |
| 41 | menuconfig UART_SIFIVE_PORT_1 |
Gerard Marull-Paretas | 95fb0de | 2022-03-09 12:05:12 +0100 | [diff] [blame] | 42 | bool "SIFIVE Port 1" |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 43 | 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 Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 48 | config 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 | |
| 55 | config UART_SIFIVE_PORT_1_TXCNT_IRQ |
| 56 | int "Port 1 TX Interrupt Threshold Count" |
Sören Tempel | fd089b3 | 2021-10-28 01:49:44 +0200 | [diff] [blame] | 57 | default 1 |
Nathaniel Graff | 218d7a0 | 2018-08-15 15:41:21 -0700 | [diff] [blame] | 58 | depends on UART_SIFIVE_PORT_1 |
| 59 | help |
| 60 | Port 1 TX Threshold at which the TX FIFO interrupt triggers. |