Devicetree
 help / color / mirror / Atom feed
From: Maxime Ripard <maxime.ripard-LDxbnhwyfcJBDgjK7y7TUQ@public.gmane.org>
To: Fabrizio Castro
	<fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>
Cc: Hugues Fruchet <hugues.fruchet-qxv4g6HH51o@public.gmane.org>,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	Benjamin Gaignard
	<benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org>,
	Ramesh Shanmugasundaram
	<ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org>,
	Chris Paterson
	<Chris.Paterson2-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org>,
	Hans Verkuil <hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org>,
	Sakari Ailus <sakari.ailus-X3B1VOXEql0@public.gmane.org>,
	Steve Longerbeam
	<slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>,
	Mauro Carvalho Chehab
	<mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>,
	Mark Rutland <mark.rutland-5wv7dgnIgG8@public.gmane.org>,
	Rob Herring <robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org>
Subject: Re: [PATCH v5 4/5] media: ov5640: add support of DVP parallel interface
Date: Mon, 5 Feb 2018 14:56:38 +0100	[thread overview]
Message-ID: <20180205135638.vkuotmeks5k76iud@flea> (raw)
In-Reply-To: <TY1PR06MB08954787E362BF24C7FD41DBC0FE0-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>

[-- Attachment #1: Type: text/plain, Size: 2396 bytes --]

On Mon, Feb 05, 2018 at 11:42:11AM +0000, Fabrizio Castro wrote:
> Hello Maxime,
> 
> thank you for your feedback.
> 
> > > > +/*
> > > > + * configure parallel port control lines polarity
> > > > + *
> > > > + * POLARITY CTRL0
> > > > + * - [5]:PCLK polarity (0: active low, 1: active high)
> > > > + * - [1]:HREF polarity (0: active low, 1: active high)
> > > > + * - [0]:VSYNC polarity (mismatch here between
> > > > + *datasheet and hardware, 0 is active high
> > > > + *and 1 is active low...)
> > >
> > > I know that yourself and Maxime have both confirmed that VSYNC
> > > polarity is inverted, but I am looking at HSYNC and VSYNC with a
> > > logic analyser and I am dumping the values written to
> > > OV5640_REG_POLARITY_CTRL00 and to me it looks like that HSYNC is
> > > active HIGH when hsync_pol == 0, and VSYNC is active HIGH when
> > > vsync_pol == 1.
> >
> > Which mode are you testing this on?
> 
> My testing environment is made of the sensor connected to a SoC with
> 8 data lines, vsync, hsync, and pclk, and of course I am specifying
> hsync-active, vsync-active, and pclk-sample in the device tree on
> both ends so that they configure themselves accordingly to work in
> DVP mode (V4L2_MBUS_PARALLEL), with the correct polarities.
>
> Between the sensor and the SoC there is a noninverting bus
> transceiver (voltage translator), for my experiments I have plugged
> myself onto the outputs of this transceiver only to be compliant
> with the voltage level of my logic analyser.

Sorry, my question was more about the resolution, refresh rate, etc.

> > The non-active periods are insanely high in most modes (1896 for an
> > active horizontal length of 640 in 640x480 for example), especially
> > hsync, and it's really easy to invert the two.
> 
> I am looking at all the data lines, so that I don't confuse the
> non-active periods with the active periods, and with my setup what I
> reported is what I get. I wonder if this difference comes from the
> sensor revision at all? Unfortunately I can only test the one camera
> I have got.

I don't really know then. I've had issues with the polarities on my
side, but it was on the receiver side and the sensor part looked like
what is documented.

Maxime

-- 
Maxime Ripard, Bootlin (formerly Free Electrons)
Embedded Linux and Kernel engineering
http://bootlin.com

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 833 bytes --]

  parent reply	other threads:[~2018-02-05 13:56 UTC|newest]

Thread overview: 29+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2018-01-03  9:57 [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Hugues Fruchet
2018-01-03  9:57 ` [PATCH v5 5/5] media: ov5640: add support of RGB565 and YUYV formats Hugues Fruchet
     [not found] ` <1514973452-10464-1-git-send-email-hugues.fruchet-qxv4g6HH51o@public.gmane.org>
2018-01-03  9:57   ` [PATCH v5 1/5] media: ov5640: switch to gpiod_set_value_cansleep() Hugues Fruchet
2018-01-03  9:57   ` [PATCH v5 2/5] media: ov5640: check chip id Hugues Fruchet
2018-01-03  9:57   ` [PATCH v5 3/5] media: dt-bindings: ov5640: refine CSI-2 and add parallel interface Hugues Fruchet
2018-01-05 18:41     ` Rob Herring
2018-01-03  9:57   ` [PATCH v5 4/5] media: ov5640: add support of DVP " Hugues Fruchet
     [not found]     ` <1514973452-10464-5-git-send-email-hugues.fruchet-qxv4g6HH51o@public.gmane.org>
2018-02-01 17:53       ` Fabrizio Castro
2018-02-02 18:50         ` Maxime Ripard
2018-02-05 11:42           ` Fabrizio Castro
     [not found]             ` <TY1PR06MB08954787E362BF24C7FD41DBC0FE0-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-02-05 13:56               ` Maxime Ripard [this message]
2018-01-08 15:38   ` [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Maxime Ripard
2018-01-08 17:13     ` Hugues FRUCHET
2018-01-09 18:49       ` Maxime Ripard
     [not found]       ` <3010811e-ed37-4489-6a9f-6cc835f41575-qxv4g6HH51o@public.gmane.org>
2018-01-10 15:37         ` Maxime Ripard
2018-01-10 15:51           ` Hugues FRUCHET
     [not found]             ` <2089de18-1f7f-6d6e-7aee-9dc424bca335-qxv4g6HH51o@public.gmane.org>
2018-01-10 22:25               ` Sakari Ailus
2018-01-11  8:12                 ` Hugues FRUCHET
     [not found]                   ` <6661b493-5f2a-b201-390d-e3452e6873a0-qxv4g6HH51o@public.gmane.org>
2018-01-11  8:19                     ` Sakari Ailus
     [not found]                       ` <20180111081912.curkvpguof6ul555-S+BSfZ9RZZmRSg0ZkenSGLdO1Tsj/99ntUK59QYPAWc@public.gmane.org>
2018-01-11  8:25                         ` Hugues FRUCHET
2018-01-11  9:18                           ` Sakari Ailus
2018-01-11 12:37             ` Maxime Ripard
2018-01-11  1:15           ` Yong
     [not found]             ` <20180111091508.a0c9f630c6b4ef80178694fb-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
2018-01-11 12:40               ` Maxime Ripard
     [not found]                 ` <20180111124018.azdzjeitjsyenmra-ZC1Zs529Oq4@public.gmane.org>
2018-01-12  2:18                   ` Yong
     [not found]                     ` <20180112101839.cc13571a099d64eea2ac6e3a-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org>
2018-01-12  9:04                       ` Maxime Ripard
2018-01-08 20:54 ` Fabrizio Castro
     [not found]   ` <TY1PR06MB0895C74B45AF75CEB9F7AA4BC0130-/PRLmSCtZ16EeHdvShrxA20DtJ1/0DrXvxpqHgZTriW3zl9H0oFU5g@public.gmane.org>
2018-01-09  8:48     ` Hugues FRUCHET
     [not found]       ` <a02789f0-d41c-7dfb-406c-fe29ccc0dc9e-qxv4g6HH51o@public.gmane.org>
2018-01-09 11:50         ` Fabrizio Castro

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20180205135638.vkuotmeks5k76iud@flea \
    --to=maxime.ripard-ldxbnhwyfcjbdgjk7y7tuq@public.gmane.org \
    --cc=Chris.Paterson2-zM6kxYcvzFBBDgjK7y7TUQ@public.gmane.org \
    --cc=benjamin.gaignard-QSEj5FYQhm4dnm+yROfE0A@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=fabrizio.castro-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org \
    --cc=hugues.fruchet-qxv4g6HH51o@public.gmane.org \
    --cc=hverkuil-qWit8jRvyhVmR6Xm/wNWPw@public.gmane.org \
    --cc=linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=mark.rutland-5wv7dgnIgG8@public.gmane.org \
    --cc=mchehab-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=ramesh.shanmugasundaram-kTT6dE0pTRh9uiUsa/gSgQ@public.gmane.org \
    --cc=robh+dt-DgEjT+Ai2ygdnm+yROfE0A@public.gmane.org \
    --cc=sakari.ailus-X3B1VOXEql0@public.gmane.org \
    --cc=slongerbeam-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox