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 E4955C54EBE for ; Mon, 16 Jan 2023 10:05:42 +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=A4COk5C9+r2Mmq0XhMzV4bzpGIDuuMi/rgL9Kfu2UnU=; b=Xq1uWiHl1+lBXT KTB4rMriw+L7SMTj8u+v2v4O+hL37g6G2dDqS13ikLho0ZG7ayFl/64ffmaZsTjn5+GSF0iOI6zkr 9JMUGwy5Jw4mntosiOeA2tSxJKvI2O6Nfu7c5jjjX47sr/PhjO2xOLaapZD8T7BhsdKDEl0jVpCCy y0fQ19vLfyChGtkE+JiNIBhRLMeCN7zpLHEgXs4EFw+HXNRAxk1Nm1FT9I2zwp+5Vfkmg9iKrg0X4 GpjuN5Sh5+Z7ZvixWHZpvvgbwJmhpLakCOQe1w8umiBdeNaH75/eESlw5/XAqBBI1rfPxa+H3vYIj OtfI3eI9DHHR36xA0inA==; Received: from localhost ([::1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHMLz-009Yak-Ju; Mon, 16 Jan 2023 10:04:35 +0000 Received: from mail-wr1-x42b.google.com ([2a00:1450:4864:20::42b]) by bombadil.infradead.org with esmtps (Exim 4.94.2 #2 (Red Hat Linux)) id 1pHMLw-009YYD-C4 for linux-arm-kernel@lists.infradead.org; Mon, 16 Jan 2023 10:04:33 +0000 Received: by mail-wr1-x42b.google.com with SMTP id r30so2508119wrr.10 for ; Mon, 16 Jan 2023 02:04:29 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=XbIO2N193nCzeMIACK0SFaSPQ5nzZU2nDgITnTHRxbs=; b=dJxMfLb2RB28pwZidieiXoi0wehiMuiOL+2IskQXY3CwWbNYpwokm2jYhlL+kJRMHC 8yZc2XvMvrUNFMxJ4caAGN/mx6hqU78vIvjWrPcEbft6/FlafkYoVcyW27N665yi65JX NzTiv9c4j7dxdF7dD8j5y2fuYKNhv87s1r9eZug/53kZyBcQBOuyKicRqkv4Kz2R6PCm UIiEfEPonuyJqQEG4SV7MegYgPi4UBmySkISbEzUoJW8bEFOTysvCi8y0E/2MVfZLCUB v7HRamfMvHd+4vZ3qT2/6G6LS8WgmBtVw5f0/gnALeJi/HvMw9ZiVkUuP29rSilM5RF8 NZOg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=XbIO2N193nCzeMIACK0SFaSPQ5nzZU2nDgITnTHRxbs=; b=0NZcDbGENhmcyfZls+FftmDlDG6a6V26EFTvHUr4VjfLVelxt8sG863jY92qg+n6xD JAsnr0qDUGgxlmiK5rp9hzhdg7IHlPInSd1X3xZiL4tt/IvGNH32PuuJmxEN8gEmSL+0 35CXkdEeS7wPKcngYI28cyhA4CqKcDazRGw1jxm81hbH2llu2mumXrrF8FjUEtSM/7NF 5sGaBOqcsO5lzc/VbloGNZ2kJxYHA8mQ5QO2W8u16IZb5jygv3jSNjxWuZKGlQZsgj7s GMzb49VPTPonzMM6Ge2wVaiDfmhY5VGyIA4KdAeva7WIjLwHlGDzssvw09p33saa60rl oWPQ== X-Gm-Message-State: AFqh2krO6AndtvBxZQjZ6IBGdsLUFEEvOJx9u9Ff0hS7gYBXalRTs9R3 E64JxYyI30c5vVDgb/rfGWo= X-Google-Smtp-Source: AMrXdXuO/QQxJ4KmNkv0K3j6obl3Gx0l62TtiA7hL2J3w+HhEH7U1sE7KprVVzcaS9WniUcCeKw9mw== X-Received: by 2002:adf:b608:0:b0:2bd:d76f:23eb with SMTP id f8-20020adfb608000000b002bdd76f23ebmr6745487wre.29.1673863467887; Mon, 16 Jan 2023 02:04:27 -0800 (PST) Received: from localhost.localdomain (mm-88-61-120-178.brest.dynamic.pppoe.byfly.by. [178.120.61.88]) by smtp.gmail.com with ESMTPSA id bq14-20020a5d5a0e000000b002bdf2739cabsm5856220wrb.1.2023.01.16.02.04.26 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 16 Jan 2023 02:04:27 -0800 (PST) From: Oleg Verych To: wens@kernel.org Cc: devicetree@vger.kernel.org, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, mark.rutland@arm.com, mchehab@kernel.org, mripard@kernel.org, robh+dt@kernel.org, sakari.ailus@linux.intel.com, wens@csie.org, Oleg Verych Subject: Re: [PATCH 04/14] media: sun4i-csi: Fix [HV]sync polarity handling Date: Mon, 16 Jan 2023 13:03:59 +0300 Message-Id: <20230116100359.4479-1-olecom@gmail.com> X-Mailer: git-send-email 2.35.1.windows.2 In-Reply-To: <20191215165924.28314-5-wens@kernel.org> References: <20191215165924.28314-5-wens@kernel.org> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20230116_020432_455083_455DD760 X-CRM114-Status: GOOD ( 13.67 ) 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 Hi, Chen-Yu Tsai > - hsync_pol = !!(bus->flags & V4L2_MBUS_HSYNC_ACTIVE_HIGH); > - vsync_pol = !!(bus->flags & V4L2_MBUS_VSYNC_ACTIVE_HIGH); > + /* > + * This hardware uses [HV]REF instead of [HV]SYNC. Based on the > + * provided timing diagrams in the manual, positive polarity > + * equals active high [HV]REF. > + * > + * When the back porch is 0, [HV]REF is more or less equivalent > + * to [HV]SYNC inverted. > + */ > + href_pol = !!(bus->flags & V4L2_MBUS_HSYNC_ACTIVE_LOW); > + vref_pol = !!(bus->flags & V4L2_MBUS_VSYNC_ACTIVE_LOW); After this change has been made there is a need of explicit explanation of what "Active high" / "Active low" in dts really mean. Currently physical high/low voltage levels are like that: (I'm not sure about vsync-active) * hsync-active = <0>; /* HSYNC active 'low' => wire active is 'high' */ CSI register setting: href_pol: 1, That is confusing: [PATCH v6 5/5] DO NOT MERGE: ARM: dts: bananapi: Add Camera support https://lore.kernel.org/linux-arm-kernel/cf0e40b0bca9219d2bb023a5b7f23bad8baba1e5.1562847292.git-series.maxime.ripard@bootlin.com/#r > + port { > + csi_from_ov5640: endpoint { > + remote-endpoint = <&ov5640_to_csi>; > + bus-width = <8>; > + hsync-active = <1>; /* Active high */ original CSI driver > + vsync-active = <0>; /* Active low */ > + data-active = <1>; /* Active high */ > + pclk-sample = <1>; /* Rising */ > + }; > + }; [PATCH 13/14] [DO NOT MERGE] ARM: dts: sun7i: cubieboard2: Enable OV7670 camera on CSI1 https://lore.kernel.org/linux-arm-kernel/20191215165924.28314-14-wens@kernel.org/ > + port { > + /* Parallel bus endpoint */ > + csi_from_ov7670: endpoint { > + remote-endpoint = <&ov7670_to_csi>; > + bus-width = <8>; > + /* driver is broken */ > + hsync-active = <0>; /* Active high */ this change patchset > + vsync-active = <1>; /* Active high */ > + data-active = <1>; /* Active high */ > + pclk-sample = <1>; /* Rising */ > + }; > + ov7670_to_csi: endpoint { > + remote-endpoint = <&csi_from_ov7670>; > + bus-width = <8>; > + hsync-active = <1>; /* Active high */ this patcheset > + vsync-active = <1>; /* Active high */ > + data-active = <1>; /* Active high */ > + pclk-sample = <1>; /* Rising */ > + }; > + }; _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel@lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel