mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
To: Dave Stevenson <dave.stevenson@raspberrypi.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
Subject: Re: [PATCH 5/8] drm/bridge: tc358762: Drop SPICMR write
Date: Thu, 26 Mar 2026 17:24:33 +0200	[thread overview]
Message-ID: <cd97c901-1c3d-4272-94f3-7e36a6e34d58@ideasonboard.com> (raw)
In-Reply-To: <CAPY8ntDHqKEh9Ad9G7Fh6ygA5iAERFVMXaOw=gYYmrW+P_yAzQ@mail.gmail.com>

Hi,

On 26/03/2026 17:13, Dave Stevenson wrote:
> Hi Tomi
> 
> On Thu, 26 Mar 2026 at 13:13, Tomi Valkeinen
> <tomi.valkeinen@ideasonboard.com> wrote:
>>
>> Drop write to SPICMR. It's unclear why the write is there, and it's
>> mostly just writing zeroes to already zero fields (reset defaults).
> 
> What version of the datasheet are you working from? I have 1.41 from Nov 2013.

I have Rev 1.36.

> Offset 0x0450 bits 15:0 is register SPICTRL. All those bits do default to 0.
> Offset 0x0450 bits 31:16 is register SPIRCMR, with clkmask in bits
> 25:16. The table says the default for that field is 0x3ff, but the
> description says "0 (default) to 1023".

Yes, the mask (possibly) has a non-zero reset value (that's why I said
"mostly").

> Changelog 1.17, July 2009 - "changed clkmask default to 'h3ff".
> 
> The SPI output of the chip isn't used on the Pi display, but it is in
> DPI mode which defaults to sending commands out the port. I haven't
> read the whole datasheet to work out the mechanism for sending SPI
> commands to determine if it relevant at all.

I haven't studied the SPI support, but afaics it requires explicit
support in the driver. Which we don't have. So we only have this one odd
write to an SPI register, which, afaics, doesn't do anything like
"disable this unused feature" or such.

So I thought we can drop it as it's just confusing the reader there. If
there indeed is some use for it, or if removing the write has some side
effect, we can definitely keep it.

 Tomi

>   Dave
> 
>> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@ideasonboard.com>
>> ---
>>  drivers/gpu/drm/bridge/tc358762.c | 2 --
>>  1 file changed, 2 deletions(-)
>>
>> diff --git a/drivers/gpu/drm/bridge/tc358762.c b/drivers/gpu/drm/bridge/tc358762.c
>> index 053579591dba..52e2f3a73721 100644
>> --- a/drivers/gpu/drm/bridge/tc358762.c
>> +++ b/drivers/gpu/drm/bridge/tc358762.c
>> @@ -149,8 +149,6 @@ static int tc358762_init(struct tc358762 *ctx)
>>         tc358762_write(ctx, PPI_D1S_ATMR, 0);
>>         tc358762_write(ctx, PPI_LPTXTIMECNT, LPX_PERIOD);
>>
>> -       tc358762_write(ctx, SPICMR, 0x00);
>> -
>>         lcdctrl = FIELD_PREP(LCDCTRL_PXLFORM, LCDCTRL_PXLFORM_RGB888) |
>>                   LCDCTRL_DPI_EN;
>>
>>
>> --
>> 2.43.0
>>


  reply	other threads:[~2026-03-26 15:24 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-03-26 13:12 [PATCH 0/8] drm/bridge: tc358762: Various small fixes Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 1/8] drm/bridge: tc358762: Clean up register defines Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 2/8] drm/bridge: tc358762: Improce SYSCTRL " Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 3/8] drm/bridge: tc358762: Improve LCDCTRL defines Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 4/8] drm/bridge: tc358762: Configure SYSCTRL first Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 5/8] drm/bridge: tc358762: Drop SPICMR write Tomi Valkeinen
2026-03-26 15:13   ` Dave Stevenson
2026-03-26 15:24     ` Tomi Valkeinen [this message]
2026-03-26 13:12 ` [PATCH 6/8] drm/bridge: tc358762: Improve DPI enable handling Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 7/8] drm/bridge: tc358762: Update comment about the number of lanes Tomi Valkeinen
2026-03-26 13:12 ` [PATCH 8/8] drm/bridge: tc358762: Support VTG (but don't enable it) Tomi Valkeinen

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=cd97c901-1c3d-4272-94f3-7e36a6e34d58@ideasonboard.com \
    --to=tomi.valkeinen@ideasonboard.com \
    --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=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

all inboxes | Powered by JetHome®