[1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
diff mbox series

Message ID ioJ8nPXN2MBNRgT4B5U28pjyL8KbNNuVXRxABp3f4rV29EizfJc_CM41sGVZGFgKmk2WkpqUGm1si06zKfhXiJmqs2eJwtQFpUYAdB5uaN0=@proton.me
State New
Headers show
Series
  • [1/3] libcamera: camera_sensor_properties: Add IMX582, IMX586 and OV8856
Related show

Commit Message

j4niwzis Aug. 2, 2026, 1:59 p.m. UTC
All three are on the Xiaomi Mi 9T: the IMX582 is its wide camera, the OV8856
its telephoto one, and the IMX586 is the same silicon as the IMX582 with phase
detection, described by the same driver.

Without an entry the unit cell falls back to one micrometre, which throws off
every field of view calculation.  The pitch is 0.8 um for the quad bayer 48
megapixel Sony parts and 1.12 um for the OV8856.

The test pattern numbering of the Sony parts is the MIPI CCS one implemented
by their register 0x0600; the OV8856 exposes the two bar patterns of its
register 0x5e00, the same its sibling the OV8858 does.

Signed-off-by: j4niwzis <j4niwzis@proton.me>
---

Patch
diff mbox series

diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp
--- a/src/libcamera/sensor/camera_sensor_properties.cpp
+++ b/src/libcamera/sensor/camera_sensor_properties.cpp
@@ -325,6 +325,38 @@ 
 				.hblankDelay = 3
 			},
 		} },
+		{ "imx582", {
+			.unitCellSize = { 800, 800 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+				{ controls::draft::TestPatternModeColorBars, 2 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
+				{ controls::draft::TestPatternModePn9, 4 },
+			},
+			.sensorDelays = {
+				.exposureDelay = 2,
+				.gainDelay = 2,
+				.vblankDelay = 3,
+				.hblankDelay = 3
+			},
+		} },
+		{ "imx586", {
+			.unitCellSize = { 800, 800 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeSolidColor, 1 },
+				{ controls::draft::TestPatternModeColorBars, 2 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 3 },
+				{ controls::draft::TestPatternModePn9, 4 },
+			},
+			.sensorDelays = {
+				.exposureDelay = 2,
+				.gainDelay = 2,
+				.vblankDelay = 3,
+				.hblankDelay = 3
+			},
+		} },
 		{ "imx662", {
 			.unitCellSize = { 2900, 2900 },
 			.testPatternModes = {},
@@ -495,6 +527,15 @@ 
 				.hblankDelay = 2
 			},
 		} },
+		{ "ov8856", {
+			.unitCellSize = { 1120, 1120 },
+			.testPatternModes = {
+				{ controls::draft::TestPatternModeOff, 0 },
+				{ controls::draft::TestPatternModeColorBars, 1 },
+				{ controls::draft::TestPatternModeColorBarsFadeToGray, 2 },
+			},
+			.sensorDelays = { },
+		} },
 		{ "ov8858", {
 			.unitCellSize = { 1120, 1120 },
 			.testPatternModes = {