From mboxrd@z Thu Jan 1 00:00:00 1970 From: Maxime Ripard Subject: Re: [PATCH v5 0/5] Add OV5640 parallel interface and RGB565/YUYV support Date: Thu, 11 Jan 2018 13:40:18 +0100 Message-ID: <20180111124018.azdzjeitjsyenmra@flea.lan> References: <1514973452-10464-1-git-send-email-hugues.fruchet@st.com> <20180108153811.5xrvbaekm6nxtoa6@flea> <3010811e-ed37-4489-6a9f-6cc835f41575@st.com> <20180110153724.l77zpdgxfbzkznuf@flea> <20180111091508.a0c9f630c6b4ef80178694fb@magewell.com> Mime-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha256; protocol="application/pgp-signature"; boundary="o7pqzwq2ylfpgigj" Return-path: Content-Disposition: inline In-Reply-To: <20180111091508.a0c9f630c6b4ef80178694fb-+3dxTMOEIRNWk0Htik3J/w@public.gmane.org> Sender: devicetree-owner-u79uwXL29TY76Z2rM5mHXA@public.gmane.org To: Yong Cc: Hugues FRUCHET , Steve Longerbeam , Sakari Ailus , Hans Verkuil , Mauro Carvalho Chehab , Rob Herring , Mark Rutland , "devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , "linux-media-u79uwXL29TY76Z2rM5mHXA@public.gmane.org" , Benjamin Gaignard List-Id: devicetree@vger.kernel.org --o7pqzwq2ylfpgigj Content-Type: text/plain; charset=us-ascii Content-Disposition: inline Content-Transfer-Encoding: quoted-printable Hi Yong, On Thu, Jan 11, 2018 at 09:15:08AM +0800, Yong wrote: > > On Mon, Jan 08, 2018 at 05:13:39PM +0000, Hugues FRUCHET wrote: > > > I'm using a ST board with OV5640 wired in parallel bus output in orde= r=20 > > > to interface to my STM32 DCMI parallel interface. > > > Perhaps could you describe your setup so I could help on understandin= g=20 > > > the problem on your side. From my past experience with this sensor=20 > > > module, you can first check hsync/vsync polarities, the datasheet is= =20 > > > buggy on VSYNC polarity as documented in patch 4/5. > >=20 > > It turns out that it was indeed a polarity issue. > >=20 > > It looks like that in order to operate properly, I need to setup the > > opposite polarity on HSYNC and VSYNC on the interface. I looked at the > > signals under a scope, and VSYNC is obviously inversed as you > > described. HSYNC, I'm not so sure since the HBLANK period seems very > > long, almost a line. > >=20 > > Since VSYNC at least looks correct, I'd be inclined to think that the > > polarity is inversed on at least the SoC I'm using it on. > >=20 > > Yong, did you test the V3S CSI driver with a parallel interface? With > > what sensor driver? Have you found some polarities issues like this? >=20 > Did you try it with Allwinner SoCs? Yes, on an H3. Looking at all the Allwinner datasheet I could get my hands on, they are all documented in the same way. However, I really start to wonder whether the polarity shouldn't be reversed. At least the fact that VSYNC is clearly active low on the oscilloscope, while I have to set it active high in the controller seems like a strong hint :) > No. I only tested with a BT1120 signal generated by FPGA or ADV7611. HSYNC > and VSYNC are not used. Ok, that's good to know :) > For V3s CSI driver, I will add the following to dt-bindings: > Endpoint node properties for CSI1 > --------------------------------- >=20 > - remote-endpoint : (required) a phandle to the bus receiver's endpo= int > node > - bus-width: : (required) must be 8, 10, 12 or 16 > - pclk-sample : (optional) (default: sample on falling edge) > - hsync-active : (only required for parallel) > - vsync-active : (only required for parallel) >=20 > You could try diffrent hsync-active/vsync-active values here. I did already, and the only combination that works is the one that is the inversed polarity on HSYNC and VSYNC than what the sensor setup. Maxime --=20 Maxime Ripard, Free Electrons Embedded Linux and Kernel engineering http://free-electrons.com --o7pqzwq2ylfpgigj Content-Type: application/pgp-signature; name="signature.asc" -----BEGIN PGP SIGNATURE----- iQIzBAABCAAdFiEE0VqZU19dR2zEVaqr0rTAlCFNr3QFAlpXWzEACgkQ0rTAlCFN r3TU4w//c8Z+ZjKAgyxrCMqg2nv171OpS9Ox1kjUop3YJ8X4NDaY83+I0kzmwsdo eElIRQSVSe1el1WtqU3CgHnQiO6OQZq0c4hYBAs6FBF1uP8BgAdD8IFbGFGXJP7p J45A472C80ZgatNmpmsnm7ADCThOlzs4PW37aWxftzcLqkKDox6HhWzwSGgq9W8i PZADkO96T0867spbNLRfwqlsS+Uk062KRYT82GUDhOvoyUEC+THnSlPYfxReqLH3 TW0TIwVO2HIfP2w4mzuJfs8alRp5CZ3wAHkYcSkiOry87PZ3RYFk30wAucBhOVoL Cra/IIPyfRX8UEEnz6/oCuHi8L/Pd8rIGW2UdIXK2ut+SRoxaHQBkYZydGEx0MWR DP+YqD3eSS4yqv7er7j4+t8LPaDDZdp5EIXNKABWWhMCIeh9an11xwk8NUW4SSfc /suwroFxoHQ7h+87ucRqAejiwTsT+HJKIhyGMLLptuRL2rfMskiAdGtiCggdmkX/ I7eNcUWyWM6Lm7HGPod5KT7lBPS2hgl8DmO4kXcJg9P1UeBQG8DTAW9tlKF/Dj1k IaAQ/PbCDThHvJ/8F1IYh2orywiC/5pXRc8qMGJhwM72aZ9bI1z/j+OcwsdH1n6U wVvN5lW5XKeSZ+ee5vwcAvz9yCtJCpkZUZy1YsCt2rDurDxOVPY= =XRAc -----END PGP SIGNATURE----- --o7pqzwq2ylfpgigj-- -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html