Skip to content

Commit 9d83089

Browse files
KhanhNguyen-RVChenrikbrixandersen
authored andcommitted
boards: renesas: Enable CEU video capture support on EK-RA8D1
- Add CEU pin configuration to ek_ra8d1-pinctrl.dtsi - Enable CEU node and Arducam 20-pin connector in ek_ra8d1.dts - Configure PWM3 as external XCLK via pwm-clock node - Update board YAML to declare video support Signed-off-by: Duy Vo <[email protected]> Signed-off-by: Khanh Nguyen <[email protected]>
1 parent df0bbeb commit 9d83089

File tree

3 files changed

+72
-0
lines changed

3 files changed

+72
-0
lines changed

boards/renesas/ek_ra8d1/ek_ra8d1-pinctrl.dtsi

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,19 @@
5757
};
5858
};
5959

60+
pwm3_default: pwm3_default {
61+
group1 {
62+
/* GTIOC3A */
63+
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 3)>;
64+
drive-strength = "medium";
65+
};
66+
group2 {
67+
/* GTIOC3B */
68+
psels = <RA_PSEL(RA_PSEL_GPT1, 4, 4)>;
69+
drive-strength = "medium";
70+
};
71+
};
72+
6073
pwm7_default: pwm7_default {
6174
group1 {
6275
/* GTIOC7A */
@@ -269,4 +282,22 @@
269282
drive-strength = "high";
270283
};
271284
};
285+
286+
ceu_default: ceu_default {
287+
group1 {
288+
/* CEU */
289+
psels = <RA_PSEL(RA_PSEL_CEU, 4, 0)>, /* VIO_D0 */
290+
<RA_PSEL(RA_PSEL_CEU, 4, 1)>, /* VIO_D1 */
291+
<RA_PSEL(RA_PSEL_CEU, 4, 5)>, /* VIO_D2 */
292+
<RA_PSEL(RA_PSEL_CEU, 4, 6)>, /* VIO_D3 */
293+
<RA_PSEL(RA_PSEL_CEU, 7, 0)>, /* VIO_D4 */
294+
<RA_PSEL(RA_PSEL_CEU, 7, 1)>, /* VIO_D5 */
295+
<RA_PSEL(RA_PSEL_CEU, 7, 2)>, /* VIO_D6 */
296+
<RA_PSEL(RA_PSEL_CEU, 7, 3)>, /* VIO_D7 */
297+
<RA_PSEL(RA_PSEL_CEU, 7, 8)>, /* VIO_CLK */
298+
<RA_PSEL(RA_PSEL_CEU, 7, 9)>, /* VIO_HD */
299+
<RA_PSEL(RA_PSEL_CEU, 7, 10)>; /* VIO_VD */
300+
drive-strength = "high";
301+
};
302+
};
272303
};

boards/renesas/ek_ra8d1/ek_ra8d1.dts

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,8 @@
1212
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
1313
#include <zephyr/dt-bindings/memory-controller/renesas,ra-sdram.h>
1414
#include <zephyr/dt-bindings/adc/adc.h>
15+
#include <zephyr/dt-bindings/gpio/dvp-20pin-connector.h>
16+
#include <zephyr/dt-bindings/pwm/pwm.h>
1517
#include "ek_ra8d1-pinctrl.dtsi"
1618

1719
/ {
@@ -119,6 +121,15 @@
119121
<6 0 &ioporta 1 0>; /* DISP_RST */
120122
};
121123

124+
dvp_20pin_connector: dvp-20pin-connector {
125+
compatible = "arducam,dvp-20pin-connector";
126+
#gpio-cells = <2>;
127+
gpio-map-mask = <0xffffffff 0xffffffc0>;
128+
gpio-map-pass-thru = <0x0 0x3f>;
129+
gpio-map = <DVP_20PIN_PEN 0 &ioport7 4 0>,
130+
<DVP_20PIN_PDN 0 &ioport7 5 0>;
131+
};
132+
122133
aliases {
123134
led0 = &led1;
124135
sw0 = &button0;
@@ -313,6 +324,21 @@
313324
};
314325
};
315326

327+
&pwm3 {
328+
pinctrl-0 = <&pwm3_default>;
329+
pinctrl-names = "default";
330+
interrupts = <51 12>, <52 12>;
331+
interrupt-names = "gtioca", "overflow";
332+
333+
cam_clock: pwmclock {
334+
compatible = "pwm-clock";
335+
status = "disabled";
336+
#clock-cells = <1>;
337+
clock-frequency = <24000000>;
338+
pwms = <&pwm3 0 PWM_KHZ(24000) PWM_POLARITY_NORMAL>;
339+
};
340+
};
341+
316342
&pwm7 {
317343
pinctrl-0 = <&pwm7_default>;
318344
interrupts = <40 1>, <41 1>;
@@ -419,6 +445,16 @@
419445
};
420446
};
421447

448+
&ceu {
449+
pinctrl-0 = <&ceu_default>;
450+
pinctrl-names = "default";
451+
interrupts = <53 12>;
452+
interrupt-names = "ceui";
453+
clocks = <&pclka MSTPC 16>, <&cam_clock 0>;
454+
clock-names = "pclk", "cam-xclk";
455+
burst-transfer = <256>;
456+
};
457+
422458
zephyr_lcdif: &lcdif {};
423459

424460
zephyr_mipi_dsi: &mipi_dsi {};
@@ -427,6 +463,10 @@ renesas_mipi_i2c: &iic1 {};
427463

428464
pmod_sd_shield: &sdhc1 {};
429465

466+
dvp_20pin_i2c: &iic1 {};
467+
468+
dvp_20pin_interface: &ceu {};
469+
430470
&usbfs {
431471
pinctrl-0 = <&usbfs_default>;
432472
pinctrl-names = "default";

boards/renesas/ek_ra8d1/ek_ra8d1.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,4 +16,5 @@ supported:
1616
- counter
1717
- i2s
1818
- i3c
19+
- video
1920
vendor: renesas

0 commit comments

Comments
 (0)