Skip to content

Commit 4f16c12

Browse files
khoatranyjkartben
authored andcommitted
tests: drivers: pwm: Add pwm tests support for mck_ra8m2
Add support for test apps on Renesas mck_ra8t2: - tests/drivers/pwm/pwm_api - tests/drivers/pwm/pwm_loopback Signed-off-by: Khoa Tran <[email protected]>
1 parent f35bda7 commit 4f16c12

File tree

2 files changed

+81
-0
lines changed

2 files changed

+81
-0
lines changed
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/pwm/pwm.h>
8+
#include <zephyr/dt-bindings/pwm/ra_pwm.h>
9+
10+
&pinctrl {
11+
pwm8_default: pwm8_default {
12+
group1 {
13+
/* GTIOC8A */
14+
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 5)>;
15+
};
16+
};
17+
};
18+
19+
&gptclk {
20+
status = "okay";
21+
};
22+
23+
&pwm8 {
24+
pinctrl-0 = <&pwm8_default>;
25+
pinctrl-names = "default";
26+
interrupts = <94 1>, <95 1>;
27+
interrupt-names = "gtioca", "overflow";
28+
status = "okay";
29+
};
Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
* SPDX-License-Identifier: Apache-2.0
4+
*/
5+
6+
#include <zephyr/dt-bindings/pwm/pwm.h>
7+
#include <zephyr/dt-bindings/pwm/ra_pwm.h>
8+
9+
/ {
10+
pwm_loopback_0 {
11+
compatible = "test-pwm-loopback";
12+
/* first index must be a 32-Bit timer */
13+
pwms = <&pwm6 0 0 PWM_POLARITY_NORMAL>,
14+
<&pwm9 0 0 PWM_POLARITY_NORMAL>;
15+
};
16+
};
17+
18+
&pinctrl {
19+
pwm9_default: pwm9_default {
20+
group1 {
21+
/* GTIOC9A */
22+
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 12)>;
23+
};
24+
};
25+
26+
pwm6_default: pwm6_default {
27+
group1 {
28+
/* GTIOC6A */
29+
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 1)>;
30+
};
31+
};
32+
};
33+
34+
&gptclk {
35+
status = "okay";
36+
};
37+
38+
&pwm9 {
39+
pinctrl-0 = <&pwm9_default>;
40+
pinctrl-names = "default";
41+
interrupts = <95 1>, <94 1>;
42+
interrupt-names = "gtioca", "overflow";
43+
status = "okay";
44+
};
45+
46+
&pwm6 {
47+
pinctrl-0 = <&pwm6_default>;
48+
pinctrl-names = "default";
49+
interrupts = <93 1>, <92 1>;
50+
interrupt-names = "gtioca", "overflow";
51+
status = "okay";
52+
};

0 commit comments

Comments
 (0)