All of lore.kernel.org
 help / color / mirror / Atom feed
From: Andreas Kemnade <andreas@kemnade.info>
To: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
Cc: Marek Vasut <marex@denx.de>,
	Andrzej Hajda <andrzej.hajda@intel.com>,
	Neil Armstrong <neil.armstrong@linaro.org>,
	Robert Foss <rfoss@kernel.org>,
	Laurent Pinchart <Laurent.pinchart@ideasonboard.com>,
	Jonas Karlman <jonas@kwiboo.se>,
	Jernej Skrabec <jernej.skrabec@gmail.com>,
	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>,
	dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org,
	Dave Stevenson <dave.stevenson@raspberrypi.com>
Subject: Re: [PATCH v3 07/13] drm/bridge: tc358762: Update comment about the number of lanes
Date: Mon, 22 Jun 2026 22:37:54 +0200	[thread overview]
Message-ID: <20260622223754.65f3ce97@kemnade.info> (raw)
In-Reply-To: <8efe44d7-3864-45cb-bd79-f25f573b6432@ideasonboard.com>

On Mon, 22 Jun 2026 10:31:35 +0300
Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:

> Hi,
> 
> On 29/05/2026 21:34, Andreas Kemnade wrote:
> > On Wed, 13 May 2026 16:10:16 +0300
> > Tomi Valkeinen <tomi.valkeinen@ideasonboard.com> wrote:
> >   
> >> Update comment about the number of lanes.
> >>
> >> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
> >> ---
> >>   drivers/gpu/drm/bridge/tc358762.c | 9 ++++++++-
> >>   1 file changed, 8 insertions(+), 1 deletion(-)
> >>
> >> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
> >> index 7840ab3454f6..c5734c4df440 100644
> >> --- a/drivers/gpu/drm/bridge/tc358762.c
> >> +++ b/drivers/gpu/drm/bridge/tc358762.c
> >> @@ -306,7 +306,14 @@ static int tc358762_probe(struct mipi_dsi_device *dsi)
> >>   	ctx->dev = dev;
> >>   	ctx->pre_enabled = false;
> >>   
> >> -	/* TODO: Find out how to get dual-lane mode working */
> >> +	/*
> >> +	 * When using DSI clk for pixel clock (only mode supported in the driver),
> >> +	 * the pclk is derived directly from the DSI byteclk via simple divider,
> >> +	 * which is either 2 or 3.
> >> +	 * The required divider can be calculated with bitspp / 8 / nlanes. Thus,
> >> +	 * for RGB888, only nlanes = 1 works as nlanes = 2 would require divider
> >> +	 * of 1.5.
> >> +	 */
> >>   	dsi->lanes = 1;
> >>   	dsi->format = MIPI_DSI_FMT_RGB888;
> >>   	dsi->mode_flags = MIPI_DSI_MODE_VIDEO | MIPI_DSI_MODE_VIDEO_SYNC_PULSE |
> >>  
> > wondering: I am using lanes = 2 and RGB888. But I need to write something to
> > SYSPLL3 register. Which somehow is sensitive to write to.... Do you have any
> information about that register?  
> If you have an external refclk, then you can use the tc358762 pll to 
> generate the clock, which I guess you are using. SYSPLL3 configures some 
> parts of the PLL, and the doc says the write to SYSPLL3 must be the last 
> in the sequence.
>
Thanks for that explaination. Your comment in the code is really helpful.

I have anly a 22 page datasheet and I know only that the reference clock 
can be 6-40Mhz from that datasheet and the pixclock is 41600 according to
drm_display_mode struct.
I know the value which works is 0xB8640000.

I am asking all this since I want to upstream the display support for the
Epson Movero BT-200. The vendor kernel is 3.0. It is an old-style omapfb
display driver there. I converted it to a modern drm panel driver
with integrated bridge handling and now I am investingating how to use the
bridge driver together with a separate panel driver.

The clean way would be to define the input clock, and add code to 
calculate pll parameters. But without information, probably the
best way is to adjust magic numbers based on
if (of_machine_is_compatible())

Regards,
Andreas

  reply	other threads:[~2026-06-22 20:38 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-05-13 13:10 [PATCH v3 00/13] drm/bridge: tc358762: Various small fixes Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 01/13] drm/bridge: tc358762: Clean up register defines Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 02/13] drm/bridge: tc358762: Improve SYSCTRL " Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 03/13] drm/bridge: tc358762: Improve LCDCTRL defines Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 04/13] drm/bridge: tc358762: Configure SYSCTRL first Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 05/13] drm/bridge: tc358762: Drop SPICMR write Tomi Valkeinen
2026-05-29 18:42   ` Andreas Kemnade
2026-06-19  6:23   ` Andreas Kemnade
2026-06-21  6:41     ` Andreas Kemnade
2026-06-22  7:45       ` Tomi Valkeinen
2026-06-22 16:35         ` Andreas Kemnade
2026-05-13 13:10 ` [PATCH v3 06/13] drm/bridge: tc358762: Improve DPI enable handling Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 07/13] drm/bridge: tc358762: Update comment about the number of lanes Tomi Valkeinen
2026-05-29 18:34   ` Andreas Kemnade
2026-06-22  7:31     ` Tomi Valkeinen
2026-06-22 20:37       ` Andreas Kemnade [this message]
2026-05-13 13:10 ` [PATCH v3 08/13] drm/bridge: tc358762: Support VTG Tomi Valkeinen
2026-06-21  6:51   ` Andreas Kemnade
2026-05-13 13:10 ` [PATCH v3 09/13] drm/bridge: tc358762: Fix sync polarities Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 10/13] drm/bridge: tc358762: Move tc358762_init() into tc358762_enable() Tomi Valkeinen
2026-05-29 19:21   ` Andreas Kemnade
2026-06-22  7:38     ` Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 11/13] drm/bridge: tc358762: Drop drm_bridge_funcs.mode_set Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 12/13] drm/bridge: tc358762: Set DE_POL and DCLK_POL properly Tomi Valkeinen
2026-05-13 13:10 ` [PATCH v3 13/13] drm/panel-simple: Fix powertip,ph800480t013-idf02 timings Tomi Valkeinen
2026-05-18 14:01   ` Neil Armstrong

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=20260622223754.65f3ce97@kemnade.info \
    --to=andreas@kemnade.info \
    --cc=Laurent.pinchart@ideasonboard.com \
    --cc=airlied@gmail.com \
    --cc=andrzej.hajda@intel.com \
    --cc=dave.stevenson@raspberrypi.com \
    --cc=dri-devel@lists.freedesktop.org \
    --cc=jernej.skrabec@gmail.com \
    --cc=jonas@kwiboo.se \
    --cc=linux-kernel@vger.kernel.org \
    --cc=maarten.lankhorst@linux.intel.com \
    --cc=marex@denx.de \
    --cc=mripard@kernel.org \
    --cc=neil.armstrong@linaro.org \
    --cc=rfoss@kernel.org \
    --cc=simona@ffwll.ch \
    --cc=tomi.valkeinen@ideasonboard.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.