Skip to content

Commit

Permalink
tests: drivers: uart: async_api: Add uart120 instance to nrf54h20dk
Browse files Browse the repository at this point in the history
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]>
  • Loading branch information
nordic-krch authored and henrikbrixandersen committed Nov 21, 2024
1 parent d2b69a4 commit f235ddb
Show file tree
Hide file tree
Showing 3 changed files with 45 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,11 @@
&pinctrl {
uart137_default_alt: uart137_default_alt {
group1 {
psels = <NRF_PSEL(UART_TX, 0, 6)>,
<NRF_PSEL(UART_RX, 0, 7)>;
psels = <NRF_PSEL(UART_TX, 0, 6)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 0, 7)>;
bias-pull-up;
};
};

Expand All @@ -15,6 +18,23 @@
low-power-enable;
};
};
uart120_default_alt: uart120_default_alt {
group1 {
psels = <NRF_PSEL(UART_TX, 7, 7)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 7, 4)>;
bias-pull-up;
};
};

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

dut: &uart137 {
Expand All @@ -24,3 +44,10 @@ dut: &uart137 {
pinctrl-names = "default", "sleep";
current-speed = <115200>;
};

dut2: &uart120 {
pinctrl-0 = <&uart120_default_alt>;
pinctrl-1 = <&uart120_sleep_alt>;
pinctrl-names = "default", "sleep";
current-speed = <115200>;
};
Original file line number Diff line number Diff line change
Expand Up @@ -5,3 +5,12 @@
&dut {
memory-regions = <&cpuapp_dma_region>;
};

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

&dma_fast_region {
status = "okay";
};
9 changes: 7 additions & 2 deletions tests/drivers/uart/uart_async_api/src/test_uart_async.c
Original file line number Diff line number Diff line change
Expand Up @@ -31,12 +31,17 @@ struct dut_data {
const char *name;
};

static ZTEST_DMEM struct dut_data duts[] = {
ZTEST_DMEM struct dut_data duts[] = {
{
.dev = DEVICE_DT_GET(UART_NODE),
.name = DT_NODE_FULL_NAME(UART_NODE),
},
/* More instances can be added here. */
#if DT_NODE_EXISTS(DT_NODELABEL(dut2)) && DT_NODE_HAS_STATUS(DT_NODELABEL(dut2), okay)
{
.dev = DEVICE_DT_GET(DT_NODELABEL(dut2)),
.name = DT_NODE_FULL_NAME(DT_NODELABEL(dut2)),
},
#endif
};

static ZTEST_BMEM const struct device *uart_dev;
Expand Down

0 comments on commit f235ddb

Please sign in to comment.