Skip to content

Commit 9a941d7

Browse files
Hi-Im-Davidnordic-piks
authored andcommitted
tests: drivers: uart: Add uart baudrate test support for nrf7120pdk
Add overlays for nrf7120pdk_nrf7120 cpuapp, uart baudrate test. Signed-off-by: David Jewsbury <[email protected]>
1 parent c500931 commit 9a941d7

File tree

7 files changed

+204
-0
lines changed

7 files changed

+204
-0
lines changed
Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,9 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
CONFIG_UART_21_ASYNC=y
7+
CONFIG_UART_21_INTERRUPT_DRIVEN=n
8+
# Do not use interrupt driven API for console UART to not enable RX.
9+
CONFIG_UART_20_INTERRUPT_DRIVEN=n
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
/* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */
2+
3+
&pinctrl {
4+
uart21_default_alt: uart21_default_alt {
5+
group1 {
6+
psels = <NRF_PSEL(UART_RX, 1, 10)>,
7+
<NRF_PSEL(UART_TX, 1, 11)>;
8+
};
9+
};
10+
11+
uart21_sleep_alt: uart21_sleep_alt {
12+
group1 {
13+
psels = <NRF_PSEL(UART_RX, 1, 10)>,
14+
<NRF_PSEL(UART_TX, 1, 11)>;
15+
low-power-enable;
16+
};
17+
};
18+
};
19+
20+
&uart21 {
21+
status = "okay";
22+
pinctrl-0 = <&uart21_default_alt>;
23+
pinctrl-1 = <&uart21_sleep_alt>;
24+
pinctrl-names = "default", "sleep";
25+
current-speed = <115200>;
26+
lpuart: nrf-sw-lpuart {
27+
compatible = "nordic,nrf-sw-lpuart";
28+
status = "okay";
29+
req-pin = <40>;
30+
rdy-pin = <41>;
31+
};
32+
};
33+
34+
&gpiote20 {
35+
status = "okay";
36+
};
37+
38+
&timer20 {
39+
status = "okay";
40+
interrupts = <202 0>;
41+
};
42+
43+
/ {
44+
busy-sim {
45+
compatible = "vnd,busy-sim";
46+
status = "okay";
47+
counter = <&timer20>;
48+
};
49+
};

