Skip to content

Commit 79ad924

Browse files
committed
tests: drivers: uart: mix_fifo_poll: Add UARTE120 to nrf54h20dk test
Add configuration for UARTE120 fast instance. Use multi-instance capability of the test to run same test on UARTE120 and slow UARTE peripheral. Signed-off-by: Krzysztof Chruściński <[email protected]>
1 parent 9e3e077 commit 79ad924

File tree

5 files changed

+57
-1
lines changed

5 files changed

+57
-1
lines changed

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

Lines changed: 30 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,27 @@
1919
low-power-enable;
2020
};
2121
};
22+
uart120_default_alt: uart120_default_alt {
23+
group1 {
24+
psels = <NRF_PSEL(UART_TX, 7, 7)>,
25+
<NRF_PSEL(UART_RTS, 7, 5)>;
26+
};
27+
group2 {
28+
psels = <NRF_PSEL(UART_RX, 7, 4)>,
29+
<NRF_PSEL(UART_CTS, 7, 6)>;
30+
bias-pull-up;
31+
};
32+
};
33+
34+
uart120_sleep_alt: uart120_sleep_alt {
35+
group1 {
36+
psels = <NRF_PSEL(UART_TX, 7, 7)>,
37+
<NRF_PSEL(UART_RX, 7, 4)>,
38+
<NRF_PSEL(UART_RTS, 7, 5)>,
39+
<NRF_PSEL(UART_CTS, 7, 6)>;
40+
low-power-enable;
41+
};
42+
};
2243
};
2344

2445
dut: &uart137 {
@@ -30,7 +51,15 @@ dut: &uart137 {
3051
hw-flow-control;
3152
};
3253

33-
/* Use timer137 as only this one can generate interrupts on cpusys. */
54+
dut2: &uart120 {
55+
status = "okay";
56+
pinctrl-0 = <&uart120_default_alt>;
57+
pinctrl-1 = <&uart120_sleep_alt>;
58+
pinctrl-names = "default", "sleep";
59+
current-speed = <115200>;
60+
hw-flow-control;
61+
};
62+
3463
counter_dev: &timer137 {
3564
status = "okay";
3665
};

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
memory-regions = <&cpuapp_dma_region>;
77
};
88

9+
&dma_fast_region {
10+
status = "okay";
11+
};
12+
13+
&dut2 {
14+
memory-regions = <&dma_fast_region>;
15+
};
16+
917
&grtc {
1018
interrupts = <109 2>;
1119
};

tests/drivers/uart/uart_mix_fifo_poll/boards/nrf54h20dk_nrf54h20_cpuppr.overlay

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,3 +9,8 @@
99
&dut {
1010
interrupts = <470 (NRF_DEFAULT_IRQ_PRIORITY + 1)>;
1111
};
12+
13+
/* PPR cannot use that instance. */
14+
&uart120 {
15+
status = "disabled"
16+
};

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

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,14 @@
66
memory-regions = <&cpurad_dma_region>;
77
};
88

9+
&dma_fast_region {
10+
status = "okay";
11+
};
12+
13+
&dut2 {
14+
memory-regions = <&dma_fast_region>;
15+
};
16+
917
&grtc {
1018
interrupts = <109 2>;
1119
};

tests/drivers/uart/uart_mix_fifo_poll/src/main.c

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,12 @@ static struct dut_data duts[] = {
5252
.dev = DEVICE_DT_GET(UART_NODE),
5353
.name = DT_NODE_FULL_NAME(UART_NODE),
5454
},
55+
#if DT_NODE_EXISTS(DT_NODELABEL(dut2))
56+
{
57+
.dev = DEVICE_DT_GET(DT_NODELABEL(dut2)),
58+
.name = DT_NODE_FULL_NAME(DT_NODELABEL(dut2)),
59+
},
60+
#endif
5561
};
5662

5763
#define BUF_SIZE 16

0 commit comments

Comments
 (0)