Skip to content

Commit e02a071

Browse files
test: drivers: pwm: Enable test cases for frdm_mcxw71
Enable pwm_api and pwm_loopback test. All test cases passed. Signed-off-by: Felix Wang <[email protected]>
1 parent d470403 commit e02a071

File tree

2 files changed

+65
-0
lines changed

2 files changed

+65
-0
lines changed
Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
/ {
7+
aliases {
8+
pwm-1 = &tpm1;
9+
};
10+
};
11+
12+
&pinctrl {
13+
tpm1_default: tpm1_default {
14+
group0 {
15+
pinmux = <TPM1_CH0_PTB0>,
16+
<TPM1_CH2_PTB2>;
17+
drive-strength = "low";
18+
slew-rate = "slow";
19+
};
20+
};
21+
};
22+
23+
&tpm1 {
24+
status = "okay";
25+
pinctrl-0 = <&tpm1_default>;
26+
pinctrl-names = "default";
27+
};
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
/*
2+
* Copyright 2025 NXP
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pinctrl {
8+
tpm0_default: tpm0_default {
9+
group0 {
10+
pinmux = <TPM0_CH0_PTA21>,
11+
<TPM0_CH1_PTA20>,
12+
<TPM0_CH2_PTA19>,
13+
<TPM0_CH3_PTA18>;
14+
drive-strength = "low";
15+
slew-rate = "slow";
16+
};
17+
};
18+
};
19+
20+
/* To test this sample, connect
21+
* PTA18(J2-9) ---> PTA21(J1-8)
22+
*/
23+
24+
/ {
25+
pwm_loopback_0 {
26+
compatible = "test-pwm-loopback";
27+
pwms = <&tpm0 3 0 PWM_POLARITY_NORMAL>, /* PTA18 J2 pin 9, out */
28+
<&tpm0 0 0 PWM_POLARITY_NORMAL>; /* PTA21 J1 pin 8, in */
29+
};
30+
};
31+
32+
&tpm0 {
33+
status = "okay";
34+
compatible = "nxp,kinetis-tpm";
35+
#pwm-cells = <3>;
36+
pinctrl-0 = <&tpm0_default>;
37+
pinctrl-names = "default";
38+
};

0 commit comments

Comments
 (0)