From a459f1dbe8b21571939c1ccb6a8cb8aec9bf46e0 Mon Sep 17 00:00:00 2001 From: Alain Volmat Date: Tue, 6 May 2025 12:32:47 +0200 Subject: [PATCH] video: addition of CSI2 standard data-type defines Add standard data-type macros within the video.h in order to avoid having to redefine them all in each and every CSI based driver. Signed-off-by: Alain Volmat --- include/zephyr/drivers/video.h | 33 +++++++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) diff --git a/include/zephyr/drivers/video.h b/include/zephyr/drivers/video.h index aa8fa6b3dd6..ad94c2c45ed 100644 --- a/include/zephyr/drivers/video.h +++ b/include/zephyr/drivers/video.h @@ -1456,6 +1456,39 @@ static inline unsigned int video_bits_per_pixel(uint32_t pixfmt) } } +/** + * @} + */ + +/** + * @name MIPI CSI2 Data-types + * + * @{ + */ +#define VIDEO_MIPI_CSI2_DT_NULL 0x10 +#define VIDEO_MIPI_CSI2_DT_BLANKING 0x11 +#define VIDEO_MIPI_CSI2_DT_EMBEDDED_8 0x12 +#define VIDEO_MIPI_CSI2_DT_YUV420_8 0x18 +#define VIDEO_MIPI_CSI2_DT_YUV420_10 0x19 +#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_8 0x1c +#define VIDEO_MIPI_CSI2_DT_YUV420_CSPS_10 0x1d +#define VIDEO_MIPI_CSI2_DT_YUV422_8 0x1e +#define VIDEO_MIPI_CSI2_DT_YUV422_10 0x1f +#define VIDEO_MIPI_CSI2_DT_RGB444 0x20 +#define VIDEO_MIPI_CSI2_DT_RGB555 0x21 +#define VIDEO_MIPI_CSI2_DT_RGB565 0x22 +#define VIDEO_MIPI_CSI2_DT_RGB666 0x23 +#define VIDEO_MIPI_CSI2_DT_RGB888 0x24 +#define VIDEO_MIPI_CSI2_DT_RAW6 0x28 +#define VIDEO_MIPI_CSI2_DT_RAW7 0x29 +#define VIDEO_MIPI_CSI2_DT_RAW8 0x2a +#define VIDEO_MIPI_CSI2_DT_RAW10 0x2b +#define VIDEO_MIPI_CSI2_DT_RAW12 0x2c +#define VIDEO_MIPI_CSI2_DT_RAW14 0x2d + +/* User-defined Data-Type range from 0x30 to 0x37 */ +#define VIDEO_MIPI_CSI2_DT_USER(n) (0x30 + (n)) + /** * @} */