Skip to content

Commit 5afbeef

Browse files
committed
boards: nxp: frdm_mcxn947: migrate ov7670 to a shield
The OV7670 was defined as part of the FRDM-MCXN947 board attached to the SmartDMA and I2C peripheral. Migrate the devicetree to a reusable shield that can be swapped with other image sensors. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent d3f1d14 commit 5afbeef

File tree

4 files changed

+123
-11
lines changed

4 files changed

+123
-11
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright 2025 tinyVision.ai Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_DVP_20PIN_OV7670
5+
def_bool $(shields_list_contains,dvp_20pin_ov7670)
Lines changed: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
.. _dvp_20pin_ov7670:
2+
3+
DVP 20-pin OV7670 Camera Module
4+
###############################
5+
6+
Overview
7+
********
8+
9+
This series of shields supports the camera modules which use a 18-pin connector compatible with
10+
the ``arducam,dvp-20pin-connector`` to connect a devkit to an OV7670 image sensor via DVP
11+
(Digital Video Port), aka parallel interface.
12+
13+
Only 18 pins out of the 20-pin connector are present
14+
15+
It was originally produced by `Arducam`_ but is discontinuited, and now `Olimex`_ provides it.
16+
17+
Pins assignment
18+
===============
19+
20+
+-----+--------------+-----+--------------+
21+
| Pin | Function | Pin | Function |
22+
+=====+==============+=====+==============+
23+
| 1 | 3V3 | 2 | GND |
24+
+-----+--------------+-----+--------------+
25+
| 3 | SCL | 4 | SDA |
26+
+-----+--------------+-----+--------------+
27+
| 5 | VS | 6 | HS |
28+
+-----+--------------+-----+--------------+
29+
| 7 | PCLK | 8 | XCLK |
30+
+-----+--------------+-----+--------------+
31+
| 9 | D7 | 10 | D6 |
32+
+-----+--------------+-----+--------------+
33+
| 11 | D5 | 12 | D4 |
34+
+-----+--------------+-----+--------------+
35+
| 13 | D3 | 14 | D2 |
36+
+-----+--------------+-----+--------------+
37+
| 15 | D1 | 16 | D0 |
38+
+-----+--------------+-----+--------------+
39+
| 17 | POWER_EN | 18 | POWER_DOWN |
40+
+-----+--------------+-----+--------------+
41+
42+
Requirements
43+
************
44+
45+
This shield can be used with any board which provides a 18 or 20-pin header spread over two rows
46+
of 9 or 10 pins each with the above pinout, such as the `arduino Giga R1`_, `NXP FRDM-MCXN947`_,
47+
ST boards with the `ST-CAMS-OMV`_ adapter, or any other board with a compatible connector.
48+
49+
Alternatively, it is possible to use jumper wires to connect the module to any devkit that
50+
exposes their camera parallel port to pin headers.
51+
52+
Programming
53+
***********
54+
55+
Set ``--shield dvp_20pin_ov7670`` when you invoke ``west build``. For example:
56+
57+
.. zephyr-app-commands::
58+
:zephyr-app: samples/drivers/video/capture
59+
:board: frdm_mcxn947
60+
:shield: dvp_20pin_ov7670
61+
:goals: build
62+
63+
References
64+
**********
65+
66+
.. target-notes::
67+
68+
.. _ST-CAMS-OMV:
69+
https://www.st.com/en/evaluation-tools/b-cams-omv.html
70+
71+
.. _Arducam:
72+
https://docs.arducam.com/DVP-Camera-Module/Arduino-GIGA/Arduino-GIGA/Quick-Start-Guide/
73+
74+
.. _Arduino Giga R1:
75+
https://docs.arduino.cc/tutorials/giga-r1-wifi/giga-camera/
76+
77+
.. _NXP FRDM-MCXN947:
78+
https://www.nxp.com/docs/en/application-note/AN14191.pdf
79+
80+
.. _Olimex:
81+
https://www.olimex.com/Products/Components/Camera/CAMERA-OV7670/
Lines changed: 37 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,37 @@
1+
/*
2+
* Copyright 2024 NXP
3+
* Copyright 2025 tinyVision.ai Inc.
4+
*
5+
* SPDX-License-Identifier: Apache-2.0
6+
*/
7+
8+
/ {
9+
chosen {
10+
zephyr,camera = &dvp_20pin_interface;
11+
};
12+
};
13+
14+
&dvp_20pin_i2c {
15+
ov7670: ov7670@21 {
16+
compatible = "ovti,ov7670";
17+
reg = <0x21>;
18+
reset-gpios = <&dvp_20pin_gpio DVP_20PIN_PEN GPIO_ACTIVE_HIGH>;
19+
pwdn-gpios = <&dvp_20pin_gpio DVP_20PIN_PDN GPIO_ACTIVE_HIGH>;
20+
21+
port {
22+
ov7670_ep_out: endpoint {
23+
remote-endpoint-label = "dvp_20pin_ep_in";
24+
};
25+
};
26+
};
27+
};
28+
29+
&dvp_20pin_interface {
30+
status = "okay";
31+
32+
port {
33+
dvp_20pin_ep_in: endpoint {
34+
remote-endpoint-label = "ov7670_ep_out";
35+
};
36+
};
37+
};

samples/drivers/video/capture/boards/frdm_mcxn947_cpu0.overlay

Lines changed: 0 additions & 11 deletions
This file was deleted.

0 commit comments

Comments
 (0)