-
Notifications
You must be signed in to change notification settings - Fork 7.4k
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
ngphibang
wants to merge
24
commits into
zephyrproject-rtos:main
from
nxp-zephyr:support_camera_rt11xx
Closed
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 452f69e
drivers: video: Add ov5640 camera driver
ngphibang e0b9b0d
dts: bindings: video: Add bindings for NXP MIPI CSI-2 Rx
ngphibang 987bba5
drivers: video: Add NXP MIPI CSI-2 Rx driver
ngphibang 964cf95
soc: nxp: imxrt11xx: Configure clocks and muxing for MIPI CSI-2 Rx
ngphibang 1404ceb
soc: nxp: imxrt11xx: Enable camera master clock
ngphibang 9a68dca
modules: mcux: Drop HAS_MCUX_CSI config
ngphibang 2db8a72
drivers: video: csi: Run clang format
ngphibang cd27425
drivers: video: csi: Fix get_fmt
ngphibang 7df0afe
drivers: video: csi: Drop pixel format config
ngphibang 05dae54
drivers: video: csi: Change sensor dev to source dev
ngphibang 765333a
drivers: video: csi: Add support for i.MX RT11XX
ngphibang a12f751
boards: nxp: mixmxrt1170_evk: Separate i2c6 from csi pin muxing
ngphibang 44828bf
dts: arm: nxp: Add devicetree node for MIPI CSI-2 Rx
ngphibang a53cf71
boards: shields: Add shield for ov5640 camera module
ngphibang 22bc263
boards: nxp: mixmxrt1064_evk: Drop camera sensor related stuffs
ngphibang 503540a
boards: shields: Add shield for mt9m114 camera module
ngphibang 74f4718
samples: video: capture: Increase video buffer size for i.MX RT11XX
ngphibang e9e1e6e
samples: video: capture: Run clang-format
ngphibang ab970e9
samples: video: capture: Use a chosen node for camera
ngphibang 22e81a6
samples: video: capture: Display captured frames on screen
ngphibang 83094db
samples: video: capture: Update documents and tests
ngphibang 41f5802
tests: drivers: build_all: video: Add entry for ov5640
ngphibang 1325e3e
boards: nxp: mimxrt1170_evk: Enable video feature
ngphibang File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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"; | ||
}; |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -1230,3 +1230,7 @@ | |
*/ | ||
status = "disabled"; | ||
}; | ||
|
||
zephyr_cam_i2c: &lpi2c6 {}; | ||
|
||
zephyr_mipi_csi: &mipi_csi2rx {}; |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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.