tests/drivers/lpuart/testcase.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,12 +26,14 @@ tests:
2626
- nrf54l15dk/nrf54l15/cpuapp
2727
- nrf54l20pdk/nrf54l20/cpuapp
2828
- nrf54l09pdk/nrf54l09/cpuapp
29+
- nrf7120pdk/nrf7120/cpuapp
2930
integration_platforms:
3031
- nrf54l15dk/nrf54l05/cpuapp
3132
- nrf54l15dk/nrf54l10/cpuapp
3233
- nrf54l15dk/nrf54l15/cpuapp
3334
- nrf54l20pdk/nrf54l20/cpuapp
3435
- nrf54l09pdk/nrf54l09/cpuapp
36+
- nrf7120pdk/nrf7120/cpuapp
3537
extra_configs:
3638
- CONFIG_TEST_LPUART_LOOPBACK=y
3739
harness: ztest
@@ -45,12 +47,14 @@ tests:
4547
- nrf54l15dk/nrf54l15/cpuapp
4648
- nrf54l20pdk/nrf54l20/cpuapp
4749
- nrf54l09pdk/nrf54l09/cpuapp
50+
- nrf7120pdk/nrf7120/cpuapp
4851
integration_platforms:
4952
- nrf54l15dk/nrf54l05/cpuapp
5053
- nrf54l15dk/nrf54l10/cpuapp
5154
- nrf54l15dk/nrf54l15/cpuapp
5255
- nrf54l20pdk/nrf54l20/cpuapp
5356
- nrf54l09pdk/nrf54l09/cpuapp
57+
- nrf7120pdk/nrf7120/cpuapp
5458
extra_configs:
5559
- CONFIG_TEST_LPUART_LOOPBACK=y
5660
- CONFIG_TEST_BUSY_SIM=y
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Test requires wire connection between:
3+
* - uart00 TX at P2.08 <-> GPIO input at P2.09
4+
*/
5+
6+
/ {
7+
zephyr,user {
8+
gpios = <&gpio2 9 GPIO_ACTIVE_HIGH>;
9+
};
10+
};
11+
12+
&gpio2 {
13+
status = "okay";
14+
};
15+
16+
&pinctrl {
17+
uart00_default: uart00_default {
18+
group1 {
19+
psels = <NRF_PSEL(UART_TX, 2, 8)>,
20+
<NRF_PSEL(UART_RX, 2, 7)>;
21+
bias-pull-up;
22+
};
23+
};
24+
25+
uart00_sleep: uart00_sleep {
26+
group1 {
27+
psels = <NRF_PSEL(UART_TX, 2, 8)>,
28+
<NRF_PSEL(UART_RX, 2, 7)>;
29+
low-power-enable;
30+
};
31+
};
32+
};
33+
34+
dut: &uart00 {
35+
status = "okay";
36+
current-speed = <115200>;
37+
pinctrl-0 = <&uart00_default>;
38+
pinctrl-1 = <&uart00_sleep>;
39+
pinctrl-names = "default", "sleep";
40+
disable-rx;
41+
};
Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
/*
2+
* Test requires wire connection between:
3+
* - uart21 TX at P1.10 <-> GPIO input at P1.11
4+
*/
5+
6+
/ {
7+
zephyr,user {
8+
gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
9+
};
10+
};
11+
12+
&gpio1 {
13+
status = "okay";
14+
};
15+
16+
&pinctrl {
17+
uart21_default: uart21_default {
18+
group1 {
19+
psels = <NRF_PSEL(UART_TX, 1, 10)>,
20+
<NRF_PSEL(UART_RX, 1, 8)>;
21+
bias-pull-up;
22+
};
23+
};
24+
25+
uart21_sleep: uart21_sleep {
26+
group1 {
27+
psels = <NRF_PSEL(UART_TX, 1, 10)>,
28+
<NRF_PSEL(UART_RX, 1, 8)>;
29+
low-power-enable;
30+
};
31+
};
32+
};
33+
34+
dut: &uart21 {
35+
status = "okay";
36+
current-speed = <115200>;
37+
pinctrl-0 = <&uart21_default>;
38+
pinctrl-1 = <&uart21_sleep>;
39+
pinctrl-names = "default", "sleep";
40+
disable-rx;
41+
};
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
/*
2+
* Test requires wire connection between:
3+
* - uart21 TX at P1.9 <-> GPIO input at P1.8
4+
*/
5+
6+
7+
/ {
8+
zephyr,user {
9+
gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
10+
};
11+
};
12+
13+
&gpio1 {
14+
status = "okay";
15+
};
16+
17+
&pinctrl {
18+
uart22_default: uart22_default {
19+
group1 {
20+
psels = <NRF_PSEL(UART_TX, 1, 9)>,
21+
<NRF_PSEL(UART_RX, 1, 11)>;
22+
bias-pull-up;
23+
};
24+
};
25+
26+
uart22_sleep: uart22_sleep {
27+
group1 {
28+
psels = <NRF_PSEL(UART_TX, 1, 9)>,
29+
<NRF_PSEL(UART_RX, 1, 11)>;
30+
low-power-enable;
31+
};
32+
};
33+
};
34+
35+
dut: &uart22 {
36+
status = "okay";
37+
current-speed = <115200>;
38+
pinctrl-0 = <&uart22_default>;
39+
pinctrl-1 = <&uart22_sleep>;
40+
pinctrl-names = "default", "sleep";
41+
disable-rx;
42+
};

tests/drivers/uart/uart_baudrate_test/testcase.yaml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -72,3 +72,21 @@ tests:
7272
integration_platforms:
7373
- nrf54l09pdk/nrf54l09/cpuapp
7474
extra_args: DTC_OVERLAY_FILE="boards/nrf54l09pdk_nrf54l09_cpuapp_uart21.overlay"
75+
drivers.uart.baudrate_test.7120_uart00:
76+
platform_allow:
77+
- nrf7120pdk/nrf7120/cpuapp
78+
integration_platforms:
79+
- nrf7120pdk/nrf7120/cpuapp
80+
extra_args: DTC_OVERLAY_FILE="boards/nrf7120pdk_nrf7120_cpuapp_uart00.overlay"
81+
drivers.uart.baudrate_test.7120_uart21:
82+
platform_allow:
83+
- nrf7120pdk/nrf7120/cpuapp
84+
integration_platforms:
85+
- nrf7120pdk/nrf7120/cpuapp
86+
extra_args: DTC_OVERLAY_FILE="boards/nrf7120pdk_nrf7120_cpuapp_uart21.overlay"
87+
drivers.uart.baudrate_test.7120_uart22:
88+
platform_allow:
89+
- nrf7120pdk/nrf7120/cpuapp
90+
integration_platforms:
91+
- nrf7120pdk/nrf7120/cpuapp
92+
extra_args: DTC_OVERLAY_FILE="boards/nrf7120pdk_nrf7120_cpuapp_uart22.overlay"

0 commit comments

Comments
 (0)