Skip to content

Commit 6ed855a

Browse files
bjarki-andreasennashif
authored andcommitted
tests: drivers: build_all: comparator: add mcux_acmp
Add mcux_acmp device driver to build_all test suite. Signed-off-by: Bjarki Arge Andreasen <[email protected]>
1 parent d37f844 commit 6ed855a

File tree

6 files changed

+152
-0
lines changed

6 files changed

+152
-0
lines changed
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
acmp1_default: acmp1_default {
9+
group0 {
10+
pinmux = <&iomuxc_gpio_ad_01_acmp1_in2>;
11+
drive-strength = "high";
12+
bias-pull-up;
13+
slew-rate = "fast";
14+
};
15+
};
16+
};
17+
18+
&acmp1 {
19+
status = "okay";
20+
pinctrl-0 = <&acmp1_default>;
21+
pinctrl-names = "default";
22+
23+
positive-mux-input = "IN2";
24+
positive-port-input = "MUX";
25+
negative-mux-input = "IN2";
26+
negative-port-input = "DAC";
27+
28+
dac-vref-source = "VIN1";
29+
dac-value = <128>;
30+
dac-enable;
31+
32+
offset-mode = "LEVEL0";
33+
hysteresis-mode = "LEVEL0";
34+
enable-high-speed-mode;
35+
36+
filter-enable-sample;
37+
filter-count = <4>;
38+
filter-period = <32>;
39+
40+
discrete-mode-enable-positive-channel;
41+
discrete-mode-enable-resistor-divider;
42+
discrete-mode-clock-source = "FAST";
43+
discrete-mode-sample-time = "T1";
44+
discrete-mode-phase1-time = "ALT4";
45+
discrete-mode-phase2-time = "ALT7";
46+
};
Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
acmp1_default: acmp1_default {
9+
group0 {
10+
pinmux = <&iomuxc_gpio_ad_00_acmp1_in1>,
11+
<&iomuxc_gpio_ad_01_acmp1_in2>;
12+
drive-strength = "high";
13+
bias-pull-up;
14+
slew-rate = "fast";
15+
};
16+
};
17+
};
18+
19+
&acmp1 {
20+
status = "okay";
21+
pinctrl-0 = <&acmp1_default>;
22+
pinctrl-names = "default";
23+
24+
positive-mux-input = "IN1";
25+
negative-mux-input = "IN2";
26+
};
Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "mke15z7_pinctrl.dtsi"
8+
9+
&cmp0 {
10+
pinctrl-0 = <&cmp0_default>;
11+
pinctrl-names = "default";
12+
status = "okay";
13+
14+
positive-mux-input = "IN0";
15+
positive-port-input = "MUX";
16+
negative-mux-input = "IN0";
17+
negative-port-input = "DAC";
18+
19+
dac-vref-source = "VIN1";
20+
dac-value = <128>;
21+
dac-enable;
22+
};
Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include "mke15z7_pinctrl.dtsi"
8+
9+
&cmp0 {
10+
pinctrl-0 = <&cmp0_default>;
11+
pinctrl-names = "default";
12+
status = "okay";
13+
14+
positive-mux-input = "IN0";
15+
negative-mux-input = "IN1";
16+
};
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
/*
2+
* Copyright (c) 2024 Nordic Semiconductor
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <nxp/kinetis/MKE17Z256VLL7-pinctrl.h>
8+
9+
&pinctrl {
10+
cmp0_default: cmp0_default {
11+
group0 {
12+
pinmux = <ACMP0_IN0_PTA0>,
13+
<ACMP0_IN1_PTA1>,
14+
<ACMP0_OUT_PTA4>,
15+
<ACMP0_IN5_PTC2>;
16+
17+
drive-strength = "high";
18+
};
19+
};
20+
};

tests/drivers/build_all/comparator/testcase.yaml

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,3 +66,25 @@ tests:
6666
- nrf54h20dk/nrf54h20/cpuapp
6767
- nrf54l15dk/nrf54l15/cpuapp
6868
- nrf9280pdk/nrf9280/cpuapp
69+
drivers.build_all.comparator.mcux_acmp.mimxrt1176_mux_dac:
70+
extra_args:
71+
- DTC_OVERLAY_FILE="mcux_acmp/mimxrt1176_mux_dac.dts"
72+
platform_allow:
73+
- mimxrt1170_evk/mimxrt1176/cm4
74+
- mimxrt1170_evk/mimxrt1176/cm7
75+
drivers.build_all.comparator.mcux_acmp.mimxrt1176_mux_mux:
76+
extra_args:
77+
- DTC_OVERLAY_FILE="mcux_acmp/mimxrt1176_mux_mux.dts"
78+
platform_allow:
79+
- mimxrt1170_evk/mimxrt1176/cm4
80+
- mimxrt1170_evk/mimxrt1176/cm7
81+
drivers.build_all.comparator.mcux_acmp.mke15z7_mux_dac:
82+
extra_args:
83+
- DTC_OVERLAY_FILE="mcux_acmp/mke15z7_mux_dac.dts"
84+
platform_allow:
85+
- frdm_ke15z
86+
drivers.build_all.comparator.mcux_acmp.mke15z7_mux_mux:
87+
extra_args:
88+
- DTC_OVERLAY_FILE="mcux_acmp/mke15z7_mux_mux.dts"
89+
platform_allow:
90+
- frdm_ke15z

0 commit comments

Comments
 (0)