From patchwork Thu Nov 14 16:01:13 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13875346 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 99A64D68B34 for ; Thu, 14 Nov 2024 16:03:57 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=T7c9J9xmOBZy0E+gA1j8HfGDniMhcLFy7E+lLxJu1Tw=; b=35eFTUwvR2P7Y6ySvLlnd7+cVB 49J45ERLcvTECUjrKCN0qp1hSm9IqqsSd6CAeGOx4zqEG7iko0HSfWh+tdJWnrdclsFfdOqSg9uzc BgQMSz07xAm8XPPw9B9TrYp/nDg7S+TGbV830K27OySkcGDpCXEBZPgKFtkCTPRd8g9qkj8B7m8BV pUZFpCUybR7rePAWCVw4QUDoEPnVkvO1pvY/A4rFwZdf5WLZVR5NeNS2ewezd+bi0kepAC0LO+Ns6 y2vNwlpT0Tw41xARcLe3kXzXOUVPtPB89xudK/ws5mL5CRMATAlWi386qPOivFteKodB2tDUMhnP1 ugrsnVsQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tBcJs-000000001Jw-2mbh; Thu, 14 Nov 2024 16:03:44 +0000 Received: from mail-lf1-x12b.google.com ([2a00:1450:4864:20::12b]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBcHy-000000000h1-0PgI for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2024 16:01:47 +0000 Received: by mail-lf1-x12b.google.com with SMTP id 2adb3069b0e04-53c779ef19cso911120e87.3 for ; Thu, 14 Nov 2024 08:01:45 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1731600104; x=1732204904; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=T7c9J9xmOBZy0E+gA1j8HfGDniMhcLFy7E+lLxJu1Tw=; b=VT5n2XyXXVbKnccn5vOtQ5aoRVd/oeMgQ+yBRb4XDaLjmIeZ9bLUl31egSs4aK+HMT CJXjz3J9PmNa1Ains11phEPfpl8CFZA2K5QKRfWrCKyZlihtVPH6czF0ojKWSwrMicH+ efqI0pfZU7G3XOmxNOlNN8M/PQr2AIdZKSSIMU5CcqSmBbQi7rR7eJkqj9AoHMJ9BHqd Ae+ibdNvNo6ldJ+diGJoZuoCVzccfZth+lnPYpZnDAvAH8SrScr430wfKOu3hlY83Bnp BOabetxMk0iIrLHbrKO2Bgmrcbr4CX55+hx0hhvqRkPod4isCYAXw0j4iWKVIFUz38vL ZkAQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731600104; x=1732204904; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=T7c9J9xmOBZy0E+gA1j8HfGDniMhcLFy7E+lLxJu1Tw=; b=Pqi2Lwev4SCecijrC2sefyTidqcfij4BOlop/2Yo8sDCJorJTkUkdw8MPMmqivW25d J/IhLseAFQ4IVLp3ysfFOwx9WtCXi71tRuTUwdYL1r1pCSQLPgj93bthQ+ww4/XTCrpk n+NauLWscLWJSim+ha8BU9faihHJMm11bMemxF75fkDCURJts/9H2yYESo98YZnuVOYa nKJIuVHve+jR7nZNSAU98s6o23NWJ//zM01/ySvsq69x49kGLSP1MWc9YVS1BZjKWaJb DiEE/6e5iFSIGQkwVFgo438NfAn2rPyzerDsGE4yyOEFLphc5cCDhZzSYx1PYIOLlMsG WUkw== X-Forwarded-Encrypted: i=1; AJvYcCUR6JgI67AjyJKY0v9etZm+fIDQ1Dsa1vro57efc69XGXY5XNQoDxFDFIA1dXRXOyF5D+PcZ3S+04w9NBKYYtai@lists.infradead.org X-Gm-Message-State: AOJu0YyI221vwd/Z8j09tKSxd11clhRMtER80/s9ymTBXhOjKbJRBn/3 ZzkqnVD/RxEWZUUO0qPSnLECfIn0vjmsBFOVv9S+ulwG61ihov3EdNH2ALN6fBgB8WIQxdYcJhk e X-Google-Smtp-Source: AGHT+IH2B2O4sDgX4PQFuQz83D5q69hXTp9OqNeMo5HRiiv9F39wpipZ5EJMNQCetw5Zzb0qXWSGxQ== X-Received: by 2002:a05:6512:3b1f:b0:539:f807:ad93 with SMTP id 2adb3069b0e04-53d9feddd90mr4485395e87.38.1731600103640; Thu, 14 Nov 2024 08:01:43 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-382200fe00esm1139024f8f.42.2024.11.14.08.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 08:01:43 -0800 (PST) From: Dave Stevenson Date: Thu, 14 Nov 2024 16:01:13 +0000 Subject: [PATCH 1/3] media: i2c: imx290: Limit analogue gain according to module MIME-Version: 1.0 Message-Id: <20241114-media-imx290-imx462-v1-1-c538a2e24786@raspberrypi.com> References: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> In-Reply-To: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> To: Manivannan Sadhasivam , Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241114_080146_204718_495E4170 X-CRM114-Status: GOOD ( 14.74 ) 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 The imx327 only supports up to 29.4dB of analogue gain, vs the imx290 going up to 30dB. Both are in 0.3dB steps. As we now have model specific config, fix this mismatch, and delete the comment referencing it. Signed-off-by: Dave Stevenson Reviewed-by: Laurent Pinchart --- drivers/media/i2c/imx290.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index ee698c99001d..da654deb444a 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -176,6 +176,7 @@ struct imx290_model_info { enum imx290_colour_variant colour_variant; const struct cci_reg_sequence *init_regs; size_t init_regs_num; + unsigned int max_analog_gain; const char *name; }; @@ -876,14 +877,10 @@ static int imx290_ctrl_init(struct imx290 *imx290) * up to 72.0dB (240) add further digital gain. Limit the range to * analog gain only, support for digital gain can be added separately * if needed. - * - * The IMX327 and IMX462 are largely compatible with the IMX290, but - * have an analog gain range of 0.0dB to 29.4dB and 42dB of digital - * gain. When support for those sensors gets added to the driver, the - * gain control should be adjusted accordingly. */ v4l2_ctrl_new_std(&imx290->ctrls, &imx290_ctrl_ops, - V4L2_CID_ANALOGUE_GAIN, 0, 100, 1, 0); + V4L2_CID_ANALOGUE_GAIN, 0, + imx290->model->max_analog_gain, 1, 0); /* * Correct range will be determined through imx290_ctrl_update setting @@ -1441,18 +1438,21 @@ static const struct imx290_model_info imx290_models[] = { .colour_variant = IMX290_VARIANT_COLOUR, .init_regs = imx290_global_init_settings_290, .init_regs_num = ARRAY_SIZE(imx290_global_init_settings_290), + .max_analog_gain = 100, .name = "imx290", }, [IMX290_MODEL_IMX290LLR] = { .colour_variant = IMX290_VARIANT_MONO, .init_regs = imx290_global_init_settings_290, .init_regs_num = ARRAY_SIZE(imx290_global_init_settings_290), + .max_analog_gain = 100, .name = "imx290", }, [IMX290_MODEL_IMX327LQR] = { .colour_variant = IMX290_VARIANT_COLOUR, .init_regs = imx290_global_init_settings_327, .init_regs_num = ARRAY_SIZE(imx290_global_init_settings_327), + .max_analog_gain = 98, .name = "imx327", }, }; From patchwork Thu Nov 14 16:01:14 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13875355 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 572D0D68B34 for ; Thu, 14 Nov 2024 16:04:55 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=6sBEsvd+dgZ/xP6/kn7wo3kVN9KTyz4HVn9G9Q/OIqs=; b=A3qtwsYs6v1JTHY8qjoBYzKCF9 EJ5fTRmV7kQfHJk3737RxHFeXoBW+Uq4gzMqZ28eAfvmauoyKXhFCRvs+KLYM1eRNSu3dJ8Af3DRZ jTLcUtBg5t9v2ayF9AbBuZ/w2qSuzTQw+p3ZDqKYWOYb801Y7899D2YJ3dSHuxc+6hpG+r1s89Q6h 6OnsM9n/fwjx5RDvBoIlvs3esSEvMIZax2+K/KK2mgJMtuFZH8/IubJ7U0gE8OUH2YXR0Pa2TjVnW XD2A7+SzOeDgapm4061/lEvEh1PZ8/emdwGdPhCmkA9gONcMEHyFO6kTkOY0H1wX/Re71XNXnJFw1 RWbjy2qQ==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tBcKn-000000001X9-19NX; Thu, 14 Nov 2024 16:04:41 +0000 Received: from mail-wr1-x42e.google.com ([2a00:1450:4864:20::42e]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBcI0-000000000iU-2PCx for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2024 16:01:49 +0000 Received: by mail-wr1-x42e.google.com with SMTP id ffacd0b85a97d-38222245a86so195915f8f.1 for ; Thu, 14 Nov 2024 08:01:47 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1731600106; x=1732204906; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=6sBEsvd+dgZ/xP6/kn7wo3kVN9KTyz4HVn9G9Q/OIqs=; b=CAH3H+ytJyySqTH1fQRXHImWmM91D5yWCh7asCp51J5a9doXdgg7RZKYsxXGEj0V7O ugehTFNDGQ37IEJ6+qSGslH2wvdz28SlZCd7gAg3U+VQNBtdLgbN3CxjcCmklQnbRqFL /OB4rbbC0mC//KaDKJ/Src4R/qcmcPDAzjpiGACmkofhaJDuvnoVd8tfIDJisF7s4WvD p7H5edRyc2dixpZVQNjbNGa8IpF/gzgUWNVd36mx1M2p5bs0PVv13qtKm04NUXa/vre6 XqLEZzcRsVCxCGEeelR7FbnDIo0lq4DJT//Cjj/ayZS8yXo3scQkzjiTX84NNP1OdufE mk1A== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731600106; x=1732204906; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=6sBEsvd+dgZ/xP6/kn7wo3kVN9KTyz4HVn9G9Q/OIqs=; b=uGYCYcTTBrpLWgvr3j10JVALslGjnY592P5sBEjXxZC1WargW+dGFOdR0reutoZkHd sy6gO0dhyXPURIPH05tSpwKtZwZZ5F1fENBP5BYsQubG1dZZbOSs9oxImVOXwrtkEb8c LRJ1mofola0HwKFMHsa+yjzU1HPdvnQSp7M/Cfmp/NiXHgbwNATU4vDWzLVt1HOnJ4d5 Pd9PGYQysq6LTpglQIm4mxjAxU/uL/dzUUaz7YStLmE2qsynr0dFkTdjoFJWzrdzz6dD B3QhW/7rnwL/zZ+r+6X8Lb0CE11Mwlui9DC6xV5Epp/mLJ8adPjR60GhS29bJSqmNp8l Df8Q== X-Forwarded-Encrypted: i=1; AJvYcCURp01xWTM5w0B6y4Sdv18aHZddjfp0qhKyTk4gdjSt3XdqWcgOVWzBkAn9sdaKx3Fws5NWqdgiEwaLIPLZTf06@lists.infradead.org X-Gm-Message-State: AOJu0YzX1UtmpJMZH5kgaplUl9W+xm9YBAKxOAZbpSD/X9ahrFButW++ vBh4QKVY8OrFKCQinl9hoBCyuXMtcn2ITEURPa5TacQ353DijHwlVTAFJx078+4= X-Google-Smtp-Source: AGHT+IG4Sy0eRFWGgQ022WtiTP8SuksgBmcBl+ihey6/w0qCP+GyJB1dxeBjLookfEv7e1llkV/zYw== X-Received: by 2002:a05:6000:18a9:b0:37d:4ebe:164f with SMTP id ffacd0b85a97d-381f1883d96mr22287017f8f.46.1731600104522; Thu, 14 Nov 2024 08:01:44 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-382200fe00esm1139024f8f.42.2024.11.14.08.01.43 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 08:01:44 -0800 (PST) From: Dave Stevenson Date: Thu, 14 Nov 2024 16:01:14 +0000 Subject: [PATCH 2/3] media: dt-bindings: media: i2c: Add IMX462 to the IMX290 binding MIME-Version: 1.0 Message-Id: <20241114-media-imx290-imx462-v1-2-c538a2e24786@raspberrypi.com> References: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> In-Reply-To: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> To: Manivannan Sadhasivam , Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241114_080148_616114_6C884476 X-CRM114-Status: UNSURE ( 9.58 ) X-CRM114-Notice: Please train this message. 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 IMX462 is the successor to IMX290, which is supportable by the existing IMX290 driver via a new compatible string. Signed-off-by: Dave Stevenson Acked-by: Conor Dooley Reviewed-by: Laurent Pinchart --- Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml index bf05ca48601a..fa69bd21c8da 100644 --- a/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml +++ b/Documentation/devicetree/bindings/media/i2c/sony,imx290.yaml @@ -33,6 +33,8 @@ properties: - sony,imx290lqr # Colour - sony,imx290llr # Monochrome - sony,imx327lqr # Colour + - sony,imx462lqr # Colour + - sony,imx462llr # Monochrome - const: sony,imx290 deprecated: true From patchwork Thu Nov 14 16:01:15 2024 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dave Stevenson X-Patchwork-Id: 13875356 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 6E8D3D68B33 for ; Thu, 14 Nov 2024 16:05:48 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20210309; h=Sender:List-Subscribe:List-Help :List-Post:List-Archive:List-Unsubscribe:List-Id:Cc:To:In-Reply-To:References :Message-Id:Content-Transfer-Encoding:Content-Type:MIME-Version:Subject:Date: From:Reply-To:Content-ID:Content-Description:Resent-Date:Resent-From: Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=v2eGZqhXUh+UAPCtYMe67IF8Tywre6OlhMFZoVB/+W0=; b=Y/O9qlO5b5jfMwbdELYOesDuxb Yx7N9JyQHw+y08NG5q5Qm5vEdRVgREm8vDWYO1NIEOnvNMhoCDWBTJJsKfogiDY1UQiT13w+nqSds JFlJ570amgzzqfzF+ZKOWMKTkmxMWV3N6r0A4klTBoWJ+Y5b+iStMR7KW+A1qcB2h4pa35SOqOPgl evbgNsIb8OPoNp5VaNlIVTQT3jvkOW5Qd/9ihF64AEjrwvHSIsF6oBax1SSNDtnkrBfhi1Qi39biD 2F9Y7VMXk0W53Ko26Dq3S+I9TxEQNA0Y1l2f/QT4neW074QPXAgHAnibWm8/KwRqIrFuFb3AgwdxT yjfblTag==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.98 #2 (Red Hat Linux)) id 1tBcLg-000000001m6-3rj7; Thu, 14 Nov 2024 16:05:36 +0000 Received: from mail-wr1-x42f.google.com ([2a00:1450:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.98 #2 (Red Hat Linux)) id 1tBcI1-000000000io-1Iqa for linux-arm-kernel@lists.infradead.org; Thu, 14 Nov 2024 16:01:50 +0000 Received: by mail-wr1-x42f.google.com with SMTP id ffacd0b85a97d-37d3e8d923fso588569f8f.0 for ; Thu, 14 Nov 2024 08:01:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=raspberrypi.com; s=google; t=1731600107; x=1732204907; darn=lists.infradead.org; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:from:to:cc:subject:date:message-id :reply-to; bh=v2eGZqhXUh+UAPCtYMe67IF8Tywre6OlhMFZoVB/+W0=; b=KjUSugpcomABK66jNolilq9G++Zek/6ju8yVUqgedIfvCihqI54i4YSsDeP8I46xzg wf2btDedznDjEtlou11ZBr/w9N8F37gk5AtPcMpviKe+7kSQil2QdV4UKDnYeAcRKUZC JVpEqXov5nJ1785BMesWuLF3MdLwdf6EXTzcEJg8aY4huyQN39WJRYabuvoBm51htVYm 6j+KMjGqQp2NHd/h9QxSSNxlZOy+d+Blg/qX/2fmM7yr1DbI4Cv4BUMymgvR9Zn1t97d pd4qIuYByhBfLGBSsenzIfZBENpHEUGs/Tn7kjcfbMo7ugVyK3F5Mr+gDknqummIkdJH dRnQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1731600107; x=1732204907; h=cc:to:in-reply-to:references:message-id:content-transfer-encoding :mime-version:subject:date:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=v2eGZqhXUh+UAPCtYMe67IF8Tywre6OlhMFZoVB/+W0=; b=laTMlUeqKwIn9CqdlaqHsudNgvtKH6mLdk5ULjwLVu2o0Eb+STF94c6bNw09aOIrRN Jwk3Xe9VDnCvm+2J1+/VV+NpD0wgY3i1fexNSq7E0kjJ6L4yacC71Tq2Ok7wHggdOd8Q ByoCT+YrCr21fKUyg/4GB0zfyG4P0EIDeA0To8AKBAbFuvLqPosi4fT0bDqdIa9qJrnw eGLQRVFhZV63uzgbR52s8sXT+iAY987vzez9t3WHtJqjG37aJFx6ld/8huTZDdkBYtA2 a7Z/5SR4v5xJ7qgSxJ4thMRvCyOfdLrNGaFQUJeu5tbzWI1O7tXL5NiR4QSa6izcppi9 /mng== X-Forwarded-Encrypted: i=1; AJvYcCUhPDq+6mU6ipt+KnK04oeMeeh7rGyyY+35fUmeGY9JO2G6caTptkgSgXqeCIHPUShfm1M2Sol5AOzfpLkn5Ljv@lists.infradead.org X-Gm-Message-State: AOJu0YyZIo532EvGOlq9G5p37jFxL/aadvit2E8KKd5Q/A+Zx8FqrpQh h+IlwuWZrSnckjKfI/flSXJN/IpJIOqMgXre4dyG/Iq17sQ3cnkfT8fnavbrQ78= X-Google-Smtp-Source: AGHT+IE41nl/kifwf5C3HD2lfOIE9l4CR33KFQ7CwfYgwG7tlg4gz09KKD06z7z6kibfjOlL9Rmy5w== X-Received: by 2002:a05:6000:1f82:b0:382:222b:1320 with SMTP id ffacd0b85a97d-382222b168dmr586958f8f.22.1731600105381; Thu, 14 Nov 2024 08:01:45 -0800 (PST) Received: from [127.0.1.1] ([2a00:1098:3142:e::8]) by smtp.googlemail.com with ESMTPSA id ffacd0b85a97d-382200fe00esm1139024f8f.42.2024.11.14.08.01.44 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 14 Nov 2024 08:01:45 -0800 (PST) From: Dave Stevenson Date: Thu, 14 Nov 2024 16:01:15 +0000 Subject: [PATCH 3/3] media: i2c: imx290: Add configuration for IMX462 MIME-Version: 1.0 Message-Id: <20241114-media-imx290-imx462-v1-3-c538a2e24786@raspberrypi.com> References: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> In-Reply-To: <20241114-media-imx290-imx462-v1-0-c538a2e24786@raspberrypi.com> To: Manivannan Sadhasivam , Sakari Ailus , Mauro Carvalho Chehab , Rob Herring , Krzysztof Kozlowski , Conor Dooley , Shawn Guo , Sascha Hauer , Pengutronix Kernel Team , Fabio Estevam , Laurent Pinchart Cc: linux-media@vger.kernel.org, linux-kernel@vger.kernel.org, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, Dave Stevenson X-Mailer: b4 0.14.1 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20241114_080149_360700_8D72B33E X-CRM114-Status: GOOD ( 12.39 ) 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 IMX462 is the successor to IMX290, and wants very minor changes to the register setup. Add the relevant configuration to support it. Signed-off-by: Dave Stevenson --- drivers/media/i2c/imx290.c | 66 ++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 66 insertions(+) diff --git a/drivers/media/i2c/imx290.c b/drivers/media/i2c/imx290.c index da654deb444a..f1780cc5d7cc 100644 --- a/drivers/media/i2c/imx290.c +++ b/drivers/media/i2c/imx290.c @@ -170,6 +170,8 @@ enum imx290_model { IMX290_MODEL_IMX290LQR, IMX290_MODEL_IMX290LLR, IMX290_MODEL_IMX327LQR, + IMX290_MODEL_IMX462LQR, + IMX290_MODEL_IMX462LLR, }; struct imx290_model_info { @@ -316,6 +318,50 @@ static const struct cci_reg_sequence imx290_global_init_settings_290[] = { { CCI_REG8(0x33b3), 0x04 }, }; +static const struct cci_reg_sequence imx290_global_init_settings_462[] = { + { CCI_REG8(0x300f), 0x00 }, + { CCI_REG8(0x3010), 0x21 }, + { CCI_REG8(0x3011), 0x02 }, + { CCI_REG8(0x3016), 0x09 }, + { CCI_REG8(0x3070), 0x02 }, + { CCI_REG8(0x3071), 0x11 }, + { CCI_REG8(0x309b), 0x10 }, + { CCI_REG8(0x309c), 0x22 }, + { CCI_REG8(0x30a2), 0x02 }, + { CCI_REG8(0x30a6), 0x20 }, + { CCI_REG8(0x30a8), 0x20 }, + { CCI_REG8(0x30aa), 0x20 }, + { CCI_REG8(0x30ac), 0x20 }, + { CCI_REG8(0x30b0), 0x43 }, + { CCI_REG8(0x3119), 0x9e }, + { CCI_REG8(0x311c), 0x1e }, + { CCI_REG8(0x311e), 0x08 }, + { CCI_REG8(0x3128), 0x05 }, + { CCI_REG8(0x313d), 0x83 }, + { CCI_REG8(0x3150), 0x03 }, + { CCI_REG8(0x317e), 0x00 }, + { CCI_REG8(0x32b8), 0x50 }, + { CCI_REG8(0x32b9), 0x10 }, + { CCI_REG8(0x32ba), 0x00 }, + { CCI_REG8(0x32bb), 0x04 }, + { CCI_REG8(0x32c8), 0x50 }, + { CCI_REG8(0x32c9), 0x10 }, + { CCI_REG8(0x32ca), 0x00 }, + { CCI_REG8(0x32cb), 0x04 }, + { CCI_REG8(0x332c), 0xd3 }, + { CCI_REG8(0x332d), 0x10 }, + { CCI_REG8(0x332e), 0x0d }, + { CCI_REG8(0x3358), 0x06 }, + { CCI_REG8(0x3359), 0xe1 }, + { CCI_REG8(0x335a), 0x11 }, + { CCI_REG8(0x3360), 0x1e }, + { CCI_REG8(0x3361), 0x61 }, + { CCI_REG8(0x3362), 0x10 }, + { CCI_REG8(0x33b0), 0x50 }, + { CCI_REG8(0x33b2), 0x1a }, + { CCI_REG8(0x33b3), 0x04 }, +}; + #define IMX290_NUM_CLK_REGS 2 static const struct cci_reg_sequence xclk_regs[][IMX290_NUM_CLK_REGS] = { [IMX290_CLK_37_125] = { @@ -1455,6 +1501,20 @@ static const struct imx290_model_info imx290_models[] = { .max_analog_gain = 98, .name = "imx327", }, + [IMX290_MODEL_IMX462LQR] = { + .colour_variant = IMX290_VARIANT_COLOUR, + .init_regs = imx290_global_init_settings_462, + .init_regs_num = ARRAY_SIZE(imx290_global_init_settings_462), + .max_analog_gain = 98, + .name = "imx462", + }, + [IMX290_MODEL_IMX462LLR] = { + .colour_variant = IMX290_VARIANT_MONO, + .init_regs = imx290_global_init_settings_462, + .init_regs_num = ARRAY_SIZE(imx290_global_init_settings_462), + .max_analog_gain = 98, + .name = "imx462", + }, }; static int imx290_parse_dt(struct imx290 *imx290) @@ -1653,6 +1713,12 @@ static const struct of_device_id imx290_of_match[] = { }, { .compatible = "sony,imx327lqr", .data = &imx290_models[IMX290_MODEL_IMX327LQR], + }, { + .compatible = "sony,imx462lqr", + .data = &imx290_models[IMX290_MODEL_IMX462LQR], + }, { + .compatible = "sony,imx462llr", + .data = &imx290_models[IMX290_MODEL_IMX462LLR], }, { /* sentinel */ }, };