linux-tegra.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Thierry Reding <thierry.reding-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
To: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
Cc: linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org,
	"devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org"
	<devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org>,
	"Stéphane Marchesin"
	<marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>,
	"Olof Johansson" <olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org>
Subject: Re: [PATCH 3/4] host1x: mipi: Include clock lanes in mipi calibrate
Date: Mon, 25 Aug 2014 08:33:55 +0200	[thread overview]
Message-ID: <20140825063353.GA12209@ulmo.nvidia.com> (raw)
In-Reply-To: <CAOw6vbJw8S477S+7L_+ozF2aoxUw+TT7=KQObTz6HYXpzPhr5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>

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

On Fri, Aug 22, 2014 at 10:54:50AM -0700, Sean Paul wrote:
> On Thu, Aug 7, 2014 at 10:14 AM, Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org> wrote:
> 
> > On Thu, Aug 7, 2014 at 4:34 AM, Thierry Reding <thierry.reding-Re5JQEeQqe8@public.gmane.orgm>
> > wrote:
> > > On Thu, Aug 07, 2014 at 02:11:46AM -0400, Sean Paul wrote:
> > >> When calibrating the mipi phy, also include the clock lanes
> > >> in the calibration.
> > >>
> > >> Signed-off-by: Sean Paul <seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
> > >> ---
> > >>  drivers/gpu/host1x/mipi.c | 70
> > +++++++++++++++++++++++++++++++++++++----------
> > >>  1 file changed, 56 insertions(+), 14 deletions(-)
> > >>
> > >> diff --git a/drivers/gpu/host1x/mipi.c b/drivers/gpu/host1x/mipi.c
> > >> index 0af2892..80578dc 100644
> > >> --- a/drivers/gpu/host1x/mipi.c
> > >> +++ b/drivers/gpu/host1x/mipi.c
> > >> @@ -49,10 +49,18 @@
> > >>  #define MIPI_CAL_CONFIG_DSIC         0x10
> > >>  #define MIPI_CAL_CONFIG_DSID         0x11
> > >>
> > >> +#define MIPI_CAL_CONFIG_DSIAB_CLK    0x19
> > >> +#define MIPI_CAL_CONFIG_DSICD_CLK    0x1a
> > >> +#define MIPI_CAL_CONFIG_CSIAB_CLK    0x1b
> > >> +#define MIPI_CAL_CONFIG_CSICD_CLK    0x1c
> > >> +#define MIPI_CAL_CONFIG_CSIE_CLK     0x1d
> > >> +
> > >
> > > These registers don't seem to exist on Tegra114 and earlier. It also
> > > seems like MIPI_CAL_CONFIG_DSIC and MIPI_CAL_CONFIG_DSID no longer exist
> > > on Tegra124 and later. And CSIC and CSID seem to be shared with DSIB
> > > (channel A and B) now.
> > >
> > > So I think we'll need something more elaborate than this. It should be
> > > differentiating between SoC revisions to allow checking for valid pad
> > > selection when calibrating.
> > >
> >
> > Yeah, definitely now that you point that out, we'll need something
> > better. I've altered the patch so the regs available depends on
> > compatible value. I'll wait on the following before re-posting.
> >
> > > I'll see if I can find out what's up with the change between Tegra114
> > > and Tegra124 regarding the DSIC and DSID pads. It looks to me like they
> > > were merged to match the DSIA and DSIB controllers, whereas before DSIA
> > > and DSIB were used for controller DSIA and DSIC and DSID were used for
> > > controller DSIB.
> > >
> >
> > Thanks for checking in on this. It would be useful to know which clock
> > lanes need to be configured for which pads. The documentation isn't
> > particularly good on this, so it's possible that my mapping between
> > data lane/clock lane in the modules array is incorrect.
> >
> >
> Hi Thierry,
> Any update on this?

