On Fri, Dec 05, 2014 at 02:28:18PM -0800, Sean Paul wrote: > On Fri, Dec 5, 2014 at 2:17 PM, Thierry Reding > wrote: > > > On Fri, Dec 05, 2014 at 01:48:42PM -0800, Sean Paul wrote: > > > On Tue, Dec 2, 2014 at 5:40 PM, David Ung wrote: > > > > > > > Fix DSI PHY HS Trail setting on Tegra. > > > > It is found that HS Trail is off -12% during compliance testing > > > > > > > > > > > [this time from the correct email address] > > > > > > Our timing tests pass now. > > > > > > Tested-by: Sean Paul > > > > Can describe what kinds of timing tests these are? I obviously lack the > > kind of equipment for this, but I'd still like to know how you get these > > results. > > > > > Hi Thierry, > The test that was failing was the THS-TRAIL test. You can find the details > at [1], test is 8.1.13. The time was 7.7ns too short (or 12%, as David > stated). > > I'm not sure how David arrived at the value he did to extend HS-TRAIL, but > that particular test is now passing. From reading the document that you linked to and comparing to the D-PHY specification (version 1.2, Table 14, Page 40), the proper formula for the HSTrail parameter would be: max(n * 8 * period, 60 + n * 4 * period) I suspect that the additional 3 * period * 8 in this patch is derived from the note about "n", which is 1 for forward-direction high-speed mode and 4 for reverse-direction high-speed mode. Translating this to the code, the correct line would really be: timing->hstrail = max(4 * 8 * period, 60 + 4 * 4 * period); Since the "n" parameter appears in the second term, too. Also this is not Tegra-specific after all, so mipi_dphy_timing_get_default() indeed is the right place for it. How about the attached patch? Thierry