Skip to content

Commit

Permalink
tests: drivers: uart: async_dual: Add testing of UARTE120
Browse files Browse the repository at this point in the history
Use multi-instance testing and add UARTE120 configuration to nrf54h20
overlays.

Signed-off-by: Krzysztof Chruściński <[email protected]>
  • Loading branch information
nordic-krch committed Sep 9, 2024
1 parent 08b84fd commit cb6c784
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,28 @@
low-power-enable;
};
};

uart120_default_alt: uart120_default_alt {
group1 {
psels = <NRF_PSEL(UART_TX, 7, 7)>,
<NRF_PSEL(UART_RTS, 7, 5)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 7, 4)>,
<NRF_PSEL(UART_CTS, 7, 6)>;
bias-pull-up;
};
};

uart120_sleep_alt: uart120_sleep_alt {
group1 {
psels = <NRF_PSEL(UART_TX, 7, 7)>,
<NRF_PSEL(UART_RX, 7, 4)>,
<NRF_PSEL(UART_RTS, 7, 5)>,
<NRF_PSEL(UART_CTS, 7, 6)>;
low-power-enable;
};
};
};

dut: &uart134 {
Expand All @@ -56,6 +78,15 @@ dut_aux: &uart137 {
hw-flow-control;
};

dut2: &uart120 {
status = "okay";
pinctrl-0 = <&uart120_default_alt>;
pinctrl-1 = <&uart120_sleep_alt>;
pinctrl-names = "default", "sleep";
current-speed = <115200>;
hw-flow-control;
};

&timer137 {
status = "okay";
interrupts = <467 0>;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -9,3 +9,7 @@
&dut_aux {
memory-regions = <&cpuapp_dma_region>;
};

&dut2 {
memory-regions = <&dma_fast_region>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,7 @@
&timer137 {
interrupts = <467 (NRF_DEFAULT_IRQ_PRIORITY + 1)>;
};

&dut2 {
status = "disabled";
};
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
memory-regions = <&cpurad_dma_region>;
};

&dut2 {
memory-regions = <&dma_fast_region>;
};

&timer131 {
status = "okay";
prescaler = <0>;
Expand Down
2 changes: 0 additions & 2 deletions tests/drivers/uart/uart_async_dual/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,6 @@ ZTEST_DMEM struct dut_data duts[] = {
.name_aux = DT_SAME_NODE(DUT_NODE, DUT_AUX_NODE) ?
NULL : DT_NODE_FULL_NAME(DUT_AUX_NODE),
},
#if 0
#if DT_NODE_EXISTS(DT_NODELABEL(dut2))
{
.dev = DEVICE_DT_GET(DT_NODELABEL(dut2)),
Expand All @@ -56,7 +55,6 @@ ZTEST_DMEM struct dut_data duts[] = {
#endif
},
#endif
#endif
};

static const struct device *rx_dev;
Expand Down

0 comments on commit cb6c784

Please sign in to comment.