-
Notifications
You must be signed in to change notification settings - Fork 7.6k
Video: addition of the imx335 driver #88825
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
Changes from all commits
7a57a31
cf9aa8e
d64f4dd
83e9d4b
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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) |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 5‑Mpx RGB CMOS image sensor, an inertial motion unit, | ||
and a Time‑of‑Flight sensor. It can be used with any STM32 boards featuring | ||
a MIPI CSI-2® interface with a 22‑pin 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>`_ |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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 { | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. [non-blocking: discussion] I went with such approach at first, but got some recommendation from @ngphibang:
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. First commenting on this one, seems to be the one that could lead to discussions. In our case, this is being used on the STM32N6 for example and the DCMIPP has 3 output endpoints (one for each pipe). So the DT node looks like something like that:
So here, there are actually plenty of information I need in order to "connect" the shield to the dcmipp. I have the feeling that it is actually quite complicated, due to the fact that there are multiple output endpoints which are part of a 2nd port. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ouch, formatting is gone ... sorry about that. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. (I added the formatting back) There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. In this case, I think you could put all the
https://github.com/zephyrproject-rtos/zephyr/blob/main/dts/arm/nxp/nxp_rt11xx.dtsi#L920-#L943 no ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
This would be a convention that drivers take to make it easy for shields... There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Honestly, I still don't really understand why we need to put There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. If we can guarantee that on all board having a RPi 22 pins CSI connector the interface IP "input" endpoint (to which to connect the sensor endpoint) is going to be at:
then there is no need for such label indeed, but can we guarantee that ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I see now. Thank you ! |
||
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 { | ||
josuah marked this conversation as resolved.
Show resolved
Hide resolved
|
||
/* Power the camera module */ | ||
en-module-gpios { | ||
gpio-hog; | ||
gpios = <CSI_22PINS_IO1 GPIO_ACTIVE_HIGH>; | ||
output-high; | ||
}; | ||
}; |
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
# IMX335 | ||
|
||
# Copyright (c) 2025 STMicroelectronics. | ||
# SPDX-License-Identifier: Apache-2.0 | ||
|
||
config VIDEO_IMX335 | ||
bool "IMX335 CMOS digital image sensor" | ||
select I2C | ||
depends on DT_HAS_SONY_IMX335_ENABLED | ||
default y | ||
help | ||
Enable driver for IMX335 CMOS digital image sensor device |
Uh oh!
There was an error while loading. Please reload this page.