I don't have any definitive answers yet, but from doing a bit of
research it seems that the D-PHY for DSI (and CSI) can be configured to
run in two modes, one where the 4 lanes are used as a single channel and
another where they can drive two channels. My understanding is that that
is what the channels refer to. That is, the D-PHY for controller DSI is
calibrated using the MIPI_CAL_CONFIG_DSIA register (0x0e/0x38) for data
lanes and MIPI_CAL_CONFIG_DSIA_A (0x19/0x64) and MIPI_CAL_CONFIG_DSIA_B
(0x1a/0x68) for clock lanes. For controller DSIB the registers are
MIPI_CAL_CONFIG_DSIB (0x0f/0x3c) and MIPI_CAL_CONFIG_DSIB_A (0x1b/0x6c)
as well as MIPI_CAL_CONFIG_DSIB_B (0x1c/0x70). The second controller
also shares the pads with CSIC and CSID.

As for the difference between Tegra114 and Tegra124 it seems that clock
lane calibration is new in Tegra124 (or perhaps it was done as part of
the data lane calibration on Tegra114), but DSIA and DSIB on Tegra114
refer to DSI channels A and B, whereas DSIC and DSID refer to channels A
and B of DSIB.

The above is still mostly guesswork, though perhaps more educated than
before. I've filed an internal bug to get confirmation from some of our
hardware engineers and clarify this in the TRM. I'll let you know when I
have more information.

Thierry

[-- Attachment #2: Type: application/pgp-signature, Size: 819 bytes --]

  parent reply	other threads:[~2014-08-25  6:33 UTC|newest]

Thread overview: 13+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2014-08-07  6:11 [PATCH 0/4] host1x: mipi: Some patches to improve d-phy calibration Sean Paul
     [not found] ` <1407391907-19488-1-git-send-email-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-08-07  6:11   ` [PATCH 1/4] host1x: mipi: Add new parent clock for mipi calibration Sean Paul
     [not found]     ` <1407391907-19488-2-git-send-email-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-08-07  8:11       ` Thierry Reding
2014-08-07 14:15         ` Sean Paul
     [not found]           ` <CAOw6vbKiECG8w6V3zvnr5Z4r4WuRsq556gtspAnM7Drj=A8m8A-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-07 14:52             ` Thierry Reding
2014-08-07  6:11   ` [PATCH 2/4] host1x: mipi: Preserve the contents of MIPI_CAL_CTRL Sean Paul
     [not found]     ` <1407391907-19488-3-git-send-email-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-08-07  8:12       ` Thierry Reding
2014-08-07  6:11   ` [PATCH 3/4] host1x: mipi: Include clock lanes in mipi calibrate Sean Paul
     [not found]     ` <1407391907-19488-4-git-send-email-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-08-07  8:34       ` Thierry Reding
     [not found]         ` <20140807083429.GA13315-AwZRO8vwLAwmlAP/+Wk3EA@public.gmane.org>
2014-08-07 17:14           ` Sean Paul
     [not found]             ` <CAOw6vbJw8S477S+7L_+ozF2aoxUw+TT7=KQObTz6HYXpzPhr5Q@mail.gmail.com>
     [not found]               ` <CAOw6vbJw8S477S+7L_+ozF2aoxUw+TT7=KQObTz6HYXpzPhr5Q-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-08-25  6:33                 ` Thierry Reding [this message]
2014-08-07  6:11   ` [PATCH 4/4] host1x: mipi: Set MIPI_CAL_BIAS_PAD_CFG1 register Sean Paul
     [not found]     ` <1407391907-19488-5-git-send-email-seanpaul-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org>
2014-08-07  8:39       ` Thierry Reding

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=20140825063353.GA12209@ulmo.nvidia.com \
    --to=thierry.reding-re5jqeeqqe8avxtiumwx3w@public.gmane.org \
    --cc=devicetree-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=linux-tegra-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
    --cc=marcheu-F7+t8E8rja9g9hUCZPvPmw@public.gmane.org \
    --cc=olof-nZhT3qVonbNeoWH0uzbU5w@public.gmane.org \
    --cc=seanpaul-F7+t8E8rja9g9hUCZPvPmw@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;
as well as URLs for NNTP newsgroup(s).