Skip to content

Commit c17b1dd

Browse files
tests: drivers: pwm: Enable test for mimxrt1170_evk_mimxrt1176_cm4
Add board overlay file and conf file. Signed-off-by: Felix Wang <fei.wang_3@nxp.com>
1 parent 2c7da49 commit c17b1dd

File tree

3 files changed

+55
-0
lines changed

3 files changed

+55
-0
lines changed
Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,11 @@
1+
/*
2+
* Copyright 2026 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
aliases {
9+
pwm-test = &flexpwm1_pwm2;
10+
};
11+
};
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
CONFIG_TEST_PWM_PERIOD_NSEC=10000000
2+
CONFIG_TEST_PWM_PULSE_NSEC=1500000
3+
4+
CONFIG_TEST_PWM_PERIOD_USEC=10000
5+
CONFIG_TEST_PWM_PULSE_USEC=7500
Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
/*
2+
* Copyright 2026 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
#include <zephyr/dt-bindings/pwm/pwm.h>
7+
8+
&pinctrl {
9+
flexpwm1_pwm2_default: flexpwm1_pwm2_default {
10+
group0 {
11+
pinmux = <&iomuxc_gpio_ad_04_flexpwm1_pwm2_a>;
12+
drive-strength = "normal";
13+
slew-rate = "fast";
14+
};
15+
16+
group1 {
17+
pinmux = <&iomuxc_gpio_ad_05_flexpwm1_pwm2_b>;
18+
drive-strength = "normal";
19+
slew-rate = "fast";
20+
};
21+
};
22+
};
23+
/* To test this sample, connect
24+
* gpio_ad_04(J25-7) ---> gpio_ad_05(J25-5)
25+
*/
26+
27+
/ {
28+
pwm_loopback_0 {
29+
compatible = "test-pwm-loopback";
30+
pwms = <&flexpwm1_pwm2 0 0 PWM_POLARITY_NORMAL>, /* gpio_ad_04(J25-7), out */
31+
<&flexpwm1_pwm2 1 0 PWM_POLARITY_NORMAL>; /* gpio_ad_05(J25-5), in */
32+
};
33+
};
34+
35+
&flexpwm1_pwm2 {
36+
status = "okay";
37+
pinctrl-0 = <&flexpwm1_pwm2_default>;
38+
pinctrl-names = "default";
39+
};

0 commit comments

Comments
 (0)