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