On 3/13/24 08:25, Sakari Ailus wrote:
Add a media bus code for ov2740 camera sensor embedded data and document
it.
Signed-off-by: Sakari Ailus <sakari.ailus@xxxxxxxxxxxxxxx>
Reviewed-by: Julien Massot <julien.massot@xxxxxxxxxxxxx>
---
.../media/v4l/subdev-formats.rst | 66 +++++++++++++++++++
include/uapi/linux/media-bus-format.h | 3 +-
2 files changed, 68 insertions(+), 1 deletion(-)
diff --git a/Documentation/userspace-api/media/v4l/subdev-formats.rst b/Documentation/userspace-api/media/v4l/subdev-formats.rst
index ca4da6a400ff..a875868ed951 100644
--- a/Documentation/userspace-api/media/v4l/subdev-formats.rst
+++ b/Documentation/userspace-api/media/v4l/subdev-formats.rst
@@ -8594,3 +8594,69 @@ This mbus code are only used for "2-byte simplified tagged data format" (code
embedded data format codes.
Also see :ref:`CCS driver documentation <media-ccs-routes>`.
+
+Omnivision OV2740 Embedded Data Format
+^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
+
+The Omnivision OV2740 camera sensor produces the following embedded data format.
+
+.. flat-table:: Omnivision OV2740 Embedded Data Format. Octets at indices marked
+ reserved or unused have been omitted from the table.
+ :header-rows: 1
+
+ * - Byte
+ - Concent description
+ * - 0
+ - Sensor info
+ * - 4
+ - Analogue gain (bits 10--8)
+ * - 5
+ - Analogue gain (bits 7--0)
+ * - 6
+ - Coarse integration time (bits 15--8)
+ * - 7
+ - Coarse integration time (bits 7--0)
+ * - 10
+ - Dpc correction threshold (bits 9--2)
+ * - 15
+ - Output image width (bits 15--8)
+ * - 16
+ - Output image width (bits 7--0)
+ * - 17
+ - Output image height (bits 15--8)
+ * - 18
+ - Output image height (bits 7--0)
+ * - 23
+ - MIPI header revision number
+ * - 31
+ - Vertical (bit 1) and horizontal flip (bit 0)
+ * - 32
+ - Frame duration A
+ * - 33
+ - Frame duration B
+ * - 34
+ - Context count
+ * - 35
+ - Context select
+ * - 54
+ - Data pedestal (bits 9--2)
+ * - 63
+ - Frame average (bits 9--2)
+ * - 64
+ - Digital gain red
+ * - 65
+ - Digital gain red
+ * - 66
+ - Digital gain greenr
+ * - 67
+ - Digital gain greenr
+ * - 68
+ - Digital gain blue
+ * - 69
+ - Digital gain blue
+ * - 70
+ - Digital gain greenb
+ * - 71
+ - Digital gain greenb
+ * - 89
+ - Frame counter
diff --git a/include/uapi/linux/media-bus-format.h b/include/uapi/linux/media-bus-format.h
index 03f7e9ab517b..13e68c2ccb61 100644
--- a/include/uapi/linux/media-bus-format.h
+++ b/include/uapi/linux/media-bus-format.h
@@ -183,7 +183,8 @@
#define MEDIA_BUS_FMT_META_20 0x8006
#define MEDIA_BUS_FMT_META_24 0x8007
-/* Specific metadata formats. Next is 0x9002. */
+/* Specific metadata formats. Next is 0x9003. */
#define MEDIA_BUS_FMT_CCS_EMBEDDED 0x9001
+#define MEDIA_BUS_FMT_OV2740_EMBEDDED 0x9002
#endif /* __LINUX_MEDIA_BUS_FORMAT_H */
--
Julien Massot
Senior Software Engineer
Collabora Ltd.
Platinum Building, St John's Innovation Park, Cambridge CB4 0DS, UK
Registered in England & Wales, no. 5513718