File tree Expand file tree Collapse file tree 4 files changed +58
-0
lines changed
tests/drivers/pwm/pwm_loopback/boards Expand file tree Collapse file tree 4 files changed +58
-0
lines changed Original file line number Diff line number Diff line change @@ -102,6 +102,8 @@ The below features are currently supported on Zephyr OS for MCB-RA8T1 board:
102102+--------------+------------+----------------------+
103103| FLASH | on-chip | flash |
104104+--------------+------------+----------------------+
105+ | PWM | on-chip | pwm |
106+ +--------------+------------+----------------------+
105107
106108Other hardware features are currently not supported by the port.
107109
Original file line number Diff line number Diff line change 2525 <RA_PSEL(RA_PSEL_SPI, 2, 4)>;
2626 };
2727 };
28+
29+ pwm2_default: pwm2_default {
30+ group1 {
31+ /* GTIOC2A */
32+ psels = <RA_PSEL(RA_PSEL_GPT1, 1, 13)>;
33+ };
34+ group2 {
35+ /* GTIOC2B */
36+ psels = <RA_PSEL(RA_PSEL_GPT1, 1, 14)>;
37+ };
38+ };
2839};
Original file line number Diff line number Diff line change 118118 };
119119 };
120120};
121+
122+ &pwm2 {
123+ pinctrl-0 = <&pwm2_default>;
124+ interrupts = <40 1>, <41 1>;
125+ interrupt-names = "gtioca", "overflow";
126+ pinctrl-names = "default";
127+ status = "okay";
128+ };
Original file line number Diff line number Diff line change 1+ /*
2+ * Copyright (c) 2024 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 = <&pwm2 0 0 PWM_POLARITY_NORMAL>,
14+ <&pwm5 0 0 PWM_POLARITY_NORMAL>;
15+ };
16+ };
17+
18+ &pinctrl {
19+ pwm5_default: pwm5_default {
20+ group1 {
21+ /* GTIOC5A */
22+ psels = <RA_PSEL(RA_PSEL_GPT1, 1, 15)>;
23+ };
24+ group2 {
25+ /* GTIOC5B */
26+ psels = <RA_PSEL(RA_PSEL_GPT1, 6, 9)>;
27+ };
28+ };
29+ };
30+
31+ &pwm5 {
32+ pinctrl-0 = <&pwm5_default>;
33+ pinctrl-names = "default";
34+ interrupts = <50 1>, <51 1>;
35+ interrupt-names = "gtioca", "overflow";
36+ status = "okay";
37+ };
You can’t perform that action at this time.
0 commit comments