forked from zephyrproject-rtos/zephyr
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
boards: shields: Add shield for NXP ov5640 camera modules
Add a shield for NXP ov5640 camera modules. This shield uses a 44-pin board-to-board connector which is supported on NXP RT1170 and RT1160 EVKs. Signed-off-by: Phi Bang Nguyen <[email protected]>
- Loading branch information
Showing
6 changed files
with
262 additions
and
0 deletions.
There are no files selected for viewing
This file contains 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
This file contains 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
This file contains 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_NXP_BTB44_OV5640 | ||
def_bool $(shields_list_contains,nxp_btb44_ov5640) |
This file contains 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,134 @@ | ||
.. _nxp_btb44_ov5640: | ||
|
||
NXP BTB-44 OV5640 Camera Module | ||
############################### | ||
|
||
Overview | ||
******** | ||
|
||
This shield supports ov5640 camera modules which use a 44-pin board-to-board connector and | ||
a MIPI CSI or DVP (parallel) interface. These camera modules are made specifically for and | ||
provided together with NXP's i.MX RT1160 and RT1170 EVK boards. | ||
|
||
More information about this OV5640 camera module can be found at `Camera iMXRT`_. | ||
|
||
Pins assignment of the NXP board-to-board 44-pin OV5640 camera module | ||
====================================================================== | ||
|
||
+----------------------+--------------------+ | ||
| Camera Connector Pin | Function | | ||
+======================+====================+ | ||
| 1 | AGND | | ||
+----------------------+--------------------+ | ||
| 2 | AF_GND | | ||
+----------------------+--------------------+ | ||
| 3 | STROBE | | ||
+----------------------+--------------------+ | ||
| 4 | AF_VCC | | ||
+----------------------+--------------------+ | ||
| 5 | SDA | | ||
+----------------------+--------------------+ | ||
| 6 | VCMSINK | | ||
+----------------------+--------------------+ | ||
| 7 | SCL | | ||
+----------------------+--------------------+ | ||
| 8 | AVDD | | ||
+----------------------+--------------------+ | ||
| 9 | RESETB | | ||
+----------------------+--------------------+ | ||
| 10 | GPIO1 | | ||
+----------------------+--------------------+ | ||
| 11 | PCLK | | ||
+----------------------+--------------------+ | ||
| 12 | GPIO0 | | ||
+----------------------+--------------------+ | ||
| 13 | VSYNC | | ||
+----------------------+--------------------+ | ||
| 14 | FREX | | ||
+----------------------+--------------------+ | ||
| 15 | HREF | | ||
+----------------------+--------------------+ | ||
| 16 | MIPI_CSI_DP1 / D9 | | ||
+----------------------+--------------------+ | ||
| 17 | PWDN | | ||
+----------------------+--------------------+ | ||
| 18 | MIPI_CSI_DN1 / D8 | | ||
+----------------------+--------------------+ | ||
| 19 | MIPI_CSI_DP1 / D9 | | ||
+----------------------+--------------------+ | ||
| 20 | DGND | | ||
+----------------------+--------------------+ | ||
| 21 | MIPI_CSI_DN1 / D8 | | ||
+----------------------+--------------------+ | ||
| 22 | MIPI_CSI_CLKP / D7 | | ||
+----------------------+--------------------+ | ||
| 23 | MIPI_CSI_CLKP / D7 | | ||
+----------------------+--------------------+ | ||
| 24 | MIPI_CSI_CLKN / D6 | | ||
+----------------------+--------------------+ | ||
| 25 | MIPI_CSI_CLKN / D6 | | ||
+----------------------+--------------------+ | ||
| 26 | DGND | | ||
+----------------------+--------------------+ | ||
| 27 | MIPI_CSI_DP0 / D5 | | ||
+----------------------+--------------------+ | ||
| 28 | MIPI_CSI_DP0 / D5 | | ||
+----------------------+--------------------+ | ||
| 29 | MIPI_CSI_DN0 / D4 | | ||
+----------------------+--------------------+ | ||
| 30 | MIPI_CSI_DN0 / D4 | | ||
+----------------------+--------------------+ | ||
| 31 | D3 | | ||
+----------------------+--------------------+ | ||
| 32 | DGND | | ||
+----------------------+--------------------+ | ||
| 33 | D2 | | ||
+----------------------+--------------------+ | ||
| 34 | XCLK | | ||
+----------------------+--------------------+ | ||
| 35 | D1 | | ||
+----------------------+--------------------+ | ||
| 36 | DVDD | | ||
+----------------------+--------------------+ | ||
| 37 | D0 | | ||
+----------------------+--------------------+ | ||
| 38 | DOVDD | | ||
+----------------------+--------------------+ | ||
| 39 | DGND | | ||
+----------------------+--------------------+ | ||
| 40 | DGND | | ||
+----------------------+--------------------+ | ||
| 41 | GND | | ||
+----------------------+--------------------+ | ||
| 42 | GND | | ||
+----------------------+--------------------+ | ||
| 43 | GND | | ||
+----------------------+--------------------+ | ||
| 44 | AF_GND | | ||
+----------------------+--------------------+ | ||
|
||
Requirements | ||
************ | ||
|
||
This shield can only be used with a board which provides a 44-pin board-to-board | ||
connector with MIPI CSI or DVP (parallel) interface where the pinouts are defined | ||
as above, such as i.MX RT1160 and RT1170 EVK boards. | ||
|
||
Programming | ||
*********** | ||
|
||
Set ``-DSHIELD=nxp_btb44_ov5640`` when you invoke ``west build``. For example: | ||
|
||
.. zephyr-app-commands:: | ||
:zephyr-app: samples/subsys/video/capture | ||
:board: mimxrt1170_evk/mimxrt1176/cm7 | ||
:shield: nxp_btb44_ov5640 | ||
: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 |
This file contains 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,48 @@ | ||
/* | ||
* 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 = <&nxp_cam_connector 9 GPIO_ACTIVE_LOW>; | ||
powerdown-gpios = <&nxp_cam_connector 17 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"; | ||
}; |
This file contains 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,33 @@ | ||
# Copyright 2024 NXP | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
description: | | ||
GPIO pins exposed on NXP 44-pin board-to-board camera connector. | ||
The connector layout is depicted below: | ||
42 GND GND 41 | ||
2 AF_GND AGND 1 | ||
4 AF_VCC STROBE 3 | ||
6 VCMSINK SDA 5 | ||
8 AVDD SCL 7 | ||
10 GPIO1 RESETB 9 | ||
12 GPIO0 PCLK 11 | ||
14 FREX VSYNC 13 | ||
16 MIPI_CSI_DP1/D9 HREF 15 | ||
18 MIPI_CSI_DN1/D8 PWDN 17 | ||
20 DGND MIPI_CSI_DP1/D9 19 | ||
22 MIPI_CSI_CLKP/D7 MIPI_CSI_DN1/D8 21 | ||
24 MIPI_CSI_CLKN/D6 MIPI_CSI_CLKP/D7 23 | ||
26 DGND MIPI_CSI_CLKN/D6 25 | ||
28 MIPI_CSI_DP0/D5 MIPI_CSI_DP0/D5 27 | ||
30 MIPI_CSI_DN0/D4 MIPI_CSI_DN0/D4 29 | ||
32 DGND D3 31 | ||
34 XCLK D2 33 | ||
36 DVDD D1 35 | ||
38 DOVDD D0 37 | ||
40 DGND DGND 39 | ||
44 AF_GND GND 43 | ||
compatible: "nxp,cam-44pins-connector" | ||
|
||
include: [gpio-nexus.yaml, base.yaml] |