public inbox for devicetree@vger.kernel.org
 help / color / mirror / Atom feed
From: Mikko Perttunen <mperttunen@nvidia.com>
To: Svyatoslav Ryhel <clamor95@gmail.com>
Cc: Maarten Lankhorst <maarten.lankhorst@linux.intel.com>,
	Maxime Ripard <mripard@kernel.org>,
	Thomas Zimmermann <tzimmermann@suse.de>,
	David Airlie <airlied@gmail.com>, Simona Vetter <simona@ffwll.ch>,
	Rob Herring <robh@kernel.org>,
	Krzysztof Kozlowski <krzk+dt@kernel.org>,
	Conor Dooley <conor+dt@kernel.org>,
	Thierry Reding <thierry.reding@gmail.com>,
	Thierry Reding <treding@nvidia.com>,
	Jonathan Hunter <jonathanh@nvidia.com>,
	Prashant Gaikwad <pgaikwad@nvidia.com>,
	Michael Turquette <mturquette@baylibre.com>,
	Stephen Boyd <sboyd@kernel.org>,
	Dmitry Osipenko <digetx@gmail.com>,
	dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org,
	linux-tegra@vger.kernel.org, linux-kernel@vger.kernel.org,
	linux-clk@vger.kernel.org
Subject: Re: [PATCH v1 3/5] gpu/drm: host1x: mipi: add Tegra20/Tegra30 MIPI calibration logic
Date: Wed, 23 Jul 2025 10:36:22 +0900	[thread overview]
Message-ID: <4158240.taCxCBeP46@senjougahara> (raw)
In-Reply-To: <CAPVz0n1TxOb_hKgKYTdeJ=Ka0STqfiHLtwAv+Ws=vtq=G-MAow@mail.gmail.com>

On Friday, July 18, 2025 6:17 PM Svyatoslav Ryhel wrote:
> пт, 18 лип. 2025 р. о 12:11 Mikko Perttunen <mperttunen@nvidia.com> пише:
> > On Thursday, July 17, 2025 11:21 PM Svyatoslav Ryhel wrote:
> > > ...
> > > @@ -311,6 +330,43 @@ int tegra_mipi_finish_calibration(struct
> > > tegra_mipi_device *device) }
> > > 
> > >  EXPORT_SYMBOL(tegra_mipi_finish_calibration);
> > > 
> > > +static int tegra20_mipi_calibration(struct tegra_mipi_device *device)
> > > +{
> > > +     struct tegra_mipi *mipi = device->mipi;
> > > +     const struct tegra_mipi_soc *soc = mipi->soc;
> > > +     u32 value;
> > > +     int err;
> > > +
> > > +     err = clk_enable(mipi->csi_clk);
> > > +     if (err < 0)
> > > +             return err;
> > > +
> > > +     mutex_lock(&mipi->lock);
> > > +
> > > +     value = MIPI_CAL_CONFIG_TERMOS(soc->termos);
> > > +     tegra_mipi_writel(mipi, value, CSI_CILA_MIPI_CAL_CONFIG);
> > > +
> > > +     value = MIPI_CAL_CONFIG_TERMOS(soc->termos);
> > > +     tegra_mipi_writel(mipi, value, CSI_CILB_MIPI_CAL_CONFIG);
> > > +
> > > +     value = MIPI_CAL_CONFIG_HSPDOS(soc->hspdos) |
> > > +             MIPI_CAL_CONFIG_HSPUOS(soc->hspuos);
> > > +     tegra_mipi_writel(mipi, value, CSI_DSI_MIPI_CAL_CONFIG);
> > > +
> > > +     value = MIPI_CAL_BIAS_PAD_DRV_DN_REF(soc->pad_drive_down_ref) |
> > > +             MIPI_CAL_BIAS_PAD_DRV_UP_REF(soc->pad_drive_up_ref);
> > > +     tegra_mipi_writel(mipi, value, CSI_MIPIBIAS_PAD_CONFIG);
> > > +
> > > +     tegra_mipi_writel(mipi, 0x0, CSI_CIL_PAD_CONFIG);
> > > +
> > > +     mutex_unlock(&mipi->lock);
> > > +
> > > +     clk_disable(mipi->csi_clk);
> > > +     clk_disable(mipi->clk);
> > > +
> > > +     return 0;
> > > +}
> > > +
> > 
> > Where does this sequence come from? It looks a bit strange to me, since it
> > doesn't trigger calibration at all. It would be useful to mention the
> > source in the commit message.
> > 
> > Mikko
> 
> Downstream nvidia sources, 3.1.10 and 3.4, dsi driver, function
> tegra_dsi_pad_calibration

Thanks!

Indeed, looks like for DSI calibration, the HW calibration is never triggered. 
However, for CSI pads, it is. We should take this into account in the device 
tree binding (and driver when CSI support is added) -- the parameter in 
nvidia,mipi-calibrate should specify we're calibrating DSI (probably with an 
enumeration defined in a header file).

Another thing -- the commit subject prefix for gpu/host1x is "gpu: host1x: ", 
and for gpu/drm/tegra "drm/tegra: ".

Cheers,
Mikko




  reply	other threads:[~2025-07-23  1:36 UTC|newest]

Thread overview: 18+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-07-17 14:21 [PATCH v1 0/5] gpu/drm: tegra: add DSI support for Tegra20/Tegra30 Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 1/5] dt-bindings: display: tegra: document MIPI calibration " Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 2/5] clk: tegra20: reparent dsi clock to pll_d_out0 Svyatoslav Ryhel
2025-07-17 14:21 ` [PATCH v1 3/5] gpu/drm: host1x: mipi: add Tegra20/Tegra30 MIPI calibration logic Svyatoslav Ryhel
2025-07-18  9:11   ` Mikko Perttunen
2025-07-18  9:17     ` Svyatoslav Ryhel
2025-07-23  1:36       ` Mikko Perttunen [this message]
2025-08-16 14:36   ` Dmitry Osipenko
2025-07-17 14:21 ` [PATCH v1 4/5] gpu/drm: tegra: dsi: add support for Tegra20/Tegra30 Svyatoslav Ryhel
2025-07-18  9:15   ` Mikko Perttunen
2025-07-18  9:19     ` Svyatoslav Ryhel
2025-07-18  9:25       ` Mikko Perttunen
2025-07-17 14:21 ` [PATCH v1 5/5] ARM: tegra: add MIPI calibration binding " Svyatoslav Ryhel
2025-07-18  9:01   ` Mikko Perttunen
2025-07-18  9:15     ` Svyatoslav Ryhel
2025-07-18  9:22       ` Mikko Perttunen
2025-07-18  9:26         ` Svyatoslav Ryhel
2025-07-23  1:57           ` Mikko Perttunen

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=4158240.taCxCBeP46@senjougahara \
    --to=mperttunen@nvidia.com \
    --cc=airlied@gmail.com \
    --cc=clamor95@gmail.com \
    --cc=conor+dt@kernel.org \
    --cc=devicetree@vger.kernel.org \
    --cc=digetx@gmail.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jonathanh@nvidia.com \
    --cc=krzk+dt@kernel.org \
    --cc=linux-clk@vger.kernel.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-tegra@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=mripard@kernel.org \
    --cc=mturquette@baylibre.com \
    --cc=pgaikwad@nvidia.com \
    --cc=robh@kernel.org \
    --cc=sboyd@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=thierry.reding@gmail.com \
    --cc=treding@nvidia.com \
    --cc=tzimmermann@suse.de \
    /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