Skip to content

Commit 247ea3d

Browse files
committed
tests: drivers: uart: async_api: Add uart120 instance to nrf54h20dk
Add second instance to be tested on nrf54h20dk. uart120 is a fast UARTE which works on fixed pin locations. It is not available for cpuppr core. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent c6ccc48 commit 247ea3d

File tree

5 files changed

+57
-4
lines changed

5 files changed

+57
-4
lines changed

tests/drivers/uart/uart_async_api/boards/nrf54h20dk_nrf54h20_common.dtsi

Lines changed: 30 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,11 @@
33
&pinctrl {
44
uart137_default_alt: uart137_default_alt {
55
group1 {
6-
psels = <NRF_PSEL(UART_TX, 0, 6)>,
7-
<NRF_PSEL(UART_RX, 0, 7)>;
6+
psels = <NRF_PSEL(UART_TX, 0, 6)>;
7+
};
8+
group2 {
9+
psels = <NRF_PSEL(UART_RX, 0, 7)>;
10+
bias-pull-up;
811
};
912
};
1013

@@ -15,6 +18,23 @@
1518
low-power-enable;
1619
};
1720
};
21+
uart120_default_alt: uart120_default_alt {
22+
group1 {
23+
psels = <NRF_PSEL(UART_TX, 7, 7)>;
24+
};
25+
group2 {
26+
psels = <NRF_PSEL(UART_RX, 7, 4)>;
27+
bias-pull-up;
28+
};
29+
};
30+
31+
uart120_sleep_alt: uart120_sleep_alt {
32+
group1 {
33+
psels = <NRF_PSEL(UART_TX, 7, 7)>,
34+
<NRF_PSEL(UART_RX, 7, 4)>;
35+
low-power-enable;
36+
};
37+
};
1838
};
1939

2040
dut: &uart137 {
@@ -24,3 +44,11 @@ dut: &uart137 {
2444
pinctrl-names = "default", "sleep";
2545
current-speed = <115200>;
2646
};
47+
48+
dut2: &uart120 {
49+
status = "okay";
50+
pinctrl-0 = <&uart120_default_alt>;
51+
pinctrl-1 = <&uart120_sleep_alt>;
52+
pinctrl-names = "default", "sleep";
53+
current-speed = <115200>;
54+
};

tests/drivers/uart/uart_async_api/boards/nrf54h20dk_nrf54h20_cpuapp.overlay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,11 @@
55
&dut {
66
memory-regions = <&cpuapp_dma_region>;
77
};
8+
9+
&dut2 {
10+
memory-regions = <&dma_fast_region>;
11+
};
12+
13+
&dma_fast_region {
14+
status = "okay";
15+
};
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,7 @@
11
/* SPDX-License-Identifier: Apache-2.0 */
22

33
#include "nrf54h20dk_nrf54h20_common.dtsi"
4+
5+
dut2: &uart120 {
6+
status = "disabled";
7+
};

tests/drivers/uart/uart_async_api/boards/nrf54h20dk_nrf54h20_cpurad.overlay

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,11 @@
99
&dut {
1010
memory-regions = <&cpurad_dma_region>;
1111
};
12+
13+
&dma_fast_region {
14+
status = "okay";
15+
};
16+
17+
&dut2 {
18+
memory-regions = <&dma_fast_region>;
19+
};

tests/drivers/uart/uart_async_api/src/test_uart_async.c

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,17 @@ struct dut_data {
3131
const char *name;
3232
};
3333

34-
static ZTEST_DMEM struct dut_data duts[] = {
34+
ZTEST_DMEM struct dut_data duts[] = {
3535
{
3636
.dev = DEVICE_DT_GET(UART_NODE),
3737
.name = DT_NODE_FULL_NAME(UART_NODE),
3838
},
39-
/* More instances can be added here. */
39+
#if DT_NODE_EXISTS(DT_NODELABEL(dut2)) && DT_NODE_HAS_STATUS(DT_NODELABEL(dut2), okay)
40+
{
41+
.dev = DEVICE_DT_GET(DT_NODELABEL(dut2)),
42+
.name = DT_NODE_FULL_NAME(DT_NODELABEL(dut2)),
43+
},
44+
#endif
4045
};
4146

4247
static ZTEST_BMEM const struct device *uart_dev;

0 commit comments

Comments
 (0)