diff --git a/boards/shields/st_mb1897_cam/Kconfig.shield b/boards/shields/st_mb1897_cam/Kconfig.shield new file mode 100644 index 00000000000..cee07707133 --- /dev/null +++ b/boards/shields/st_mb1897_cam/Kconfig.shield @@ -0,0 +1,6 @@ +# Copyright (c) 2025 STMicroelectronics + +# SPDX-License-Identifier: Apache-2.0 + +config SHIELD_ST_MB1897_CAM + def_bool $(shields_list_contains,st_mb1897_cam) diff --git a/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.conf b/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.conf new file mode 100644 index 00000000000..e3796594377 --- /dev/null +++ b/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.conf @@ -0,0 +1,3 @@ +CONFIG_VIDEO_STM32_DCMIPP_SENSOR_PIXEL_FORMAT="RGBP" +CONFIG_VIDEO_STM32_DCMIPP_SENSOR_WIDTH=640 +CONFIG_VIDEO_STM32_DCMIPP_SENSOR_HEIGHT=480 diff --git a/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.overlay b/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.overlay new file mode 100644 index 00000000000..1c41c5b9790 --- /dev/null +++ b/boards/shields/st_mb1897_cam/boards/stm32mp135f_dk.overlay @@ -0,0 +1,13 @@ +/* + * Copyright (c) 2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +&mipid02 { + status = "okay"; +}; + +&mco1 { + status = "okay"; +}; diff --git a/boards/shields/st_mb1897_cam/doc/index.rst b/boards/shields/st_mb1897_cam/doc/index.rst new file mode 100644 index 00000000000..5ff70361352 --- /dev/null +++ b/boards/shields/st_mb1897_cam/doc/index.rst @@ -0,0 +1,38 @@ +.. _st_mb1897_cam: + +ST_MB1897_CAM +############# + +Overview +******** + +The STM32MP135F discovery board is delivered with a CSI camera module +connected to the STM32MP135F-DK board via a 15pins FFC connector. +The camera module board (MB1897) embeds a Galaxycore GC2145 CSI sensor. + +.. figure:: st_mb1897_cam.webp + :align: center + :alt: ST-MB1897-CAM + + MB1897 Image (Credit: STMicroelectronics.) + +Requirements +************ + +The camera module bundle is compatible with STM32 Discovery kits and +Evaluation boards featuring a 15 pins FFC connector, such as the STM32MP13 +Discovery kit. + +Usage +***** + +The shield can be used in any application by setting ``SHIELD`` to +``st_mb1897_cam`` for boards with the necessary device tree node labels. + +Set ``--shield "st_mb1897_cam"`` when you invoke ``west build``. For example: + +.. zephyr-app-commands:: + :zephyr-app: samples/drivers/video/capture + :board: stm32mp135f_dk + :shield: st_mb1897_cam + :goals: build diff --git a/boards/shields/st_mb1897_cam/doc/st_mb1897_cam.webp b/boards/shields/st_mb1897_cam/doc/st_mb1897_cam.webp new file mode 100644 index 00000000000..b3e6153471c Binary files /dev/null and b/boards/shields/st_mb1897_cam/doc/st_mb1897_cam.webp differ diff --git a/boards/shields/st_mb1897_cam/shield.yml b/boards/shields/st_mb1897_cam/shield.yml new file mode 100644 index 00000000000..d4d37829117 --- /dev/null +++ b/boards/shields/st_mb1897_cam/shield.yml @@ -0,0 +1,6 @@ +shield: + name: st_mb1897_cam + full_name: ST MB1897 camera module + vendor: st + supported_features: + - video diff --git a/boards/shields/st_mb1897_cam/st_mb1897_cam.overlay b/boards/shields/st_mb1897_cam/st_mb1897_cam.overlay new file mode 100644 index 00000000000..61dc9cedb06 --- /dev/null +++ b/boards/shields/st_mb1897_cam/st_mb1897_cam.overlay @@ -0,0 +1,43 @@ +/* + * Copyright (c) 2025 STMicroelectronics + * + * SPDX-License-Identifier: Apache-2.0 + */ + +#include +#include + +/ { + chosen { + zephyr,camera = &csi_capture_port; + }; +}; + +&csi_interface { + status = "okay"; +}; + +&csi_ep_in { + remote-endpoint-label = "gc2145_ep_out"; + bus-type = ; + data-lanes = <1 2>; +}; + +&csi_i2c { + status = "okay"; + + gc2145: camera@3c { + compatible = "galaxycore,gc2145"; + reg = <0x3c>; + pwdn-gpios = <&csi_connector CSI_IO1 GPIO_ACTIVE_LOW>; + reset-gpios = <&csi_connector CSI_IO0 GPIO_ACTIVE_LOW>; + + port { + gc2145_ep_out: endpoint { + remote-endpoint-label = "csi_ep_in"; + data-lanes = <1 2>; + bus-type = ; + }; + }; + }; +};