From 43cad10f73694e81cd73e245ddea273f01098c6d Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Fri, 5 Jun 2020 15:27:03 +0200 Subject: [PATCH] drivers: serial: nrf: Remove flow control configuration from kconfig Removed flow control configuration from Kconfig and updated samples to use device tree for that. Signed-off-by: Krzysztof Chruscinski --- .../nrf52_adafruit_feather_defconfig | 1 - boards/arm/particle_boron/Kconfig.defconfig | 3 --- boards/arm/particle_boron/particle_boron.dts | 1 + .../boards/nrf52840dk_nrf52840.defconfig | 3 --- drivers/serial/Kconfig.nrfx | 24 ------------------- .../hci_uart/boards/96b_nitrogen.conf | 1 - .../hci_uart/boards/96b_nitrogen.overlay | 1 + .../hci_uart/boards/bbc_microbit.conf | 1 - .../hci_uart/boards/nrf51_blenano.conf | 1 - .../hci_uart/boards/nrf51_blenano.overlay | 1 + .../hci_uart/boards/nrf51dk_nrf51422.conf | 1 - .../hci_uart/boards/nrf51dk_nrf51422.overlay | 1 + .../hci_uart/boards/nrf52840dk_nrf52840.conf | 1 - .../boards/nrf52840dk_nrf52840.overlay | 1 + .../hci_uart/boards/nrf52_blenano2.conf | 1 - .../hci_uart/boards/nrf52_blenano2.overlay | 1 + .../hci_uart/boards/nrf52dk_nrf52832.conf | 1 - .../hci_uart/boards/nrf52dk_nrf52832.overlay | 1 + .../boards/nrf5340pdk_nrf5340_cpuapp.overlay | 1 + .../boards/nrf53_dk_nrf5340_cpuapp.conf | 1 - .../hci_uart/boards/nrf9160dk_nrf52840.conf | 3 --- .../boards/nrf9160dk_nrf52840.overlay | 1 + 22 files changed, 9 insertions(+), 42 deletions(-) diff --git a/boards/arm/nrf52_adafruit_feather/nrf52_adafruit_feather_defconfig b/boards/arm/nrf52_adafruit_feather/nrf52_adafruit_feather_defconfig index e6f314f2dcd..440d326ccb5 100644 --- a/boards/arm/nrf52_adafruit_feather/nrf52_adafruit_feather_defconfig +++ b/boards/arm/nrf52_adafruit_feather/nrf52_adafruit_feather_defconfig @@ -12,7 +12,6 @@ CONFIG_GPIO=y # enable uart driver CONFIG_SERIAL=y -CONFIG_UART_0_NRF_FLOW_CONTROL=n # enable console CONFIG_CONSOLE=y diff --git a/boards/arm/particle_boron/Kconfig.defconfig b/boards/arm/particle_boron/Kconfig.defconfig index 7deb4af2899..f8b8a23cbfd 100644 --- a/boards/arm/particle_boron/Kconfig.defconfig +++ b/boards/arm/particle_boron/Kconfig.defconfig @@ -27,9 +27,6 @@ config BT_CTLR if MODEM -config UART_1_NRF_FLOW_CONTROL - default y - config MODEM_UBLOX_SARA default y diff --git a/boards/arm/particle_boron/particle_boron.dts b/boards/arm/particle_boron/particle_boron.dts index 1f3c26cff0d..ceb94b33da7 100644 --- a/boards/arm/particle_boron/particle_boron.dts +++ b/boards/arm/particle_boron/particle_boron.dts @@ -40,6 +40,7 @@ rx-pin = <36>; rts-pin = <39>; cts-pin = <38>; + hw-flow-control; sara_r4 { compatible = "ublox,sara-r4"; diff --git a/boards/shields/wnc_m14a2a/boards/nrf52840dk_nrf52840.defconfig b/boards/shields/wnc_m14a2a/boards/nrf52840dk_nrf52840.defconfig index 94d6f245337..78a93bb755c 100644 --- a/boards/shields/wnc_m14a2a/boards/nrf52840dk_nrf52840.defconfig +++ b/boards/shields/wnc_m14a2a/boards/nrf52840dk_nrf52840.defconfig @@ -6,7 +6,4 @@ if BOARD_NRF52840DK_NRF52840 config GPIO_NRF_P1 default y -config UART_1_NRF_FLOW_CONTROL - default y - endif # BOARD_NRF52840DK_NRF52840 diff --git a/drivers/serial/Kconfig.nrfx b/drivers/serial/Kconfig.nrfx index 6b95e944d2f..dedea989168 100644 --- a/drivers/serial/Kconfig.nrfx +++ b/drivers/serial/Kconfig.nrfx @@ -55,12 +55,6 @@ config UART_0_NRF_PARITY_BIT help Enable parity bit. -config UART_0_NRF_FLOW_CONTROL - bool "Enable flow control" - help - Enable flow control. If selected, additionally two pins, RTS and CTS - have to be configured. - config UART_0_NRF_TX_BUFFER_SIZE int "Size of RAM buffer" depends on UART_0_NRF_UARTE @@ -124,12 +118,6 @@ config UART_1_NRF_PARITY_BIT help Enable parity bit. -config UART_1_NRF_FLOW_CONTROL - bool "Enable flow control" - help - Enable flow control. If selected, additionally two pins, RTS and CTS - have to be configured. - config UART_1_NRF_TX_BUFFER_SIZE int "Size of RAM buffer" depends on UART_INTERRUPT_DRIVEN @@ -192,12 +180,6 @@ config UART_2_NRF_PARITY_BIT help Enable parity bit. -config UART_2_NRF_FLOW_CONTROL - bool "Enable flow control" - help - Enable flow control. If selected, additionally two pins, RTS and CTS - have to be configured. - config UART_2_NRF_TX_BUFFER_SIZE int "Size of RAM buffer" range 1 65535 @@ -259,12 +241,6 @@ config UART_3_NRF_PARITY_BIT help Enable parity bit. -config UART_3_NRF_FLOW_CONTROL - bool "Enable flow control" - help - Enable flow control. If selected, additionally two pins, RTS and CTS - have to be configured. - config UART_3_NRF_TX_BUFFER_SIZE int "Size of RAM buffer" range 1 65535 diff --git a/samples/bluetooth/hci_uart/boards/96b_nitrogen.conf b/samples/bluetooth/hci_uart/boards/96b_nitrogen.conf index 5f610b9dd54..57bf22cca1f 100644 --- a/samples/bluetooth/hci_uart/boards/96b_nitrogen.conf +++ b/samples/bluetooth/hci_uart/boards/96b_nitrogen.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/96b_nitrogen.overlay b/samples/bluetooth/hci_uart/boards/96b_nitrogen.overlay index f3050da1747..26603b9f85a 100644 --- a/samples/bluetooth/hci_uart/boards/96b_nitrogen.overlay +++ b/samples/bluetooth/hci_uart/boards/96b_nitrogen.overlay @@ -3,5 +3,6 @@ &uart0 { compatible = "nordic,nrf-uart"; current-speed = <1000000>; + hw-flow-control; status = "okay"; }; diff --git a/samples/bluetooth/hci_uart/boards/bbc_microbit.conf b/samples/bluetooth/hci_uart/boards/bbc_microbit.conf index bcf787ade63..d607354de08 100644 --- a/samples/bluetooth/hci_uart/boards/bbc_microbit.conf +++ b/samples/bluetooth/hci_uart/boards/bbc_microbit.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=n CONFIG_MAIN_STACK_SIZE=512 CONFIG_IDLE_STACK_SIZE=256 CONFIG_ISR_STACK_SIZE=512 diff --git a/samples/bluetooth/hci_uart/boards/nrf51_blenano.conf b/samples/bluetooth/hci_uart/boards/nrf51_blenano.conf index da4d5a97663..4361fed5801 100644 --- a/samples/bluetooth/hci_uart/boards/nrf51_blenano.conf +++ b/samples/bluetooth/hci_uart/boards/nrf51_blenano.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=512 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf51_blenano.overlay b/samples/bluetooth/hci_uart/boards/nrf51_blenano.overlay index f3050da1747..b3c844493c0 100644 --- a/samples/bluetooth/hci_uart/boards/nrf51_blenano.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf51_blenano.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uart"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.conf b/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.conf index da4d5a97663..4361fed5801 100644 --- a/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.conf +++ b/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=512 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.overlay b/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.overlay index f3050da1747..b3c844493c0 100644 --- a/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf51dk_nrf51422.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uart"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.conf b/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.conf index 5f610b9dd54..57bf22cca1f 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.conf +++ b/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay b/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay index f3050da1747..b3c844493c0 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf52840dk_nrf52840.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uart"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf52_blenano2.conf b/samples/bluetooth/hci_uart/boards/nrf52_blenano2.conf index 5f610b9dd54..57bf22cca1f 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52_blenano2.conf +++ b/samples/bluetooth/hci_uart/boards/nrf52_blenano2.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf52_blenano2.overlay b/samples/bluetooth/hci_uart/boards/nrf52_blenano2.overlay index f3050da1747..b3c844493c0 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52_blenano2.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf52_blenano2.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uart"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.conf b/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.conf index 5f610b9dd54..57bf22cca1f 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.conf +++ b/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.overlay b/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.overlay index f3050da1747..b3c844493c0 100644 --- a/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf52dk_nrf52832.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uart"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf5340pdk_nrf5340_cpuapp.overlay b/samples/bluetooth/hci_uart/boards/nrf5340pdk_nrf5340_cpuapp.overlay index 69855b64d7b..6a4b799cbc3 100644 --- a/samples/bluetooth/hci_uart/boards/nrf5340pdk_nrf5340_cpuapp.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf5340pdk_nrf5340_cpuapp.overlay @@ -4,4 +4,5 @@ compatible = "nordic,nrf-uarte"; current-speed = <1000000>; status = "okay"; + hw-flow-control; }; diff --git a/samples/bluetooth/hci_uart/boards/nrf53_dk_nrf5340_cpuapp.conf b/samples/bluetooth/hci_uart/boards/nrf53_dk_nrf5340_cpuapp.conf index 5f610b9dd54..57bf22cca1f 100644 --- a/samples/bluetooth/hci_uart/boards/nrf53_dk_nrf5340_cpuapp.conf +++ b/samples/bluetooth/hci_uart/boards/nrf53_dk_nrf5340_cpuapp.conf @@ -1,5 +1,4 @@ CONFIG_GPIO=y -CONFIG_UART_0_NRF_FLOW_CONTROL=y CONFIG_MAIN_STACK_SIZE=1024 CONFIG_SYSTEM_WORKQUEUE_STACK_SIZE=512 CONFIG_BT_MAX_CONN=16 diff --git a/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.conf b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.conf index 30aae21663d..b1f02c27e6c 100644 --- a/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.conf +++ b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.conf @@ -20,6 +20,3 @@ CONFIG_BOARD_NRF9160DK_INTERFACE1_MCU=y # Enable reset pin on P1.02 CONFIG_BOARD_NRF9160DK_NRF52840_RESET=y CONFIG_BOARD_NRF9160DK_NRF52840_RESET_P1_02=y - -# Use UART1 for HCI -CONFIG_UART_1_NRF_FLOW_CONTROL=y diff --git a/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.overlay b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.overlay index 386899faafd..63d5847fe94 100644 --- a/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.overlay +++ b/samples/bluetooth/hci_uart/boards/nrf9160dk_nrf52840.overlay @@ -10,6 +10,7 @@ compatible = "nordic,nrf-uarte"; current-speed = <1000000>; status = "okay"; + hw-flow-control; tx-pin = <17>; rx-pin = <20>; rts-pin = <15>;