From patchwork Mon Mar 5 09:35:33 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Maxime Ripard X-Patchwork-Id: 10258475 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork.web.codeaurora.org (Postfix) with ESMTP id 7639E60365 for ; Mon, 5 Mar 2018 09:35:59 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id 656602899E for ; Mon, 5 Mar 2018 09:35:59 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id 59B99289B1; Mon, 5 Mar 2018 09:35:59 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-6.9 required=2.0 tests=BAYES_00,RCVD_IN_DNSWL_HI autolearn=ham version=3.3.1 Received: from vger.kernel.org (vger.kernel.org [209.132.180.67]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id F3C002899E for ; Mon, 5 Mar 2018 09:35:58 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S933726AbeCEJf4 (ORCPT ); Mon, 5 Mar 2018 04:35:56 -0500 Received: from mail.bootlin.com ([62.4.15.54]:49568 "EHLO mail.bootlin.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S933618AbeCEJfv (ORCPT ); Mon, 5 Mar 2018 04:35:51 -0500 Received: by mail.bootlin.com (Postfix, from userid 110) id CD572207EF; Mon, 5 Mar 2018 10:35:48 +0100 (CET) Received: from localhost (LStLambert-657-1-97-87.w90-63.abo.wanadoo.fr [90.63.216.87]) by mail.bootlin.com (Postfix) with ESMTPSA id 77237207F2; Mon, 5 Mar 2018 10:35:38 +0100 (CET) From: Maxime Ripard To: Yong Deng Cc: Mauro Carvalho Chehab , Chen-Yu Tsai , Maxime Ripard , Hans Verkuil , Sakari Ailus , linux-media@vger.kernel.org, linux-arm-kernel@lists.infradead.org, Thomas Petazzoni , Mylene Josserand Subject: [PATCH 6/7] media: sun6i: Invert the polarities Date: Mon, 5 Mar 2018 10:35:33 +0100 Message-Id: <20180305093535.11801-7-maxime.ripard@bootlin.com> X-Mailer: git-send-email 2.14.3 In-Reply-To: <20180305093535.11801-1-maxime.ripard@bootlin.com> References: <1519697113-32202-1-git-send-email-yong.deng@magewell.com> <20180305093535.11801-1-maxime.ripard@bootlin.com> Sender: linux-media-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-media@vger.kernel.org X-Virus-Scanned: ClamAV using ClamSMTP A good look at an oscilloscope and test with a camera have shown that the polarity of all signals are actually reversed compared to the polarity documented in the datasheet for the clock, HSYNC and VSYNC signals. Signed-off-by: Maxime Ripard --- drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c index e0b39ea641aa..a93bc25ff372 100644 --- a/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c +++ b/drivers/media/platform/sunxi/sun6i-csi/sun6i_csi.c @@ -398,12 +398,12 @@ static void sun6i_csi_setup_bus(struct sun6i_csi_dev *sdev) if (flags & V4L2_MBUS_FIELD_EVEN_LOW) cfg |= CSI_IF_CFG_FIELD_POSITIVE; - if (flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH) + if (flags & V4L2_MBUS_VSYNC_ACTIVE_LOW) cfg |= CSI_IF_CFG_VREF_POL_POSITIVE; - if (flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH) + if (flags & V4L2_MBUS_HSYNC_ACTIVE_LOW) cfg |= CSI_IF_CFG_HREF_POL_POSITIVE; - if (flags & V4L2_MBUS_PCLK_SAMPLE_FALLING) + if (flags & V4L2_MBUS_PCLK_SAMPLE_RISING) cfg |= CSI_IF_CFG_CLK_POL_FALLING_EDGE; break; case V4L2_MBUS_BT656: