[PATCH 7/7] drm/panel: sitronix-st7789v: Check display ID

Miquel Raynal miquel.raynal at bootlin.com
Fri Jun 16 10:13:45 UTC 2023


Hi Sebastian,

sre at kernel.org wrote on Thu, 15 Jun 2023 01:27:24 +0200:

> Hi,
> 
> On Sat, Jun 10, 2023 at 10:45:25PM +0200, Sam Ravnborg wrote:
> > Hi Miquel,
> > 
> > On Fri, Jun 09, 2023 at 04:59:51PM +0200, Miquel Raynal wrote:  
> > > A very basic debugging rule when a device is connected for the first
> > > time is to access a read-only register which contains known data in
> > > order to ensure the communication protocol is properly working. This
> > > driver lacked any read helper which is often a critical peace for
> > > fastening bring-ups.
> > > 
> > > Add a read helper and use it to verify the communication with the panel
> > > is working as soon as possible in order to fail early if this is not the
> > > case.  
> > 
> > The read helper seems like a log of general boiler plate code.
> > I briefly looked into the use of regmap for the spi communication,
> > but it did not look like it supported the bit9 stuff.
> > 
> > I did not stare enough to add a reviewd by, but the approach is fine
> > and it is good to detech issues early.  
> 
> The st7789v datasheet describes a setup where SPI is connected
> unidirectional (i.e. without MISO). In that case the ID check
> will fail.

Right. I'll add a (spi->mode & SPI_NO_RX) check, as the default is to
have both lines, if there is no MISO line, I'd expect it to be
described in the DT, otherwise the description is broken.

Thanks,
Miquèl


More information about the dri-devel mailing list