Skip to content

Commit 201a7c6

Browse files
Danh Doankartben
authored andcommitted
boards: renesas: Add PWM support for Renesas RA6, RA4, RA2
Add pinctrl & node of pwm driver for these board: ek_ra2a1, ek_ra4e2, ek_ra4m2, ek_ra4m3, ek_ra4w1, ek_ra6e2, ek_ra6m1, ek_ra6m2, ek_ra6m3, ek_ra6m4, ek_ra6m5, fpb_ra6e1, fpb_ra6e2. Signed-off-by: Danh Doan <[email protected]>
1 parent f75e3ba commit 201a7c6

39 files changed

+237
-0
lines changed

boards/renesas/ek_ra2a1/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,8 @@ hardware features:
8282
+-----------+------------+-------------------------------+
8383
| COUNTER | on-chip | counter |
8484
+-----------+------------+-------------------------------+
85+
| PWM | on-chip | pwm |
86+
+-----------+------------+-------------------------------+
8587

8688
The default configuration can be found in
8789
:zephyr_file:`boards/renesas/ek_ra2a1/ek_ra2a1_defconfig`

boards/renesas/ek_ra2a1/ek_ra2a1-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,4 +26,12 @@
2626
<RA_PSEL(RA_PSEL_SPI, 1, 2)>;
2727
};
2828
};
29+
30+
pwm0_default: pwm0_default {
31+
group1 {
32+
/* GTIOC0A GTIOC0B */
33+
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 8)>,
34+
<RA_PSEL(RA_PSEL_GPT1, 4, 7)>;
35+
};
36+
};
2937
};

boards/renesas/ek_ra2a1/ek_ra2a1.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,3 +85,11 @@
8585
interrupts = <29 3>;
8686
status = "okay";
8787
};
88+
89+
&pwm0 {
90+
pinctrl-0 = <&pwm0_default>;
91+
pinctrl-names = "default";
92+
interrupts = <28 1>, <31 1>;
93+
interrupt-names = "gtioca", "overflow";
94+
status = "okay";
95+
};

boards/renesas/ek_ra4e2/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -102,6 +102,8 @@ The below features are currently supported on Zephyr OS for EK-RA4E2 board:
102102
+-----------+------------+----------------------+
103103
| ADC | on-chip | adc |
104104
+-----------+------------+----------------------+
105+
| PWM | on-chip | pwm |
106+
+-----------+------------+----------------------+
105107

106108
Other hardware features are currently not supported by the port.
107109

boards/renesas/ek_ra4e2/ek_ra4e2-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -38,4 +38,12 @@
3838
renesas,analog-enable;
3939
};
4040
};
41+
42+
pwm1_default: pwm1_default {
43+
group1 {
44+
/* GTIOC1A GTIOC1B */
45+
psels = <RA_PSEL(RA_PSEL_GPT1, 1, 5)>,
46+
<RA_PSEL(RA_PSEL_GPT1, 1, 4)>;
47+
};
48+
};
4149
};

boards/renesas/ek_ra4e2/ek_ra4e2.dts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -153,3 +153,12 @@
153153
interrupts = <5 12>;
154154
status = "okay";
155155
};
156+
157+
&pwm1 {
158+
pinctrl-0 = <&pwm1_default>;
159+
pinctrl-names = "default";
160+
interrupts = <63 1>, <64 1>;
161+
interrupt-names = "gtioca", "overflow";
162+
divider = <RA_PWM_SOURCE_DIV_256>;
163+
status = "okay";
164+
};

boards/renesas/ek_ra4m2/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -104,6 +104,8 @@ The below features are currently supported on Zephyr OS for EK-RA4M2 board:
104104
+-----------+------------+----------------------+
105105
| ADC | on-chip | adc |
106106
+-----------+------------+----------------------+
107+
| PWM | on-chip | pwm |
108+
+-----------+------------+----------------------+
107109

108110
Other hardware features are currently not supported by the port.
109111

boards/renesas/ek_ra4m2/ek_ra4m2-pinctrl.dtsi

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,4 +29,12 @@
2929
renesas,analog-enable;
3030
};
3131
};
32+
33+
pwm1_default: pwm1_default {
34+
group1 {
35+
/* GTIOC1A GTIOC1B */
36+
psels = <RA_PSEL(RA_PSEL_GPT1, 1, 5)>,
37+
<RA_PSEL(RA_PSEL_GPT1, 1, 4)>;
38+
};
39+
};
3240
};

boards/renesas/ek_ra4m2/ek_ra4m2.dts

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -116,3 +116,11 @@
116116
interrupts = <42 12>;
117117
status = "okay";
118118
};
119+
120+
&pwm1 {
121+
pinctrl-0 = <&pwm1_default>;
122+
pinctrl-names = "default";
123+
interrupts = <63 1>, <64 1>;
124+
interrupt-names = "gtioca", "overflow";
125+
status = "okay";
126+
};

boards/renesas/ek_ra4m3/doc/index.rst

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -106,6 +106,8 @@ The below features are currently supported on Zephyr OS for EK-RA4M3 board:
106106
+-----------+------------+----------------------+
107107
| ADC | on-chip | adc |
108108
+-----------+------------+----------------------+
109+
| PWM | on-chip | pwm |
110+
+-----------+------------+----------------------+
109111

110112
Other hardware features are currently not supported by the port.
111113

0 commit comments

Comments
 (0)