[PATCH v12 86/86] media: bcm2835-unicam: Support generic raw formats

Sakari Ailus
2026-04-09T20:15:22Z

Add support for 8-bit unpacked and 10-, 12- and 14-bit packed generic raw
formats.

Signed-off-by: Sakari Ailus <sakari.ailus@linux.intel.com>
---
.../media/platform/broadcom/bcm2835-unicam.c | 27 +++++++++++++++++++
1 file changed, 27 insertions(+)

diff --git a/drivers/media/platform/broadcom/bcm2835-unicam.c b/drivers/media/platform/broadcom/bcm2835-unicam.c
index 38afdf5a32ba..74a6c4820a67 100644
--- a/drivers/media/platform/broadcom/bcm2835-unicam.c
+++ b/drivers/media/platform/broadcom/bcm2835-unicam.c
@@ -452,6 +452,33 @@ static const struct unicam_format_info unicam_image_formats[] = {
.csi_dt = MIPI_CSI2_DT_RAW14,
.unpack = UNICAM_PUM_UNPACK14,
}, {
+ /* Generic raw formats */
+ .fourcc = V4L2_PIX_FMT_RAW_8,
+ .code = MEDIA_BUS_FMT_RAW_8,
+ .depth = 8,
+ .csi_dt = MIPI_CSI2_DT_RAW8,
+ }, {
+ .fourcc = V4L2_PIX_FMT_RAW_CSI2_10,
+ .unpacked_fourcc = V4L2_PIX_FMT_RAW_16,
+ .code = MEDIA_BUS_FMT_RAW_10,
+ .depth = 10,
+ .csi_dt = MIPI_CSI2_DT_RAW10,
+ .unpack = UNICAM_PUM_UNPACK10,
+ }, {
+ .fourcc = V4L2_PIX_FMT_RAW_CSI2_12,
+ .unpacked_fourcc = V4L2_PIX_FMT_RAW_16,
+ .code = MEDIA_BUS_FMT_RAW_12,
+ .depth = 12,
+ .csi_dt = MIPI_CSI2_DT_RAW12,
+ .unpack = UNICAM_PUM_UNPACK12,
+ }, {
+ .fourcc = V4L2_PIX_FMT_RAW_CSI2_14,
+ .unpacked_fourcc = V4L2_PIX_FMT_RAW_16,
+ .code = MEDIA_BUS_FMT_RAW_14,
+ .depth = 14,
+ .csi_dt = MIPI_CSI2_DT_RAW14,
+ .unpack = UNICAM_PUM_UNPACK14,
+ }, {
/* 16 bit Bayer formats could be supported. */

/* Greyscale formats */
--
2.47.3