From 8931cc22dfb7e128e7145b1beef16b213882a06f Mon Sep 17 00:00:00 2001 From: Krzysztof Chruscinski Date: Thu, 22 Dec 2022 12:51:04 +0100 Subject: [PATCH] tests: drivers: uart: uart_mix_fifo_poll: Add nrf5340_cpuapp Add configuration for nrf5340_cpuapp. Signed-off-by: Krzysztof Chruscinski --- .../boards/nrf5340dk_nrf5340_cpuapp.conf | 2 ++ .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 36 +++++++++++++++++++ .../uart/uart_mix_fifo_poll/src/main.c | 2 ++ .../uart/uart_mix_fifo_poll/testcase.yaml | 2 +- 4 files changed, 41 insertions(+), 1 deletion(-) create mode 100644 tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.conf create mode 100644 tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.overlay diff --git a/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.conf b/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.conf new file mode 100644 index 00000000000..b77788bd0e5 --- /dev/null +++ b/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.conf @@ -0,0 +1,2 @@ +CONFIG_COUNTER=y +CONFIG_COUNTER_TIMER0=y diff --git a/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..277ee171f0d --- /dev/null +++ b/tests/drivers/uart/uart_mix_fifo_poll/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,36 @@ +/* SPDX-License-Identifier: Apache-2.0 */ + +&pinctrl { + uart1_default_alt: uart1_default_alt { + group1 { + psels = , + , + , + ; + }; + }; + + uart1_sleep_alt: uart1_sleep_alt { + group1 { + psels = , + , + , + ; + low-power-enable; + }; + }; +}; + +&uart1 { + current-speed = <115200>; + compatible = "nordic,nrf-uarte"; + status = "okay"; + pinctrl-0 = <&uart1_default_alt>; + pinctrl-1 = <&uart1_sleep_alt>; + pinctrl-names = "default", "sleep"; + hw-flow-control; +}; + +&rtc1 { + interrupts = <21 2>; +}; diff --git a/tests/drivers/uart/uart_mix_fifo_poll/src/main.c b/tests/drivers/uart/uart_mix_fifo_poll/src/main.c index 41c320f4acc..bc67d4327b9 100644 --- a/tests/drivers/uart/uart_mix_fifo_poll/src/main.c +++ b/tests/drivers/uart/uart_mix_fifo_poll/src/main.c @@ -19,6 +19,8 @@ #if defined(CONFIG_BOARD_NRF52840DK_NRF52840) #define UART_DEVICE_DEV DT_NODELABEL(uart0) +#elif defined(CONFIG_BOARD_NRF5340DK_NRF5340_CPUAPP) +#define UART_DEVICE_DEV DT_NODELABEL(uart1) #elif defined(CONFIG_BOARD_NRF9160DK_NRF9160) #define UART_DEVICE_DEV DT_NODELABEL(uart1) #elif defined(CONFIG_BOARD_ATSAMD21_XPRO) diff --git a/tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml b/tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml index b16aeeeefe6..caf9c024299 100644 --- a/tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml +++ b/tests/drivers/uart/uart_mix_fifo_poll/testcase.yaml @@ -1,7 +1,7 @@ common: tags: drivers uart harness: ztest - platform_allow: nrf52840dk_nrf52840 nrf9160dk_nrf9160 + platform_allow: nrf52840dk_nrf52840 nrf9160dk_nrf9160 nrf5340dk_nrf5340_cpuapp integration_platforms: - nrf52840dk_nrf52840 harness_config: