Hi Maxime, I applied your patches, and they are a big improvement for what I am trying to do, but things still aren't working right on my platform. How confident are you that the MIPI mode will work with this version of the driver? I am having issues that I believe are due to incorrect clock generation. Our engineers did some reverse engineering of the clock tree themselves, and came up with a slightly different model. I've captured their model in a spreadsheet here: https://tinyurl.com/pll-calc . Just modify the register and xclk values to see the clocks change. Do your tests disagree with this potential model? I'm not sure which model is more correct, but my tests suggest the high speed MIPI clock is generated directly off the PLL. This means the PLL multiplier you are generating in your algorithm is not high enough to satisfy the bandwidth. If this is the case, MIPI mode will require a different set of parameters that enable some of the downstream dividers, so that the PLL multiplier can be higher while the PCLK value still matches the needed rate calculated from the resolution. Any thoughts on this before I dive in and start tweaking the algorithm in mipi mode? Sam ----------------------- Sam Bobrowicz Elite Embedded Consulting LLC elite-embedded.com On Tue, Apr 17, 2018 at 9:01 AM, Maxime Ripard <maxime.ripard@xxxxxxxxxxx> wrote: > On Mon, Apr 16, 2018 at 04:22:39PM -0700, Samuel Bobrowicz wrote: >> I've been digging around the ov5640.c code for a few weeks now, these >> look like some solid improvements. I'll give them a shot and let you >> know how they work. > > Great, thanks! > >> On that note, I'm bringing up a module that uses dual lane MIPI with a >> 12MHz fixed oscillator for xclk (Digilent's Pcam 5c). The mainline >> version of the driver seems to only support xclk of 22MHz (or maybe >> 24MHz), despite allowing xclk values from 6-24MHz. Will any of these >> patches add support for a 12MHz xclk while in MIPI mode? > > My setup has a 24MHz crystal, and work with a parallel bus so I > haven't been able to test yours. However, yeah, I guess my patches > will improve your situation a lot. > > Maxime > > -- > Maxime Ripard, Bootlin (formerly Free Electrons) > Embedded Linux and Kernel engineering > https://bootlin.com