From 21dcdb2180b536c916ac59773cfb655bc90d37b0 Mon Sep 17 00:00:00 2001 From: Gerard Marull-Paretas Date: Mon, 2 Jan 2023 17:06:19 +0100 Subject: [PATCH] tests: drivers: regulator: fixed: add nrf5340dk/nrf9160dk overlays Allow to run the test on nRF5340DK and nRF9160DK boards. Signed-off-by: Gerard Marull-Paretas --- .../boards/nrf5340dk_nrf5340_cpuapp.overlay | 17 ++++++++++++++ .../fixed/boards/nrf9160dk_nrf9160.overlay | 22 +++++++++++++++++++ tests/drivers/regulator/fixed/testcase.yaml | 4 +++- 3 files changed, 42 insertions(+), 1 deletion(-) create mode 100644 tests/drivers/regulator/fixed/boards/nrf5340dk_nrf5340_cpuapp.overlay create mode 100644 tests/drivers/regulator/fixed/boards/nrf9160dk_nrf9160.overlay diff --git a/tests/drivers/regulator/fixed/boards/nrf5340dk_nrf5340_cpuapp.overlay b/tests/drivers/regulator/fixed/boards/nrf5340dk_nrf5340_cpuapp.overlay new file mode 100644 index 00000000000..c6988b43154 --- /dev/null +++ b/tests/drivers/regulator/fixed/boards/nrf5340dk_nrf5340_cpuapp.overlay @@ -0,0 +1,17 @@ +/* + * Copyright 2023 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "test_common.dtsi" + +/ { + regulator { + /* Arduino D11 */ + enable-gpios = <&gpio0 4 GPIO_ACTIVE_HIGH>; + }; + resources { + /* Arduino D13 */ + check-gpios = <&gpio0 5 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; +}; diff --git a/tests/drivers/regulator/fixed/boards/nrf9160dk_nrf9160.overlay b/tests/drivers/regulator/fixed/boards/nrf9160dk_nrf9160.overlay new file mode 100644 index 00000000000..289c23caeb9 --- /dev/null +++ b/tests/drivers/regulator/fixed/boards/nrf9160dk_nrf9160.overlay @@ -0,0 +1,22 @@ +/* + * Copyright 2023 Nordic Semiconductor ASA + * SPDX-License-Identifier: Apache-2.0 + */ + +#include "test_common.dtsi" + +/ { + regulator { + /* Arduino D0 */ + enable-gpios = <&gpio0 0 GPIO_ACTIVE_HIGH>; + }; + resources { + /* Arduino D1 */ + check-gpios = <&gpio0 1 (GPIO_ACTIVE_HIGH | GPIO_PULL_DOWN)>; + }; +}; + +&uart1 { + /* Default-enabled Arduino UART steals the pins we want. */ + status = "disabled"; +}; diff --git a/tests/drivers/regulator/fixed/testcase.yaml b/tests/drivers/regulator/fixed/testcase.yaml index 05b06a7e646..020b6c7b207 100644 --- a/tests/drivers/regulator/fixed/testcase.yaml +++ b/tests/drivers/regulator/fixed/testcase.yaml @@ -5,6 +5,8 @@ tests: harness_config: fixture: gpio_loopback depends_on: gpio - platform_allow: nrf52840dk_nrf52840 + platform_allow: nrf52840dk_nrf52840 nrf5340dk_nrf5340_cpuapp nrf9160dk_nrf9160 integration_platforms: - nrf52840dk_nrf52840 + - nrf5340dk_nrf5340_cpuapp + - nrf9160dk_nrf9160