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 @@ -104,6 +104,8 @@ The below features are currently supported on Zephyr OS for EK-RA8D1 board:
104104+--------------+------------+------------------+
105105| FLASH | on-chip | flash |
106106+--------------+------------+------------------+
107+ | PWM | on-chip | pwm |
108+ +--------------+------------+------------------+
107109
108110Other hardware features are currently not supported by the port.
109111
Original file line number Diff line number Diff line change 2525 <RA_PSEL(RA_PSEL_SPI, 7, 3)>;
2626 };
2727 };
28+
29+ pwm7_default: pwm7_default {
30+ group1 {
31+ /* GTIOC7A */
32+ psels = <RA_PSEL(RA_PSEL_GPT1, 10, 7)>;
33+ };
34+ group2 {
35+ /* GTIOC7B */
36+ psels = <RA_PSEL(RA_PSEL_GPT1, 10, 6)>;
37+ };
38+ };
2839};
Original file line number Diff line number Diff line change 124124 };
125125 };
126126};
127+
128+ &pwm7 {
129+ pinctrl-0 = <&pwm7_default>;
130+ interrupts = <40 1>, <41 1>;
131+ interrupt-names = "gtioca", "overflow";
132+ pinctrl-names = "default";
133+ status = "okay";
134+ };
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 = <&pwm7 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, 4, 11)>;
23+ };
24+ group2 {
25+ /* GTIOC9B */
26+ psels = <RA_PSEL(RA_PSEL_GPT1, 4, 10)>;
27+ };
28+ };
29+ };
30+
31+ &pwm9 {
32+ pinctrl-0 = <&pwm9_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