From patchwork Mon Jul 20 13:07:55 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Naushir Patuck X-Patchwork-Id: 27390 Return-Path: X-Original-To: parsemail@patchwork.libcamera.org Delivered-To: parsemail@patchwork.libcamera.org Received: from lancelot.ideasonboard.com (lancelot.ideasonboard.com [92.243.16.209]) by patchwork.libcamera.org (Postfix) with ESMTPS id 74A31C328C for ; Mon, 20 Jul 2026 13:10:58 +0000 (UTC) Received: from lancelot.ideasonboard.com (localhost [IPv6:::1]) by lancelot.ideasonboard.com (Postfix) with ESMTP id 2228E67E4C; Mon, 20 Jul 2026 15:10:58 +0200 (CEST) Authentication-Results: lancelot.ideasonboard.com; dkim=pass (2048-bit key; unprotected) header.d=raspberrypi.com header.i=@raspberrypi.com header.b="mXvVOSIl"; dkim-atps=neutral Received: from mail-wm1-x329.google.com (mail-wm1-x329.google.com [IPv6:2a00:1450:4864:20::329]) by lancelot.ideasonboard.com (Postfix) with ESMTPS id 5FF7D66177 for ; Mon, 20 Jul 2026 15:10:54 +0200 (CEST) Received: by mail-wm1-x329.google.com with SMTP id 5b1f17b1804b1-49552f516beso803895e9.1 for ; Mon, 20 Jul 2026 06:10:54 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1784553054; x=1785157854; darn=lists.libcamera.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to:content-type; bh=CaSVr6YA68l61S9i4SSmYva/NBR2yVrKfdNfGA7MiA4=; b=mXvVOSIlXiPQtrcZGRw3yDbmMoVVyHkX98fPBnxeoYzOpMcOAoxh6KduT6lcEgU679 jDaD5M8ZAVsm2zsI4aqi/tb+DNB1k3WeoG1689QgUouXQLNsjWGFij0fWGniQLRFsHT1 wnje7C+X+Mq8fyA2DI6WLAx8Uuii/m0N3VeoSik/60aHVfS2V+rR0oknoMVAS6ih3ANZ U9Ys7bnYTf8sJIPXIkpXJyWbbc0Wsp1wqhMUMEyWPCj2rUTmmPOY8/+YeV6UsxShhvpS ju1qVII2zakI4f0H0MyoYRLKKF8ds2Sm9yqPoWt9pPeY4UvJ5t3hW/Qi8IlZON/lZD+U BYXQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1784553054; x=1785157854; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to:content-type; bh=CaSVr6YA68l61S9i4SSmYva/NBR2yVrKfdNfGA7MiA4=; b=hiIHpTUt01p43kc0L7Sr5GpXhCIw992HGVES+ZSLNsGTQxY0hWU4NRZKTcXANUYIqq kb9vLDlAFxsdBjPFy25kA/u8U8Je/FxbiUzH6nFogTwjl3mLo7SBrDxorlaEybbfcmAp MJneuNHGTGwAJ8S1n6Tagq11m3V+f/T5CyC/uya5BFVI4sGXcX/7AM7Cw5qRko1uvIzg qvJJTxQWO9YZYmlsg1HlrDb6IKUshGG4YuaolHtfxnKY1zCwA1YC5T8WJ+My9WvxEie1 u5WpQDagYnV8KLyYV934LptCKZykOP+bT9KBFiv8VDoXjim7MXtSFL8KhYtg5dPiesnO EoAA== X-Gm-Message-State: AOJu0YwMfnLvjpoGsW7Vjwt9MU5a4+CDHyOIaDD0GVdEc9wMweuXuIDy azIl3e2sD8LmlFqKVuxXRZdAwiYYJqmhVCXII2LulGU8bAiccmP2lRmh0Z1v9Z7oz43oJdoczaw Z3kGncfE= X-Gm-Gg: AfdE7cnf7NNLUR+sidBFks2rdg+8XZ2w0LlpE6a2WTwHKoOpa0ZAB5a3wkxDrImktR1 V4zLsxZNDCE+P0IPCNNgvy73u13SmcXFf88kPHEE8FVERzFvXvdFDTqDVJMsUADXJuJuw+CS/sU 8q4D1LGN0/2QlOe/nxnYws+uVjCkxWv4WvBVaCHVUVRGQiFSqNDcvc0hUWCc1rHs77kEZNL3hYN UVvLUBhNexP8NX4KKPr5IkySCr+lxsrmigy2s82asyOqiX+tlAB5bIs/WCuZC3dHGB6eZ6pY3UK YA8hd9IE12S5662BM6cV6XCbZDdu+pgY+CJ70zOlLeHqsnC57o3xTCqq87fKNUlSgKax2yTQMMY ou2Vs2bqMoStTVEsmLFf/9TJwEppfTl6n4RK4ib2Q6AmEou7ikfyIuw7A5GOlvPcUg1Jv61FFVm QtzBWbRCIBY8pyqrbtetPVSB1QL5iWmkdAJzBfoGEC4880aCFL1Ju48hspiSkek+5db/8o4HAp8 kGL4xhPVhEaifAFtKRW1w4Zxy5VFaygs/+qWNjZx/7p71xe0qNtxyIWHPsoXG3/Oq+7OWKqZq+n Dz7KJuhIBQ== X-Received: by 2002:a05:600c:46ca:b0:492:4a7a:e415 with SMTP id 5b1f17b1804b1-4954a3eafb0mr91261775e9.2.1784553053919; Mon, 20 Jul 2026 06:10:53 -0700 (PDT) Received: from naush-dell.pitowers.org ([2a00:1098:3142:1f:e18f:c09d:5247:6bb6]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-4955df9d2f6sm62264585e9.4.2026.07.20.06.10.52 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 20 Jul 2026 06:10:53 -0700 (PDT) From: Naushir Patuck To: libcamera-devel@lists.libcamera.org Cc: Naushir Patuck Subject: [PATCH v1 1/2] libcamera: camera_sensor: Add Sony IMX662 sensor properties and helper Date: Mon, 20 Jul 2026 14:07:55 +0100 Message-ID: <20260720131047.2749510-2-naush@raspberrypi.com> X-Mailer: git-send-email 2.53.0 In-Reply-To: <20260720131047.2749510-1-naush@raspberrypi.com> References: <20260720131047.2749510-1-naush@raspberrypi.com> MIME-Version: 1.0 X-BeenThere: libcamera-devel@lists.libcamera.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: libcamera-devel-bounces@lists.libcamera.org Sender: "libcamera-devel" Add the camera sensor properties and camera helper entry for the Sony IMX662 sensor. Signed-off-by: Naushir Patuck --- src/ipa/libipa/camera_sensor_helper.cpp | 12 ++++++++++++ src/libcamera/sensor/camera_sensor_properties.cpp | 10 ++++++++++ 2 files changed, 22 insertions(+) diff --git a/src/ipa/libipa/camera_sensor_helper.cpp b/src/ipa/libipa/camera_sensor_helper.cpp index 54a88c55bc2d..14d9690c1864 100644 --- a/src/ipa/libipa/camera_sensor_helper.cpp +++ b/src/ipa/libipa/camera_sensor_helper.cpp @@ -642,6 +642,18 @@ public: }; REGISTER_CAMERA_SENSOR_HELPER("imx477", CameraSensorHelperImx477) +class CameraSensorHelperImx662 : public CameraSensorHelper +{ +public: + CameraSensorHelperImx662() + { + /* From datasheet: 0xc8 at 12bits. */ + blackLevel_ = 3200; + gain_ = AnalogueGainExp{ 1.0, expGainDb(0.3) }; + } +}; +REGISTER_CAMERA_SENSOR_HELPER("imx662", CameraSensorHelperImx662) + class CameraSensorHelperImx678 : public CameraSensorHelper { public: diff --git a/src/libcamera/sensor/camera_sensor_properties.cpp b/src/libcamera/sensor/camera_sensor_properties.cpp index 7685524ad189..3672e8f0d79b 100644 --- a/src/libcamera/sensor/camera_sensor_properties.cpp +++ b/src/libcamera/sensor/camera_sensor_properties.cpp @@ -309,6 +309,16 @@ const CameraSensorProperties *CameraSensorProperties::get(const std::string &sen .hblankDelay = 3 }, } }, + { "imx662", { + .unitCellSize = { 2900, 2900 }, + .testPatternModes = {}, + .sensorDelays = { + .exposureDelay = 2, + .gainDelay = 2, + .vblankDelay = 2, + .hblankDelay = 2 + }, + } }, { "imx678", { .unitCellSize = { 2000, 2000 }, .testPatternModes = {},