Skip to content

Commit 75d03a6

Browse files
committed
boards: shields: introduce the Raspberry Pi Camera Module 2
Add a shield for the Raspberry Pi Camera Module 2, featuring the IMX219 sensor. This module is suitable for bot the "normal" and "No IR" (no infra-red) variants and uses the 15-pin connector definition newly introduced. Signed-off-by: Josuah Demangeon <me@josuah.net>
1 parent 1e3fca5 commit 75d03a6

File tree

6 files changed

+112
-0
lines changed

6 files changed

+112
-0
lines changed
Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
# Copyright (c) 2025 tinyVision.ai Inc.
2+
# SPDX-License-Identifier: Apache-2.0
3+
4+
config SHIELD_RASPBERRY_PI_CAMERA_MODULE_2
5+
def_bool $(shields_list_contains,raspberry_pi_camera_module_2)
Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
.. _raspberry_pi_camera_module_2:
2+
3+
ST B-CAMS-IMX-MB1854
4+
####################
5+
6+
Overview
7+
********
8+
9+
The Raspberry Pi camera module 2 provides a Sony IMX219 rolling shutter in a module featuring a
10+
15-pin FFC connector popularized by Raspberry Pi, present on a wide range of boards.
11+
12+
The NoIR variant is the same as the normal variant, except with the infra-red filter removed.
13+
14+
.. figure:: rpi_cam_v2_normal.jpg
15+
:width: 500px
16+
:align: center
17+
:alt: Raspberry Pi Camera Module 2
18+
19+
Raspberry Pi Camera Module 2, normal variant (Credit: Raspberry Pi.)
20+
21+
.. figure:: rpi_cam_v2_noir.jpg
22+
:width: 500px
23+
:align: center
24+
:alt: Raspberry Pi Camera Module 2 NoIR
25+
26+
Raspberry Pi Camera Module 2, NoIR variant (Credit: Raspberry Pi.)
27+
28+
Requirements
29+
************
30+
31+
The camera module is compatible with all boards featuring a 15 pins FFC connector and the necessary
32+
devicetree definitions.
33+
34+
Usage
35+
*****
36+
37+
The shield can be used in any application by setting ``SHIELD`` to
38+
``raspberry_pi_camera_module_2`` for boards with the necessary device tree node labels:
39+
40+
.. zephyr-app-commands::
41+
:zephyr-app: samples/drivers/video/capture
42+
:board: stm32n6570_dk
43+
:shield: raspberry_pi_camera_module_2
44+
:goals: build
45+
46+
References
47+
**********
48+
49+
- `Product page <https://www.raspberrypi.com/products/camera-module-v2/>`_
50+
51+
- `Product page (NoIR) <https://www.raspberrypi.com/products/pi-noir-camera-v2/>`_
52+
53+
- `Datasheet <https://datasheets.raspberrypi.com/camera/camera-module-2-schematics.pdf>`_
54+
55+
- `Mechanical drawing <https://datasheets.raspberrypi.com/camera/camera-module-2-mechanical-drawing.pdf>`_
Loading
Loading
Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
/*
2+
* Copyright (c) 2025 tinyVision.ai Inc.
3+
*
4+
* SPDX-License-Identifier: Apache-2.0
5+
*/
6+
7+
#include <zephyr/dt-bindings/gpio/raspberrypi-csi-15pins-connector.h>
8+
#include <zephyr/dt-bindings/video/video-interfaces.h>
9+
10+
/ {
11+
chosen {
12+
zephyr,camera = &csi_15pins_capture_port;
13+
};
14+
15+
imx219_input_clock: imx219-input-clock {
16+
compatible = "fixed-clock";
17+
clock-frequency = <24000000>;
18+
#clock-cells = <0>;
19+
};
20+
};
21+
22+
&csi_15pins_interface {
23+
status = "okay";
24+
};
25+
26+
&csi_15pins_ep_in {
27+
remote-endpoint-label = "imx219_ep_out";
28+
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
29+
data-lanes = <1 2>;
30+
};
31+
32+
&csi_15pins_i2c {
33+
imx219: imx219@1a {
34+
compatible = "sony,imx219";
35+
clocks = <&imx219_input_clock>;
36+
reg = <0x1a>;
37+
38+
port {
39+
imx219_ep_out: endpoint {
40+
remote-endpoint-label = "csi_15pins_ep_in";
41+
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
42+
data-lanes = <1 2>;
43+
};
44+
};
45+
};
46+
};
Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
shield:
2+
name: raspberry_pi_camera_module_2
3+
full_name: Raspberry Pi Camera Module 2
4+
vendor: Raspberry Pi
5+
supported_features:
6+
- video

0 commit comments

Comments
 (0)