Skip to content

Commit 7fc7790

Browse files
committed
tests: zephyr: drivers: comparator: add support for L20 and L09
Taken from zephyr. Signed-off-by: Piotr Kosycarz <[email protected]>
1 parent e48012d commit 7fc7790

22 files changed

+229
-0
lines changed

.github/test-spec.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -641,6 +641,7 @@
641641
- "tests/drivers/spi/**/*"
642642
- "tests/drivers/uart/**/*"
643643
- "tests/subsys/event_manager_proxy/**/*"
644+
- "tests/zephyr/drivers/comparator/**/*"
644645
- "tests/zephyr/drivers/flash/**/*"
645646
- "tests/zephyr/drivers/i2c/**/*"
646647
- "tests/zephyr/drivers/mspi/**/*"

CODEOWNERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -918,6 +918,7 @@
918918
/tests/tfm/ @nrfconnect/ncs-aegir @stephen-nordic @magnev
919919
/tests/unity/ @nordic-krch
920920
/tests/subsys/zigbee/ @nrfconnect/ncs-zigbee
921+
/tests/zephyr/drivers/comparator/ @nrfconnect/ncs-low-level-test
921922
/tests/zephyr/drivers/flash/common/ @nrfconnect/ncs-low-level-test @nrfconnect/ncs-ll-ursus
922923
/tests/zephyr/drivers/i2c/i2c_bme688/ @nrfconnect/ncs-low-level-test
923924
/tests/zephyr/drivers/i2c/i2c_target_api/ @nrfconnect/ncs-low-level-test

scripts/ci/tags.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1584,3 +1584,13 @@ ci_tests_zephyr_boards_nrf_hwinfo:
15841584
files:
15851585
- nrf/tests/zephyr/boards/nrf/hwinfo/
15861586
- zephyr/tests/boards/nrf/hwinfo/
1587+
1588+
ci_tests_zephyr_drivers_comparator:
1589+
files:
1590+
- nrf/tests/zephyr/drivers/comparator/
1591+
- zephyr/tests/drivers/comparator/
1592+
1593+
ci_tests_zephyr_boards_nrf_comp:
1594+
files:
1595+
- nrf/tests/zephyr/boards/nrf/comp/
1596+
- zephyr/tests/boards/nrf/comp/

scripts/quarantine.yaml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -40,3 +40,11 @@
4040
platforms:
4141
- nrf52833dk/nrf52820
4242
comment: "https://nordicsemi.atlassian.net/browse/NCSDK-32042"
43+
44+
- scenarios:
45+
- nrf.extended.drivers.comparator.nrf_comp
46+
- nrf.extended.drivers.comparator.gpio_loopback.nrf_lpcomp
47+
- nrf.extended.drivers.comparator.gpio_loopback.nrf_comp
48+
platforms:
49+
- nrf54l20pdk/nrf54l20/cpuapp
50+
comment: "https://nordicsemi.atlassian.net/browse/NRFX-7205"
Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
#
2+
# Copyright (c) 2025 Nordic Semiconductor ASA
3+
#
4+
# SPDX-License-Identifier: LicenseRef-Nordic-5-Clause
5+
#
6+
7+
cmake_minimum_required(VERSION 3.20.0)
8+
9+
find_package(Zephyr REQUIRED HINTS $ENV{ZEPHYR_BASE})
10+
project(comp)
11+
12+
FILE(GLOB app_sources ${ZEPHYR_BASE}/tests/boards/nrf/comp/src/*.c)
13+
target_sources(app PRIVATE ${app_sources})
Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
This sample extends the same-named Zephyr sample to verify it
2+
with Nordic development kits.
3+
4+
Source code and basic configuration files can be found in the corresponding folder structure in zephyr/tests/baords/nrf/comp.
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/ {
2+
aliases {
3+
test-comp = &comp;
4+
};
5+
6+
zephyr,user {
7+
first-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
8+
second-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
9+
};
10+
};
11+
12+
&gpio1 {
13+
status = "okay";
14+
};
15+
16+
&comp {
17+
status = "okay";
18+
psel = "AIN4";
19+
refsel = "AREF";
20+
extrefsel= "AIN3";
21+
sp-mode = "NORMAL";
22+
th-up = <36>;
23+
th-down = <30>;
24+
isource = "DISABLED";
25+
enable-hyst;
26+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/ {
2+
aliases {
3+
test-comp = &comp;
4+
};
5+
6+
zephyr,user {
7+
first-gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
8+
second-gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
9+
};
10+
};
11+
12+
&gpio1 {
13+
status = "okay";
14+
};
15+
16+
&comp {
17+
status = "okay";
18+
psel = "AIN4";
19+
refsel = "AREF";
20+
extrefsel= "AIN3";
21+
sp-mode = "NORMAL";
22+
th-up = <36>;
23+
th-down = <30>;
24+
isource = "DISABLED";
25+
enable-hyst;
26+
};
Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
CONFIG_GPIO=y
2+
CONFIG_COMPARATOR=y
3+
CONFIG_ZTEST=y
Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
common:
2+
harness_config:
3+
fixture: gpio_loopback
4+
tags:
5+
- drivers
6+
- comparator
7+
- ci_tests_zephyr_boards_nrf_comp
8+
tests:
9+
nrf.extended.drivers.comparator.nrf_comp:
10+
platform_allow:
11+
- nrf54l09pdk/nrf54l09/cpuapp
12+
- nrf54l20pdk/nrf54l20/cpuapp
13+
integration_platforms:
14+
- nrf54l09pdk/nrf54l09/cpuapp
15+
- nrf54l20pdk/nrf54l20/cpuapp

0 commit comments

Comments
 (0)