Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Nrfx 6832 enable lpuart tests on nrf54l20pdk #19804

Open
wants to merge 2 commits into
base: main
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_UART_21_ASYNC=y
CONFIG_UART_21_INTERRUPT_DRIVEN=n
# Do not use interrupt driven API for console UART to not enable RX.
CONFIG_UART_20_INTERRUPT_DRIVEN=n
Original file line number Diff line number Diff line change
@@ -0,0 +1,52 @@
/* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */

&pinctrl {
uart21_default_alt: uart21_default_alt {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>,
<NRF_PSEL(UART_TX, 1, 11)>;
};
};

uart21_sleep_alt: uart21_sleep_alt {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>,
<NRF_PSEL(UART_TX, 1, 11)>;
low-power-enable;
};
};
};

&uart21 {
status = "okay";
pinctrl-0 = <&uart21_default_alt>;
pinctrl-1 = <&uart21_sleep_alt>;
pinctrl-names = "default", "sleep";
current-speed = <115200>;
lpuart: nrf-sw-lpuart {
compatible = "nordic,nrf-sw-lpuart";
status = "okay";
req-pin = <40>;
rdy-pin = <41>;
};
};

&gpiote20 {
status = "okay";
};

&uart20_default {
/* Disconnect CTS and RTS lines from pins.
* This is a workaround for increased current consumption
* (~250 uA more).
*/
group1 {
psels = <NRF_PSEL(UART_TX, 1, 4)>,
<NRF_PSEL_DISCONNECTED(UART_RTS)>;
};
group2 {
psels = <NRF_PSEL(UART_RX, 1, 5)>,
<NRF_PSEL_DISCONNECTED(UART_CTS)>;
bias-pull-up;
};
};
4 changes: 4 additions & 0 deletions samples/peripheral/lpuart/sample.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,7 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
integration_platforms:
- nrf52dk/nrf52832
- nrf52833dk/nrf52833
Expand Down Expand Up @@ -50,6 +51,7 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
integration_platforms:
- nrf52840dk/nrf52840
extra_configs:
Expand Down Expand Up @@ -96,6 +98,7 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
tags: ppk_power_measure
harness: pytest
harness_config:
Expand Down Expand Up @@ -132,6 +135,7 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
harness: console
harness_config:
fixture: gpio_loopback
Expand Down
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#
# Copyright (c) 2024 Nordic Semiconductor
#
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
#
CONFIG_UART_21_ASYNC=y
CONFIG_UART_21_INTERRUPT_DRIVEN=n
# Do not use interrupt driven API for console UART to not enable RX.
CONFIG_UART_20_INTERRUPT_DRIVEN=n
49 changes: 49 additions & 0 deletions tests/drivers/lpuart/boards/nrf54l20pdk_nrf54l20_cpuapp.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
/* SPDX-License-Identifier: LicenseRef-Nordic-5-Clause */

&pinctrl {
uart21_default_alt: uart21_default_alt {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>,
<NRF_PSEL(UART_TX, 1, 11)>;
};
};

uart21_sleep_alt: uart21_sleep_alt {
group1 {
psels = <NRF_PSEL(UART_RX, 1, 10)>,
<NRF_PSEL(UART_TX, 1, 11)>;
low-power-enable;
};
};
};

&uart21 {
status = "okay";
pinctrl-0 = <&uart21_default_alt>;
pinctrl-1 = <&uart21_sleep_alt>;
pinctrl-names = "default", "sleep";
current-speed = <115200>;
lpuart: nrf-sw-lpuart {
compatible = "nordic,nrf-sw-lpuart";
status = "okay";
req-pin = <40>;
rdy-pin = <41>;
};
};

&gpiote20 {
status = "okay";
};

&timer20 {
status = "okay";
interrupts = <202 0>;
};

/ {
busy-sim {
compatible = "vnd,busy-sim";
status = "okay";
counter = <&timer20>;
};
};
4 changes: 4 additions & 0 deletions tests/drivers/lpuart/testcase.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,12 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
extra_configs:
- CONFIG_TEST_LPUART_LOOPBACK=y
harness: ztest
Expand All @@ -38,10 +40,12 @@ tests:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
integration_platforms:
- nrf54l15dk/nrf54l05/cpuapp
- nrf54l15dk/nrf54l10/cpuapp
- nrf54l15dk/nrf54l15/cpuapp
- nrf54l20pdk/nrf54l20/cpuapp
extra_configs:
- CONFIG_TEST_LPUART_LOOPBACK=y
- CONFIG_TEST_BUSY_SIM=y
Expand Down