Skip to content

Add support for camera on i.MX RT11XX #69810

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 24 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
24 commits
Select commit Hold shift + click to select a range
d159d53
dts: bindings: Add bindings for ov5640 camera
ngphibang Feb 29, 2024
452f69e
drivers: video: Add ov5640 camera driver
ngphibang Feb 29, 2024
e0b9b0d
dts: bindings: video: Add bindings for NXP MIPI CSI-2 Rx
ngphibang Feb 29, 2024
987bba5
drivers: video: Add NXP MIPI CSI-2 Rx driver
ngphibang Feb 29, 2024
964cf95
soc: nxp: imxrt11xx: Configure clocks and muxing for MIPI CSI-2 Rx
ngphibang Jan 30, 2024
1404ceb
soc: nxp: imxrt11xx: Enable camera master clock
ngphibang Jan 30, 2024
9a68dca
modules: mcux: Drop HAS_MCUX_CSI config
ngphibang Apr 10, 2024
2db8a72
drivers: video: csi: Run clang format
ngphibang Feb 29, 2024
cd27425
drivers: video: csi: Fix get_fmt
ngphibang Apr 10, 2024
7df0afe
drivers: video: csi: Drop pixel format config
ngphibang Jan 30, 2024
05dae54
drivers: video: csi: Change sensor dev to source dev
ngphibang Jan 30, 2024
765333a
drivers: video: csi: Add support for i.MX RT11XX
ngphibang Feb 1, 2024
a12f751
boards: nxp: mixmxrt1170_evk: Separate i2c6 from csi pin muxing
ngphibang Feb 1, 2024
44828bf
dts: arm: nxp: Add devicetree node for MIPI CSI-2 Rx
ngphibang Jan 30, 2024
a53cf71
boards: shields: Add shield for ov5640 camera module
ngphibang Mar 4, 2024
22bc263
boards: nxp: mixmxrt1064_evk: Drop camera sensor related stuffs
ngphibang Jan 31, 2024
503540a
boards: shields: Add shield for mt9m114 camera module
ngphibang Mar 4, 2024
74f4718
samples: video: capture: Increase video buffer size for i.MX RT11XX
ngphibang Mar 1, 2024
e9e1e6e
samples: video: capture: Run clang-format
ngphibang Feb 13, 2024
ab970e9
samples: video: capture: Use a chosen node for camera
ngphibang Jan 31, 2024
22e81a6
samples: video: capture: Display captured frames on screen
ngphibang Feb 1, 2024
83094db
samples: video: capture: Update documents and tests
ngphibang Mar 13, 2024
41f5802
tests: drivers: build_all: video: Add entry for ov5640
ngphibang Mar 4, 2024
1325e3e
boards: nxp: mimxrt1170_evk: Enable video feature
ngphibang Mar 13, 2024
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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 = &csi;
};
};

&zephyr_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>;
};
};
};
};

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

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

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

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

zephyr_cam_i2c: &lpi2c6 {};
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems board specific and probably belongs in the board overlay file.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yes, it is pointed out by Daniel and I addressed it in the split PR.


zephyr_mipi_csi: &mipi_csi2rx {};