Skip to content

Commit

Permalink
boards: shields: Add a shield for DVP FPC-24 mt9m114 camera modules
Browse files Browse the repository at this point in the history
Add a shield for DVP FPC 24-pins mt9m114 camera modules. These camera
modules are supported on i.MX RT10xx series, for example.

(cherry picked from commit c23132a)

Original-Signed-off-by: Phi Bang Nguyen <phibang.nguyen@nxp.com>
GitOrigin-RevId: c23132a
Change-Id: Ia661d27fadb85ce1eb20df55c0d1211b8ed885e2
Reviewed-on: https://chromium-review.googlesource.com/c/chromiumos/third_party/zephyr/+/5591127
Commit-Queue: Fabio Baltieri <fabiobaltieri@google.com>
Reviewed-by: Fabio Baltieri <fabiobaltieri@google.com>
Tested-by: ChromeOS Prod (Robot) <chromeos-ci-prod@chromeos-bot.iam.gserviceaccount.com>
  • Loading branch information
ngphibang authored and Chromeos LUCI committed Jun 4, 2024
1 parent d3f3f0c commit 77c403e
Show file tree
Hide file tree
Showing 5 changed files with 144 additions and 0 deletions.
4 changes: 4 additions & 0 deletions boards/nxp/mimxrt1064_evk/mimxrt1064_evk.dts
Original file line number Diff line number Diff line change
Expand Up @@ -342,3 +342,7 @@ zephyr_udc0: &usb1 {
pinctrl-0 = <&pinmux_swo>;
pinctrl-names = "default";
};

dvp_fpc24_i2c: &lpi2c1 {};

dvp_fpc24_interface: &csi {};
5 changes: 5 additions & 0 deletions boards/shields/dvp_fpc24_mt9m114/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_DVP_FPC24_MT9M114
def_bool $(shields_list_contains,DVP_FPC24_MT9M114)
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

&dvp_fpc24_interface {
source = <&mt9m114>;
};
92 changes: 92 additions & 0 deletions boards/shields/dvp_fpc24_mt9m114/doc/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
.. _dvp_fpc24_mt9m114:

DVP FPC-24 MT9M114 Camera Module
################################

Overview
********

This shield supports mt9m114 camera modules which use a 24-pin FPC connector and a DVP
(Digital Video Port), aka parallel interface. These camera modules are compatible and provided
together with the i.MX RT1050, RT1060 and RT1064 EVKs as specified here `Camera iMXRT`_.

Pins assignment of the DVP FPC-24 MT9M114 camera module
=======================================================

+-------------------+--------------+
| FPC Connector Pin | Function |
+===================+==============+
| 1 | NC |
+-------------------+--------------+
| 2 | AGND |
+-------------------+--------------+
| 3 | SDA |
+-------------------+--------------+
| 4 | AVDD |
+-------------------+--------------+
| 5 | SCL |
+-------------------+--------------+
| 6 | Reset |
+-------------------+--------------+
| 7 | Vsync |
+-------------------+--------------+
| 8 | Powerdown |
+-------------------+--------------+
| 9 | Hsync |
+-------------------+--------------+
| 10 | DVDD |
+-------------------+--------------+
| 11 | DOVDD |
+-------------------+--------------+
| 12 | Data 9 |
+-------------------+--------------+
| 13 | Master Clock |
+-------------------+--------------+
| 14 | Data 8 |
+-------------------+--------------+
| 15 | DGND |
+-------------------+--------------+
| 16 | Data 7 |
+-------------------+--------------+
| 17 | Pixel Clock |
+-------------------+--------------+
| 18 | Data 6 |
+-------------------+--------------+
| 19 | Data 2 |
+-------------------+--------------+
| 20 | Data 5 |
+-------------------+--------------+
| 21 | Data 3 |
+-------------------+--------------+
| 22 | Data 4 |
+-------------------+--------------+
| 23 | Data 1 |
+-------------------+--------------+
| 24 | Data 0 |
+-------------------+--------------+


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

This shield can only be used with a board which provides a configuration for a 24-pins FPC
connector with DVP (parallel) interface, such as the i.MX RT1050, RT1060, RT1064 EVKs.

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

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

.. zephyr-app-commands::
:zephyr-app: samples/subsys/video/capture
:board: mimxrt1064_evk
:shield: dvp_fpc24_mt9m114
:goals: build

References
**********

.. target-notes::

.. _Camera iMXRT:
https://community.nxp.com/t5/i-MX-RT-Knowledge-Base/Connecting-camera-and-LCD-to-i-MX-RT-EVKs/ta-p/1122183
34 changes: 34 additions & 0 deletions boards/shields/dvp_fpc24_mt9m114/dvp_fpc24_mt9m114.overlay
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
/*
* Copyright 2024 NXP
*
* SPDX-License-Identifier: Apache-2.0
*/

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

&dvp_fpc24_i2c {
mt9m114: mt9m114@48 {
compatible = "aptina,mt9m114";
reg = <0x48>;

port {
mt9m114_ep_out: endpoint {
remote-endpoint = <&dfi_ep_in>;
};
};
};
};

&dvp_fpc24_interface {
status = "okay";

port {
dfi_ep_in: endpoint {
remote-endpoint = <&mt9m114_ep_out>;
};
};
};

0 comments on commit 77c403e

Please sign in to comment.