Skip to content

Commit 6deb989

Browse files
KhanhNguyen-RVCkartben
authored andcommitted
boards: renesas: ek_ra8p1: enable ArduCam CU450 OV5640 shield
Update the EK-RA8P1 board to support the ArduCam CU450 OV5640 shield: - Update pinctrl definitions in ek_ra8p1-pinctrl.dtsi - Update board DTS in ek_ra8p1_r7ka8p1kflcac_cm85.dts - Add board-specific overlay for the shield - Update documentation Signed-off-by: Khanh Nguyen <[email protected]>
1 parent 710b460 commit 6deb989

File tree

5 files changed

+102
-1
lines changed

5 files changed

+102
-1
lines changed

boards/renesas/ek_ra8p1/doc/index.rst

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,13 @@ Supported Features
8787
8888
.. note::
8989

90-
- Other hardware features are currently not supported by the port.
90+
- For using the Camera Expansion Port (J35) in DVP interface, please set switch SW4 as following configuration:
91+
92+
+-------------+-------------+----------------+---------------+-----------+------------+-------------+-------------+
93+
| SW4-1 PMOD1 | SW4-2 PMOD1 | SW4-3 Octo-SPI | SW4-4 Arduino | SW4-5 I3C | SW4-6 MIPI | SW4-7 USBFS | SW4-8 USBHS |
94+
+-------------+-------------+----------------+---------------+-----------+------------+-------------+-------------+
95+
| OFF | OFF | OFF | OFF | OFF | ON | OFF | OFF |
96+
+-------------+-------------+----------------+---------------+-----------+------------+-------------+-------------+
9197

9298
Dual Core Operation
9399
*******************

boards/renesas/ek_ra8p1/ek_ra8p1-pinctrl.dtsi

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,14 @@
6262
};
6363
};
6464

65+
pwm12_default: pwm12_default {
66+
group1 {
67+
/* GTIOC12A */
68+
psels = <RA_PSEL(RA_PSEL_GPT1, 5, 1)>;
69+
drive-strength = "medium";
70+
};
71+
};
72+
6573
iic1_default: iic1_default {
6674
group1 {
6775
/* SCL1 SDA1*/
@@ -71,6 +79,22 @@
7179
};
7280
};
7381

82+
ceu_default: ceu_default {
83+
group1 {
84+
psels = <RA_PSEL(RA_PSEL_CEU, 4, 0)>, /* VIO_D0 */
85+
<RA_PSEL(RA_PSEL_CEU, 9, 2)>, /* VIO_D1 */
86+
<RA_PSEL(RA_PSEL_CEU, 4, 5)>, /* VIO_D2 */
87+
<RA_PSEL(RA_PSEL_CEU, 4, 6)>, /* VIO_D3 */
88+
<RA_PSEL(RA_PSEL_CEU, 7, 0)>, /* VIO_D4 */
89+
<RA_PSEL(RA_PSEL_CEU, 7, 1)>, /* VIO_D5 */
90+
<RA_PSEL(RA_PSEL_CEU, 7, 2)>, /* VIO_D6 */
91+
<RA_PSEL(RA_PSEL_CEU, 7, 3)>, /* VIO_D7 */
92+
<RA_PSEL(RA_PSEL_CEU, 11, 4)>, /* VIO_CLK */
93+
<RA_PSEL(RA_PSEL_CEU, 11, 3)>, /* VIO_HD */
94+
<RA_PSEL(RA_PSEL_CEU, 11, 2)>; /* VIO_VD */
95+
};
96+
};
97+
7498
sdram_default: sdram_default {
7599
group1 {
76100
psels = <RA_PSEL(RA_PSEL_BUS, 10, 3)>, /* SDRAM_A2 */

boards/renesas/ek_ra8p1/ek_ra8p1.dtsi

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@
44
*/
55

66
#include <dt-bindings/gpio/gpio.h>
7+
#include <zephyr/dt-bindings/gpio/arducam-ffc-40pin-connector.h>
78
#include <dt-bindings/input/input-event-codes.h>
89
#include "ek_ra8p1-pinctrl.dtsi"
910
#include <zephyr/dt-bindings/memory-attr/memory-attr-arm.h>
@@ -54,6 +55,14 @@
5455
zephyr,memory-region = "SDRAM";
5556
status = "okay";
5657
};
58+
59+
arducam_ffc_40pin_connector: arducam-ffc-40pin-connector {
60+
compatible = "arducam,ffc-40pin-connector";
61+
#gpio-cells = <2>;
62+
gpio-map-mask = <0xffffffff 0xffffffc0>;
63+
gpio-map-pass-thru = <0x0 0x3f>;
64+
gpio-map = <ARDUCAM_FFC_40PIN_RESET 0 &ioport7 9 0>;
65+
};
5766
};
5867

5968
&xtal {

boards/renesas/ek_ra8p1/ek_ra8p1_r7ka8p1kflcac_cm85.dts

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@
66
/dts-v1/;
77

88
#include <renesas/ra/ra8/r7ka8p1kflcac_cm85.dtsi>
9+
#include <zephyr/dt-bindings/pwm/pwm.h>
910
#include "ek_ra8p1.dtsi"
1011

1112
/ {
@@ -105,6 +106,36 @@
105106
};
106107
};
107108

109+
&pwm12 {
110+
pinctrl-0 = <&pwm12_default>;
111+
interrupts = <20 1>, <21 1>;
112+
interrupt-names = "gtioca", "overflow";
113+
pinctrl-names = "default";
114+
115+
cam_clock: pwmclock {
116+
compatible = "pwm-clock";
117+
status = "disabled";
118+
#clock-cells = <1>;
119+
pwms = <&pwm12 0 PWM_KHZ(12000) PWM_POLARITY_NORMAL>;
120+
};
121+
};
122+
123+
&ceu {
124+
pinctrl-0 = <&ceu_default>;
125+
pinctrl-names = "default";
126+
interrupts = <22 1>;
127+
interrupt-names = "ceui";
128+
clocks = <&pclka MSTPC 16>, <&cam_clock 0>;
129+
clock-names = "pclk", "cam-xclk";
130+
burst-transfer = <256>;
131+
};
132+
108133
zephyr_lcdif: &lcdif {};
109134

110135
pmod_sd_shield: &sdhc0 {};
136+
137+
arducam_ffc_40pin_i2c: &iic1 {};
138+
139+
arducam_ffc_40pin_dvp_interface: &ceu {};
140+
141+
arducam_ffc_40pin_dvp_xclk: &cam_clock {};
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
/*
2+
* Copyright (c) 2025 Renesas Electronics Corporation
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
&pwm12 {
8+
status = "okay";
9+
};
10+
11+
&arducam_ffc_40pin_i2c {
12+
clock-frequency = <DT_FREQ_K(100)>;
13+
};
14+
15+
&arducam_ffc_40pin_dvp_xclk {
16+
clock-frequency = <DT_FREQ_M(12)>;
17+
status = "okay";
18+
};
19+
20+
&arducam_ffc_40pin_dvp_interface {
21+
swap-8bits;
22+
swap-16bits;
23+
swap-32bits;
24+
25+
port {
26+
dvp_ffc40_ep_in: endpoint {
27+
hsync-sample = <1>;
28+
vsync-sample = <1>;
29+
};
30+
};
31+
};

0 commit comments

Comments
 (0)