notro / panel-mipi-dbi

12 stars 1 forks source link

mipi_dbi_typec3_command quirk for 16 bit parallel interfaces #5

Open dsx724 opened 11 months ago

dsx724 commented 11 months ago

mipi_dbi_typec3_command setups 8 bpw transfers over SPI

mipi_dbi_spi_transfer(spi, speed_hz, 8, cmd, 1);

Should a quirk or parameter for devices that are behind 16-bit parallel interfaces but communicate over SPI? Or maybe arbitrary bit interfaces?

Otherwise the data gets kind of clobbered. I know these hacked displays are not the primary target of panel-mipi-dbi but it would be good to support with one driver.

dsx724 commented 11 months ago

@notro If I code something like reg width handling for this driver and a DT quirk for this, do you think it will get accepted upstream?

notro commented 11 months ago

It's not part of the MIPI DBI specification so it won't be accepted in the panel-mipi-dbi driver. Your best bet is to add specific support for your panel in a controller driver. Example: drivers/gpu/drm/tiny/ili9486.c

dsx724 commented 11 months ago

Most ILI9486 boards uses 16-bit shift registers but not all. I was thinking that maybe we can implement a generic driver for these serial to parallel register displays behind fixed register width. This way we don't clutter the kernel with the same driver under a dozen confusing names due to the bus/register design and create more flexibility.

For example, I have one ILI9486 that is using the SPI interface rather than a SPI to parallel interface via registers. But it can get confusing when people design compatibles.