[PATCH 0/5] video: add support for MIPI DBI interface
John Watts
contact at jookia.org
Fri Jun 14 14:18:40 CEST 2024
Many simple RGB panels use a MIPI DBI interface over SPI, so this patch
adds support for this interface using an API compatible with Linux.
The MIPI DBI interface works similar to SPI using 8-bit words in the
format of: COMMAND DATA1 DATA2 ...
However the interface has two variations on this.
The first variation is implemented by this patch series: Using 9-bit
words, with the first bit signalling whether the word is a COMMAND or
DATA.
The second variation is not implemented by this series: A GPIO is held
at a value during an 8-bit word to indicate if it's a COMMAND or WORD.
Adding support for this wouldn't be too hard, but I don't have any
hardware to test it on.
Linux seems to not implement the specification correctly: It sets CS
inactive between words instead of keeping it active for the entire
transaction. I'm copying this behaviour to keep compatibility in porting
panels across from the kernel.
Signed-off-by: John Watts <contact at jookia.org>
---
John Watts (5):
spi: Return old wordlen in spit_set_wordlen
spi: Limit spi_set_wordlen to SPI_DEFAULT_WORDLEN
spi: Implement spi_set_wordlen for driver model
spi: softspi: Support setting wordlen
video: add support for MIPI DBI interface
drivers/spi/soft_spi.c | 7 +++++
drivers/spi/spi-uclass.c | 29 +++++++++++++++++++
drivers/spi/spi.c | 6 ++--
drivers/video/Kconfig | 6 ++++
drivers/video/Makefile | 1 +
drivers/video/mipi_dbi.c | 70 ++++++++++++++++++++++++++++++++++++++++++++++
include/mipi_dbi.h | 73 ++++++++++++++++++++++++++++++++++++++++++++++++
include/spi.h | 2 +-
8 files changed, 191 insertions(+), 3 deletions(-)
---
base-commit: c0ea27bccfb7d2d37fd36806ac2a2f7389099420
change-id: 20240601-mipi_dbi-aeda98f2f9d5
Best regards,
--
John Watts <contact at jookia.org>
More information about the U-Boot
mailing list