Skip to content

Commit

Permalink
boards: shields: Add shield for ov5640 camera module
Browse files Browse the repository at this point in the history
Add a shield for the ov5640 camera module. This camera module is
supported on i.MX RT11xx SoC family.

Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
  • Loading branch information
ngphibang committed May 12, 2024
1 parent be682e2 commit c77649b
Show file tree
Hide file tree
Showing 4 changed files with 126 additions and 0 deletions.
5 changes: 5 additions & 0 deletions boards/shields/wuxi_ov5640/Kconfig.shield
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
# Copyright 2024 NXP
# SPDX-License-Identifier: Apache-2.0

config SHIELD_WUXI_OV5640
def_bool $(shields_list_contains,wuxi_ov5640)
68 changes: 68 additions & 0 deletions boards/shields/wuxi_ov5640/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,68 @@
.. _wuxi_ov5640:

WUXI_OV5640 Camera Module
#########################

Overview
********

This camera module connector comes from Wuxi A-KERR Science & Technology containing
an OV5640 image sensor which provides the full functionality of a single chip 5
megapixel (2592x1944) camera using OmniBSI™ technology in a small footprint package.

More information about the OV5640 can be found at `OV5640 camera module`_.

This module uses a 42-pin connector with MIPI CSI-2 interface which is available on
NXP i.MX RT11XX series.

Pins assignment of the Wuxi OV5640 camera module connector
==========================================================

+-----------------------+------------------------+
| Camera Connector Pin | Function |
+=======================+========================+
| 5 | I2C_SDA |
+-----------------------+------------------------+
| 7 | I2C_SCL |
+-----------------------+------------------------+
| 9 | RSTB_CTL |
+-----------------------+------------------------+
| 17 | PWND_CTL |
+-----------------------+------------------------+
| 16 | MIPI_CSI_DP1 |
+-----------------------+------------------------+
| 18 | MIPI_CSI_DN1 |
+-----------------------+------------------------+
| 22 | MIPI_CSI_CLKP |
+-----------------------+------------------------+
| 24 | MIPI_CSI_CLKN |
+-----------------------+------------------------+
| 28 | MIPI_CSI_DP0 |
+-----------------------+------------------------+
| 30 | MIPI_CSI_DN0 |
+-----------------------+------------------------+

Requirements
************

This shield can only be used with a board which provides a configuration
for a 42-pin connector with MIPI CSI interface, such as i.MX RT1170-EVK.

Programming
***********

Set ``-DSHIELD=wuxi_ov5640`` when you invoke ``west build``. For example:

.. zephyr-app-commands::
:zephyr-app: samples/subsys/video/capture
:board: mimxrt1170_evk/mimxrt1176/cm7
:shield: wuxi_ov5640
:goals: build

References
**********

.. target-notes::

.. _OV5640 camera module:
https://cdn.sparkfun.com/datasheets/Sensors/LightImaging/OV5640_datasheet.pdf
47 changes: 47 additions & 0 deletions boards/shields/wuxi_ov5640/wuxi_ov5640.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

/{
chosen {
zephyr,camera = &nxp_csi;
};
};

&nxp_cam_i2c {
status = "okay";

ov5640: ov5640@3c {
compatible = "ovti,ov5640";
reg = <0x3c>;
reset-gpios = <&gpio11 15 GPIO_ACTIVE_LOW>;
powerdown-gpios = <&gpio9 25 GPIO_ACTIVE_HIGH>;

port {
ov5640_ep_out: endpoint {
remote-endpoint = <&mipi_csi2rx_ep_in>;
};
};
};
};

&nxp_mipi_csi {
status = "okay";
sensor = <&ov5640>;

ports {
port@1 {
reg = <1>;

mipi_csi2rx_ep_in: endpoint {
remote-endpoint = <&ov5640_ep_out>;
};
};
};
};

&nxp_csi {
status = "okay";
};
6 changes: 6 additions & 0 deletions dts/arm/nxp/nxp_rt11xx.dtsi
Original file line number Diff line number Diff line change
Expand Up @@ -1214,3 +1214,9 @@
*/
status = "disabled";
};

nxp_cam_i2c: &lpi2c6 {};

nxp_mipi_csi: &mipi_csi2rx {};

nxp_csi: &csi {};

0 comments on commit c77649b

Please sign in to comment.