From patchwork Tue Apr 2 08:29:24 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Umang Jain X-Patchwork-Id: 13613552 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 51DE5CD1284 for ; Tue, 2 Apr 2024 08:29:49 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender: Content-Transfer-Encoding:Content-Type:List-Subscribe:List-Help:List-Post: List-Archive:List-Unsubscribe:List-Id:Cc:To:MIME-Version:Message-Id:Date: Subject:From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:In-Reply-To:References: List-Owner; bh=J96GBZHFwkloWPQeKoZ8fshsS3pGuLrAQc84k+vD+t8=; b=iJY53zRRa+D9R7 oy3RpLCGkA3WbyAC+4H0skreMycLiwK6+JSz2OatJblgZTrEz/tsVA10tGEVXh/OnLaYg15w5NX2R FHV548AJpwfGhZ6ip0S6DWJEeUGQtAzWkYOvDCaYiDWynJ/w6YHIFNCancbc52y9Eo48zC1UWvpTS QaXecOTnqs6DE7UiSNoJW8jQJvX1wXGjE3354uFfHRvgc0fl0xe5hn/DuFq39Y/+JhKesWuCM/qv3 GLxfWVITv0MXuMMD45x2tMHCjZjzXjcvip084oDXKHhaN5agUUE5hXkyhrUJm2ZiIXMT2yHl/1T2i YVVuMa3pdr+YNeQuXyaw==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrZWU-0000000AEL1-3i7N; Tue, 02 Apr 2024 08:29:38 +0000 Received: from perceval.ideasonboard.com ([213.167.242.64]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1rrZWS-0000000AEKG-3JK9 for linux-arm-kernel@lists.infradead.org; Tue, 02 Apr 2024 08:29:38 +0000 Received: from [192.168.1.118] (unknown [103.86.18.232]) by perceval.ideasonboard.com (Postfix) with ESMTPSA id BDF793A2; Tue, 2 Apr 2024 10:28:53 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/simple; d=ideasonboard.com; s=mail; t=1712046537; bh=GmMefZhlVWs8UvewqAUM1vNKBbI39elTksK1z5S6rLU=; h=From:Subject:Date:To:Cc:From; b=DIF5AyiYT4EivV1CtPYpxPhpEmutiW4KpHyRMYUeH6lcOpOvE7Z6c7lCrzsO3YSLi +KoG58LtEYnCutQvRi4ou9jydno1/f4KzaGYkoQXEjQq58c0fhA+M613Wyo0/fqjKY DCf2HNf9rcAAmInv0gLdiZ3lDkn6zziDF8CcV1H8= From: Umang Jain Subject: [PATCH 0/3] media: i2c: Add imx283 camera sensor driver Date: Tue, 02 Apr 2024 13:59:24 +0530 Message-Id: <20240402-kernel-name-extraversion-v1-0-57bb38de841b@ideasonboard.com> MIME-Version: 1.0 X-B4-Tracking: v=1; b=H4sIAOTBC2YC/x3MQQqDMBBG4avIrB2YhCykVxEXqf5th2qUiYgQv Ltpl2/xvUIZpsj0aAoZDs26phqubWj8xPQG61SbvPggQTx/YQkzp7iAce4WD9gPsX9KN4XgIN1 IlW+Gl57/dT9c1w3H4ZN1agAAAA== To: Kieran Bingham , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , NXP Linux Team , Sakari Ailus Cc: linux-media@vger.kernel.org, devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, Umang Jain , Rob Herring , Laurent Pinchart X-Mailer: b4 0.12.3 X-Developer-Signature: v=1; a=ed25519-sha256; t=1712046569; l=2930; i=umang.jain@ideasonboard.com; s=20240402; h=from:subject:message-id; bh=GmMefZhlVWs8UvewqAUM1vNKBbI39elTksK1z5S6rLU=; b=wJhfjQoGUEQM/tsYN9p8rSqjUzpRLbnQh2ssgOiLkkfXqdZAIvktl//HiRChksi7vqtTqqa5I wA7FEYLXCTdCHC87kW3ZRfRM+FiQGODGBihF50/ot1swYdGHomB/pfI X-Developer-Key: i=umang.jain@ideasonboard.com; a=ed25519; pk=8K9qSAtc2dNF4Ax+jYC0w9dlfptU7wxPBQwOy0nxRoc= X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240402_012937_142433_DCE82406 X-CRM114-Status: GOOD ( 11.37 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org Add a v4l2 subdevice driver for the Sony IMX283 image sensor. The IMX283 is a 20MP Diagonal 15.86 mm (Type 1) CMOS Image Sensor with Square Pixel for Color Cameras. The following features are supported: - Manual exposure an gain control support - vblank/hblank/link freq control support - Test pattern support control - Arbitrary horizontal and vertical cropping - Supported resolution: - 5472x3648 @ 20fps (SRGGB12) - 5472x3648 @ 25fps (SRGGB10) - 2736x1824 @ 50fps (SRGGB12) The driver is tested on mainline branch v6.8-rc2 on IMX8MP Debix-SOM-A. Additional testing has been done on RPi5 with the downstream BSP. Changes in v4: - fix 32-bit build error around u64 divisions (use do_div) - Fix hmax default and minimum values Changes in v3: - fix headers includes - Improve #define(s) readability - Drop __func__ from error logs - Use HZ_PER_MHZ instead of MEGA - mdsel* variables should be u8 - Use container_of_const() instead of container_of() - Use clamp() used of clamp_t variant - Use streams API imx283_{enable|disable}_streams (**NOTE**) - Properly fix PM runtime handling (pm_ptr(), DEFINE_RUNTIME_DEV_PM_OPS, imx283_runtime_suspend, imx283_runtime_resume) - Fix format modifiers, signed-ness at various places changes in v2 (summary): - Use u32 wherever possible - Use MEGA macro instead of self defined MHZ() macro - Properly refine regs using CCI - Drop tracking of current mode. Shifted to infer from active state directly. (Laurent's review) - Cont. from above: Pass the struct imx283_mode to functions whereever required. - Remove unused comments - Remove custom mutex. Use control handler one instead. - Drop imx283_reset_colorspace() and inline - Set colorspace field properly (drop _DEFAULTS) - Use __maybe_unused for imx283_power_on() and imx283_power_off() - Store controls v4l2_ctrl handles for those required, not all. - Drop imx283_free_controls(). Use v4l2_ctrl_handler_free - fix reset-gpios handling and add it to DT schema - fix data-lanes property in DT schema - fix IMX283 Kconfig - Remove unused macros - Alphabetical case consistency Signed-off-by: Umang Jain --- Kieran Bingham (1): media: i2c: Add imx283 camera sensor driver Umang Jain (2): media: dt-bindings: media: Add bindings for IMX283 fixups .../devicetree/bindings/media/i2c/sony,imx283.yaml | 107 ++ MAINTAINERS | 9 + drivers/media/i2c/Kconfig | 10 + drivers/media/i2c/Makefile | 1 + drivers/media/i2c/imx283.c | 1605 ++++++++++++++++++++ 5 files changed, 1732 insertions(+) --- base-commit: 54ee11761885407056f4ca60309739e2db6b02dc change-id: 20240402-kernel-name-extraversion-2b08d441e08c Best regards,