Re: [PATCH 5/8] drm/bridge: tc358762: Drop SPICMR write

From: Dave Stevenson

Date: Thu Mar 26 2026 - 11:16:34 EST


Hi Tomi

On Thu, 26 Mar 2026 at 13:13, Tomi Valkeinen
<tomi.valkeinen@xxxxxxxxxxxxxxxx> 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.

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".

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.

Dave

> Signed-off-by: Tomi Valkeinen <tomi.valkeinen@xxxxxxxxxxxxxxxx>
> ---
> 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
>