Skip to content

Commit 227dece

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

File tree

1 file changed

+49
-0
lines changed

1 file changed

+49
-0
lines changed
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
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+
9+
/ {
10+
pwmclock: pwmclock {
11+
status = "okay";
12+
compatible = "pwm-clock";
13+
#clock-cells = <1>;
14+
clock-frequency = <1000000>;
15+
pwms = <&pwm6 0 PWM_KHZ(1000) PWM_POLARITY_NORMAL>;
16+
};
17+
18+
samplenode: samplenode {
19+
status = "okay";
20+
compatible = "test-clock-control-pwm-clock";
21+
clocks = <&pwmclock 0>;
22+
};
23+
};
24+
25+
&pinctrl {
26+
pwm6_default: pwm6_default {
27+
group1 {
28+
/* GTIOC6A */
29+
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 1)>;
30+
};
31+
32+
group2 {
33+
/* GTIOC6B */
34+
psels = <RA_PSEL(RA_PSEL_GPT1, 6, 0)>;
35+
};
36+
};
37+
};
38+
39+
&gptclk {
40+
status = "okay";
41+
};
42+
43+
&pwm6 {
44+
pinctrl-0 = <&pwm6_default>;
45+
pinctrl-names = "default";
46+
interrupts = <93 1>, <92 1>;
47+
interrupt-names = "gtioca", "overflow";
48+
status = "okay";
49+
};

0 commit comments

Comments
 (0)