linux-media.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Dave Stevenson <dave.stevenson@raspberrypi.com>
To: "Stein, Alexander" <Alexander.Stein@tq-group.com>
Cc: "mani@kernel.org" <mani@kernel.org>,
	"mchehab@kernel.org" <mchehab@kernel.org>,
	"linux-media@vger.kernel.org" <linux-media@vger.kernel.org>
Subject: Re: (EXT) Re: (EXT) Re: Sony IMX290 link frequency
Date: Mon, 27 Sep 2021 14:56:36 +0100	[thread overview]
Message-ID: <CAPY8ntBHPq8skJ9Dgz2ENsP8vv58nQuOgWooguYi5qZYHcwnYw@mail.gmail.com> (raw)
In-Reply-To: <4748e83d608727a240b817375fec459649ec02cb.camel@tq-group.com>

On Thu, 23 Sept 2021 at 14:44, Stein, Alexander
<Alexander.Stein@tq-group.com> wrote:
>
> Hello Dave,
>
> On Tue, 21 Sept 2021 at 11:41 +0100, Dave Stevenson:
> > Whilst the spec is restricted, there are a few introductions that
> > give
> > a basic understanding, eg [1]
>
> Thanks, this helped a bit.
>
> > Clock lanes and data lanes may do slightly different things. It is
> > not
> > uncommon for the clock lane to remain in HS mode at all times, but
> > the
> > data lanes will almost always drop to LP-11. Device tree has a
> > clock-noncontinuous property to denote that the clock lane drops to
> > LP, which maps to the V4L2 flag V4L2_MBUS_CSI2_NONCONTINUOUS_CLOCK.
> > There is no mention in the datasheet as to whether IMX290/327
> > produces
> > a continuous clock signal or not, and I can't say that I've checked.
> > Some receivers can get confused if the clock is continuous and they
> > miss the initial state change from LP to HS.
>
> Who drives the clock lane? The sensor or the host processor? If it is
> the sensor how do you support several sensors on the same bus?

The sensor.
With MIPI D-PHY a source (CSI2 or DSI) will always have one clock lane
and one or more data lanes.
Some SoC's allow you to reconfigure how lanes are used, but I've never
known a way to combine multiple sensors into a single CSI-2 receiver.

> > > > > > > I assume now that my current problem regarding settle time is
> > > somewhere
> else. I can currently only assume the escape clock is not correct,
> > > but
> there is pretty much no documentation at all on that topic.
> >
> > What platform are you working with?
>
> I'm working on an i.MX8QM based board. A public RM is available since
> several days [1]. The MIPI-CSI subsystem chapters are a bit lacking.
> Also I am aware that the ISI does some strange things with CSI input,
> see also [1], but that is a different issue.
>
> As far as I understand different documents, the escape clock is used
> during LP-11 and shall be from 10 to 20 MHz.
> The device tree configures some clock to 72MHz [2], but I do not know
> what's happening internally.
>
> I used the same approach for calculating the settle time as [3]. But I
> have to use a value slightly below the maximum rather than the average

I don't know the details of iMX8.
For BCM283x we supply an LP clock of 100MHz, and indeed that clocks
the block state machine for handling LP state transitions. LP mode is
relatively low speed in comparison to that - typically 10-20MHz if
memory serves correctly.

I vaguely remember one of the SoCs being very fussy about when the
sensor is left at LP-11. Looking at history, that appears to be
Renesas, but may apply to iMX8.
The IMX290 datasheet implies that the sensor will exit ULPS (LP-00)
state 20usecs after XCLR goes high, and remain in LP-11 standby mode
is cancelled (the clock lane then enters HS mode).

  Dave

> > There are registers in the IMX290/327 which configure the MIPI
> > timings
> > - 0x3445-0x3455. The values do differ based on the link frequency,
> > but
> > checking our driver to the datasheet they appear to be all correct.
>
> Agreed.
>
> [1] https://www.nxp.com/docs/en/reference-manual/IMX8QMRM.pdf
> [2]
> https://yhbt.net/lore/all/20200226151431.GY5379@paasikivi.fi.intel.com/T/
>
> [3]
> https://source.codeaurora.org/external/imx/linux-imx/tree/arch/arm64/boot/dts/freescale/imx8-ss-img.dtsi?h=lf-5.10.y#n516
>
> [4]
> https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/staging/media/imx/imx8mq-mipi-csi2.c#n343
>
> --
> Mit freundlichen Grüßen
>
> i.A. Alexander Stein
> Entwicklung Standort
> Chemnitz
> Tel. +49 371 433151-0, Fax +49 371 433151-22
> Zwickauer Straße
> 173, 09116 Chemnitz
> mailto: Alexander.Stein@tq-group.com
>
> TQ-Systems GmbH
> Mühlstraße 2, Gut Delling, 82229 Seefeld
> Amtsgericht München, HRB 105018
> Sitz der Gesellschaft: Seefeld
> Geschäftsführer: Detlef Schneider, Rüdiger Stahl, Stefan Schneider
> www.tq-group.com

      reply	other threads:[~2021-09-27 13:56 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-09-20  7:08 Sony IMX290 link frequency Stein, Alexander
2021-09-20 11:27 ` Dave Stevenson
2021-09-21  6:49   ` (EXT) " Stein, Alexander
2021-09-21 10:41     ` Dave Stevenson
2021-09-23 13:44       ` (EXT) " Stein, Alexander
2021-09-27 13:56         ` Dave Stevenson [this message]

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=CAPY8ntBHPq8skJ9Dgz2ENsP8vv58nQuOgWooguYi5qZYHcwnYw@mail.gmail.com \
    --to=dave.stevenson@raspberrypi.com \
    --cc=Alexander.Stein@tq-group.com \
    --cc=linux-media@vger.kernel.org \
    --cc=mani@kernel.org \
    --cc=mchehab@kernel.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).