From patchwork Mon Jul 24 22:22:10 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marek Vasut X-Patchwork-Id: 13325378 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 2DAD7EB64DD for ; Mon, 24 Jul 2023 22:23:07 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231139AbjGXWXG (ORCPT ); Mon, 24 Jul 2023 18:23:06 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:51272 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229479AbjGXWXD (ORCPT ); Mon, 24 Jul 2023 18:23:03 -0400 Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 381C619AD for ; Mon, 24 Jul 2023 15:22:34 -0700 (PDT) Received: from tr.lan (ip-86-49-120-218.bb.vodafone.cz [86.49.120.218]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) (Authenticated sender: marex@denx.de) by phobos.denx.de (Postfix) with ESMTPSA id E607D867EA; Tue, 25 Jul 2023 00:22:18 +0200 (CEST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=denx.de; s=phobos-20191101; t=1690237339; bh=kgjhprloDn2faXIAegux/t6LvrLEScg5MLIFk5jNyj4=; h=From:To:Cc:Subject:Date:From; b=kEBJDYZA+4ronjZfUmWHWHZ+PjD16iK82H4WGaupcqig22pLiDDCLzfqIKT3vQC7d dEWwy/d/jQImHYBUKFjI3fCeDLECIolJTWAiiSsmahJ0HBz3CXPRzmDED0lOar2eqE 46yHInrCel6CCXs64ed8bFkqMjiKFpD9YK30SG6ZoTqnPmlSTmZzxDcJ/98O0/ilH2 46v9YcaOimO5MBYLCKL8m0tbiimdP3nvOrpTcJz7Jcl8s7cL11YmC1F1d48aOX02gl pS9ZBY0SS+NRaOW9PAJMfEEEevkNyCJYSlxh6iMgG+SRdVgeOVPkvcqqdlFFYCClYK 9xzicYe7jtSuA== From: Marek Vasut To: linux-media@vger.kernel.org Cc: Marek Vasut , Hans Verkuil , Jacopo Mondi , Mauro Carvalho Chehab , Sakari Ailus , Steve Longerbeam Subject: [PATCH] media: ov5640: Enable MIPI interface in ov5640_set_power_mipi() Date: Tue, 25 Jul 2023 00:22:10 +0200 Message-Id: <20230724222210.162785-1-marex@denx.de> X-Mailer: git-send-email 2.40.1 MIME-Version: 1.0 X-Virus-Scanned: clamav-milter 0.103.8 at phobos.denx.de X-Virus-Status: Clean Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org Set OV5640_REG_IO_MIPI_CTRL00 bit 2 to 1 instead of 0, since 1 means MIPI CSI2 interface, while 0 means CPI parallel interface. In the ov5640_set_power_mipi() the interface should obviously be set to MIPI CSI2 since this functions is used to power up the sensor when operated in MIPI CSI2 mode. The sensor should not be in CPI mode in that case. Fixes: aa4bb8b8838f ("media: ov5640: Re-work MIPI startup sequence") Signed-off-by: Marek Vasut Reviewed-by: Jacopo Mondi Tested-by: Jacopo Mondi --- Cc: Hans Verkuil Cc: Jacopo Mondi Cc: Mauro Carvalho Chehab Cc: Sakari Ailus Cc: Steve Longerbeam Cc: linux-media@vger.kernel.org --- drivers/media/i2c/ov5640.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/media/i2c/ov5640.c b/drivers/media/i2c/ov5640.c index 8f21839b08c78..8b7ff2f3bdda7 100644 --- a/drivers/media/i2c/ov5640.c +++ b/drivers/media/i2c/ov5640.c @@ -2539,9 +2539,9 @@ static int ov5640_set_power_mipi(struct ov5640_dev *sensor, bool on) * "ov5640_set_stream_mipi()") * [4] = 0 : Power up MIPI HS Tx * [3] = 0 : Power up MIPI LS Rx - * [2] = 0 : MIPI interface disabled + * [2] = 1 : MIPI interface enabled */ - ret = ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x40); + ret = ov5640_write_reg(sensor, OV5640_REG_IO_MIPI_CTRL00, 0x44); if (ret) return ret;