Skip to content

Commit c304da7

Browse files
Alain Volmatnashif
authored andcommitted
shields: st_stm32f4dis_cam: ov9655 sensor based shield
Introduction of the STM32F4DIS-CAM shield for STM32 boards embedding a DVP based OV9655 sensor. Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
1 parent 3db7b40 commit c304da7

File tree

5 files changed

+107
-0
lines changed

5 files changed

+107
-0
lines changed
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
# Copyright (c) 2025 STMicroelectronics
2+
3+
# SPDX-License-Identifier: Apache-2.0
4+
5+
config SHIELD_ST_STM32F4DIS_CAM
6+
def_bool $(shields_list_contains,st_stm32f4dis_cam)
Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
CONFIG_VIDEO_INIT_PRIORITY=72
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
.. _st_stm32f4dis_cam:
2+
3+
ST STM32F4DIS-CAM
4+
#################
5+
6+
Overview
7+
********
8+
9+
The STM32F4DIS-CAM camera board embeds a 1.3MPix OV9655 sensor and a
10+
30 pins FFC connector in order to be used for some of the STM32 Discovery
11+
kits such as STM32L4R9I-disco board offering a DVP camera interface.
12+
13+
Requirements
14+
************
15+
16+
The camera module bundle is compatible with STM32 Discovery kits and
17+
Evaluation boards featuring a 30 pins FFC connector, such as the STM32F4
18+
Discovery kit or STM32L4R9I Discovery kit.
19+
20+
Usage
21+
*****
22+
23+
The shield can be used in any application by setting ``SHIELD`` to
24+
``st_stm32f4dis_cam`` for boards with the necessary device tree node labels.
25+
26+
Set ``--shield "st_stm32f4dis_cam"`` when you invoke ``west build``. For example:
27+
28+
.. zephyr-app-commands::
29+
:zephyr-app: samples/drivers/video/capture
30+
:board: stm32l4r9i_disco
31+
:shield: st_stm32f4dis_cam
32+
:goals: build
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
shield:
2+
name: st_stm32f4dis_cam
3+
full_name: ST STM32F4DIS-CAM
4+
vendor: st
5+
supported_features:
6+
- video
Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
/*
2+
* Copyright (c) 2025 STMicroelectronics
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
/ {
8+
chosen {
9+
zephyr,camera = &st_cam_dvp;
10+
};
11+
};
12+
13+
&dma2 {
14+
status = "okay";
15+
};
16+
17+
&dmamux1 {
18+
status = "okay";
19+
};
20+
21+
&st_cam_i2c {
22+
ov9655: camera@30 {
23+
compatible = "ovti,ov9655";
24+
reg = <0x30>;
25+
pwdn-gpios = <&dcmi_camera_connector 6 GPIO_ACTIVE_HIGH>;
26+
27+
port {
28+
ov9655_ep_out: endpoint {
29+
remote-endpoint-label = "dcmi_ep_in";
30+
};
31+
};
32+
};
33+
};
34+
35+
#define MCO1_SEL_SYSCLK 1
36+
37+
#define MCO1_PRE_DIV_4 2
38+
39+
&mco1 {
40+
status = "okay";
41+
clocks = <&rcc STM32_SRC_SYSCLK MCO1_SEL(MCO1_SEL_SYSCLK)>;
42+
prescaler = <MCO1_PRE(MCO1_PRE_DIV_4)>;
43+
pinctrl-0 = <&rcc_mco_pa8>;
44+
pinctrl-names = "default";
45+
};
46+
47+
&st_cam_dvp {
48+
status = "okay";
49+
50+
/* DMA config is already hardcoded within the DCMI driver */
51+
dmas = <&dma2 5 0 0>;
52+
53+
port {
54+
dcmi_ep_in: endpoint {
55+
remote-endpoint-label = "ov9655_ep_out";
56+
bus-width = <8>;
57+
hsync-active = <1>;
58+
vsync-active = <1>;
59+
pclk-sample = <1>;
60+
};
61+
};
62+
};

0 commit comments

Comments
 (0)