shields: st_b_cams_imx_mb1854: add imx335 based MB1854 board shield

Introduce the B_CAMS_IMX camera shield for STM32 which embeds
a IMX335 camera sensor.

Signed-off-by: Alain Volmat <alain.volmat@foss.st.com>
This commit is contained in:
Alain Volmat 2025-04-02 14:00:00 +02:00 committed by Benjamin Cabé
commit d0240abb2a
4 changed files with 113 additions and 0 deletions

View file

@ -0,0 +1,5 @@
# Copyright (c) 2025 STMicroelectronics.
# SPDX-License-Identifier: Apache-2.0
config SHIELD_ST_B_CAMS_IMX_MB1854
def_bool $(shields_list_contains,st_b_cams_imx_mb1854)

View file

@ -0,0 +1,51 @@
.. _st_b_cams_imx_mb1854:
ST B-CAMS-IMX-MB1854
####################
Overview
********
The B-CAMS-IMX camera module provides a compelling hardware set to
handle multiple computer vision scenarios and use cases. It features
a high-resolution 5Mpx RGB CMOS image sensor, an inertial motion unit,
and a TimeofFlight sensor. It can be used with any STM32 boards featuring
a MIPI CSI-2® interface with a 22pin FFC connector to enable full-featured
computer vision on STM32 microcontrollers and microprocessors easily.
.. figure:: st_b_cams_imx.webp
:width: 600px
:align: center
:alt: B-CAMS-IMX-MB1854
B-CAMS-IMX MB1854 Image (Credit: STMicroelectronics.)
Requirements
************
The camera module bundle is compatible with all STM32 Discovery kits and
Evaluation boards featuring a 22 pins FFC connector, such as the STM32N6570_DK
Discovery kit.
Usage
*****
The shield can be used in any application by setting ``SHIELD`` to
``st_b_cams_imx_mb1854`` for boards with the necessary device tree node labels.
Set ``--shield "st_b_cams_imx_mb1854"`` when you invoke ``west build``. For example:
.. zephyr-app-commands::
:zephyr-app: samples/drivers/video/capture
:board: stm32n6570_dk
:shield: st_b_cams_imx_mb1854
:goals: build
References
**********
- `Product page <https://www.st.com/en/evaluation-tools/b-cams-imx.html>`_
- `Databrief <https://www.st.com/resource/en/data_brief/b-cams-imx.pdf>`_
- `User manual <https://www.st.com/resource/en/user_manual/um3354-camera-module-bundle-for-stm32-boards-stmicroelectronics.pdf>`_

Binary file not shown.

After

Width:  |  Height:  |  Size: 34 KiB

View file

@ -0,0 +1,57 @@
/*
* Copyright (c) 2025 STMicroelectronics.
*
* SPDX-License-Identifier: Apache-2.0
*
*/
#include <zephyr/dt-bindings/gpio/raspberrypi-csi-22pins-connector.h>
#include <zephyr/dt-bindings/video/video-interfaces.h>
/ {
chosen {
zephyr,camera = &csi_22pins_capture_port;
};
imx335_input_clock: imx335-input-clock {
compatible = "fixed-clock";
clock-frequency = <24000000>;
#clock-cells = <0>;
};
};
&csi_22pins_interface {
status = "okay";
};
&csi_22pins_ep_in {
remote-endpoint-label = "imx335_ep_out";
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
data-lanes = <1 2>;
};
&csi_22pins_i2c {
imx335: camera@1a {
compatible = "sony,imx335";
clocks = <&imx335_input_clock>;
reg = <0x1a>;
reset-gpios = <&csi_22pins_connector CSI_22PINS_IO0 GPIO_ACTIVE_LOW>;
port {
imx335_ep_out: endpoint {
remote-endpoint-label = "csi_22pins_ep_in";
bus-type = <VIDEO_BUS_TYPE_CSI2_DPHY>;
data-lanes = <1 2>;
};
};
};
};
&csi_22pins_connector {
/* Power the camera module */
en-module-gpios {
gpio-hog;
gpios = <CSI_22PINS_IO1 GPIO_ACTIVE_HIGH>;
output-high;
};
};