[libcamera-devel] [PATCH v2] libipa: Add CameraSensorHelper for IMX258

Umang Jain umang.jain at ideasonboard.com
Thu Jul 22 13:22:50 CEST 2021


Extend the CameraSensorHelper factory with support for the IMX258
sensor found in the Nautilus Chromebook.

The values are read by manually tweaking the IMX258 kernel driver.
The IMX258 kernel driver hints that the sensor may be compatible
with the MIPI CCS specification, as the register set matches.
The values for analog gain constants are obtained by reading the
register indexes, corresponding to the analog gain constants, as
mentioned in MIPI CCS v1.1 specification.

Signed-off-by: Umang Jain <umang.jain at ideasonboard.com>
---
v1 -> v2:
- Revamp commit message. 
- Dave from RPi can confirm these values from the datasheet.
---
 src/ipa/libipa/camera_sensor_helper.cpp | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp
index 709835a8..c43368df 100644
--- a/src/ipa/libipa/camera_sensor_helper.cpp
+++ b/src/ipa/libipa/camera_sensor_helper.cpp
@@ -295,6 +295,16 @@ public:
 };
 REGISTER_CAMERA_SENSOR_HELPER("imx219", CameraSensorHelperImx219)
 
+class CameraSensorHelperImx258 : public CameraSensorHelper
+{
+public:
+        CameraSensorHelperImx258()
+        {
+                analogueGainConstants_ = { AnalogueGainLinear, 0, 512, -1, 512 };
+        }
+};
+REGISTER_CAMERA_SENSOR_HELPER("imx258", CameraSensorHelperImx258)
+
 class CameraSensorHelperOv5670 : public CameraSensorHelper
 {
 public:
-- 
2.31.0



More information about the libcamera-devel mailing list