From mboxrd@z Thu Jan 1 00:00:00 1970 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 BDD52C4345F for ; Wed, 1 May 2024 15:25:58 +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:MIME-Version:References:In-Reply-To: Message-ID:Date:Subject:Cc:To:From:Reply-To:Content-ID:Content-Description: Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID: List-Owner; bh=YR8gPwdwWYkNr7I4q0p/kHEU39yPHTwgSofJueeYh/I=; b=MS6L2A1wbWO+Vl SsGvnGW9fL6bF/XltJiZgUxEZ3QCE/h9LvZa+PRPzlTB7Y4Hx4Jd5CppqD/MXkoAVQEcZ7rzFhh3o c2VBjv1hkL1O7AaJQ0Opcfeby3+z0u5Ag/sjpy8fwV2cc09cWu/Swdu9im6rSLzZ5cQyYqD+BpGVT lyUXo4pD2H20xanp8mDsjaD95RwEpr3yKhYGH2Dv4myb/CUDtFORqy0cNylvEHkjz3CsGXeLulOD5 jQ78ZD2rPWnAYJywClETRV62OYHI8h4xnJjodsBM87C35XkxOMk2VErg8/IBcWacg394Gdo5VIBUR Dru7o0e78T9Zcp7SBDFA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Bq4-00000009xMb-3WMc; Wed, 01 May 2024 15:25:44 +0000 Received: from mail-108-mta102.mxroute.com ([136.175.108.102]) by bombadil.infradead.org with esmtps (Exim 4.97.1 #2 (Red Hat Linux)) id 1s2Bpf-00000009wzi-3e5s for linux-arm-kernel@lists.infradead.org; Wed, 01 May 2024 15:25:22 +0000 Received: from filter006.mxroute.com ([136.175.111.2] filter006.mxroute.com) (Authenticated sender: mN4UYu2MZsgR) by mail-108-mta102.mxroute.com (ZoneMTA) with ESMTPSA id 18f34c2903b0008ca2.009 for (version=TLSv1.3 cipher=TLS_AES_256_GCM_SHA384); Wed, 01 May 2024 15:25:17 +0000 X-Zone-Loop: 6427fdaf83a841428346a125cad0255814210a519c36 X-Originating-IP: [136.175.111.2] DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=luigi311.com; s=x; h=Content-Transfer-Encoding:MIME-Version:References: In-Reply-To:Message-ID:Date:Subject:Cc:To:From:Sender:Reply-To:Content-Type: Content-ID:Content-Description:Resent-Date:Resent-From:Resent-Sender: Resent-To:Resent-Cc:Resent-Message-ID:List-Id:List-Help:List-Unsubscribe: List-Subscribe:List-Post:List-Owner:List-Archive; bh=bZhiRPeL9jOMw1N4B5HoYuhr3z7xt+xH2s8wek/zi98=; b=n9qOmSLU2isncEzDzGlkGQitd/ BomYYLCpt3OiODoZPQQlCODBrj1c2QGm95XmKA9xSkUyJ2cQIMyLPPl5RZch0eoQJTx20Eg7xYOgA 6MKS2c6mHP8mh5ZLeIHvFWp77Ya2f8uSkjFQtq5ZOwehxkW226VxEMgSb4khxI8JTLpZ8LOw4N2DI 7htJYspuh33ocRmK1TnSjI4B3eVa0gbZxplWRWh1MtvYV/J8TeF4XV3Ln/k3K/xK4CRiH6XQ4pWOS uQbrNQWHVe3our0pc8ypnUpbFHQBiX/INbgLRMNecHsGDJP+do9mE69ts7dzXSejGSvj65v71qAw5 LFdz9YIQ==; From: git@luigi311.com To: linux-media@vger.kernel.org Cc: dave.stevenson@raspberrypi.com, jacopo.mondi@ideasonboard.com, mchehab@kernel.org, robh@kernel.org, krzysztof.kozlowski+dt@linaro.org, conor+dt@kernel.org, shawnguo@kernel.org, s.hauer@pengutronix.de, kernel@pengutronix.de, festevam@gmail.com, sakari.ailus@linux.intel.com, devicetree@vger.kernel.org, imx@lists.linux.dev, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, pavel@ucw.cz, phone-devel@vger.kernel.org, Luis Garcia Subject: [PATCH v5 12/25] media: i2c: imx258: Allow configuration of clock lane behaviour Date: Wed, 1 May 2024 09:24:29 -0600 Message-ID: <20240501152442.1072627-13-git@luigi311.com> In-Reply-To: <20240501152442.1072627-1-git@luigi311.com> References: <20240501152442.1072627-1-git@luigi311.com> MIME-Version: 1.0 X-Authenticated-Id: personal@luigi311.com X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20240501_082520_679414_C5FB30AA X-CRM114-Status: GOOD ( 12.03 ) 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: , Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org From: Dave Stevenson The sensor supports the clock lane either remaining in HS mode during frame blanking, or dropping to LP11. Add configuration of the mode via V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK. Signed-off-by: Dave Stevenson Reviewed-by: Jacopo Mondi Signed-off-by: Luis Garcia --- drivers/media/i2c/imx258.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/drivers/media/i2c/imx258.c b/drivers/media/i2c/imx258.c index 59a78a4cfe44..2429eb7b55c6 100644 --- a/drivers/media/i2c/imx258.c +++ b/drivers/media/i2c/imx258.c @@ -72,6 +72,8 @@ /* Test Pattern Control */ #define IMX258_REG_TEST_PATTERN 0x0600 +#define IMX258_CLK_BLANK_STOP 0x4040 + /* Orientation */ #define REG_MIRROR_FLIP_CONTROL 0x0101 #define REG_CONFIG_MIRROR_FLIP 0x03 @@ -632,6 +634,7 @@ struct imx258 { const struct imx258_link_freq_config *link_freq_configs; const s64 *link_freq_menu_items; unsigned int nlanes; + unsigned int csi2_flags; /* * Mutex for serialized access: @@ -1066,6 +1069,14 @@ static int imx258_start_streaming(struct imx258 *imx258) return ret; } + ret = imx258_write_reg(imx258, IMX258_CLK_BLANK_STOP, + IMX258_REG_VALUE_08BIT, + !!(imx258->csi2_flags & V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK)); + if (ret) { + dev_err(&client->dev, "%s failed to set clock lane mode\n", __func__); + return ret; + } + /* Apply default values of current mode */ reg_list = &imx258->cur_mode->reg_list; ret = imx258_write_regs(imx258, reg_list->regs, reg_list->num_of_regs); @@ -1438,6 +1449,8 @@ static int imx258_probe(struct i2c_client *client) goto error_endpoint_free; } + imx258->csi2_flags = ep.bus.mipi_csi2.flags; + /* Initialize subdev */ v4l2_i2c_subdev_init(&imx258->sd, client, &imx258_subdev_ops); -- 2.44.0 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel