Skip to content

Commit

Permalink
drivers: mipi_dbi: add support for parallel 8080/6800 modes using GPIO
Browse files Browse the repository at this point in the history
Introduce GPIO-based driver for MIPI DBI class that allows MIPI DBI
type A and B displays to be used on general platforms.

Since each data pin GPIO can be selected individually, the bus pins are
set in a loop, which has a significant negative impact on performance.
When using 8-bit mode and all the data GPIO pins are on the same port,
a look-up table is generated to set the whole port at once as a
performance optimization. This creates a RAM overhead of about 1 kiB.

Tested 8-bit 8080 mode with ILI9486 display on nRF52840-DK board.

Signed-off-by: Stefan Gloor <code@stefan-gloor.ch>
  • Loading branch information
stgloorious committed Sep 15, 2024
1 parent bab8aad commit 5f4758c
Show file tree
Hide file tree
Showing 6 changed files with 445 additions and 1 deletion.
3 changes: 2 additions & 1 deletion doc/hardware/peripherals/mipi_dbi.rst
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,8 @@ MIPI DBI defines 3 interface types:

#. 8 write clocks per byte. Command/data selected via GPIO pin

Currently, the API only supports Type C controllers, options 1 and 3.
Currently, the API does not support Type C controllers with 16 write clocks
(option 2).

API Reference
*************
Expand Down
1 change: 1 addition & 0 deletions drivers/mipi_dbi/CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
# SPDX-License-Identifier: Apache-2.0

zephyr_sources_ifdef(CONFIG_MIPI_DBI_SPI mipi_dbi_spi.c)
zephyr_sources_ifdef(CONFIG_MIPI_DBI_GPIO mipi_dbi_gpio.c)
zephyr_sources_ifdef(CONFIG_MIPI_DBI_SMARTBOND mipi_dbi_smartbond.c)
zephyr_sources_ifdef(CONFIG_MIPI_DBI_NXP_LCDIC mipi_dbi_nxp_lcdic.c)
zephyr_sources_ifdef(CONFIG_MIPI_DBI_NXP_FLEXIO_LCDIF mipi_dbi_nxp_flexio_lcdif.c)
Expand Down
1 change: 1 addition & 0 deletions drivers/mipi_dbi/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,7 @@ config MIPI_DBI_INIT_PRIORITY
MIPI-DBI Host Controllers initialization priority.

source "drivers/mipi_dbi/Kconfig.spi"
source "drivers/mipi_dbi/Kconfig.gpio"
source "drivers/mipi_dbi/Kconfig.smartbond"
source "drivers/mipi_dbi/Kconfig.nxp_lcdic"
source "drivers/mipi_dbi/Kconfig.nxp_flexio_lcdif"
Expand Down
12 changes: 12 additions & 0 deletions drivers/mipi_dbi/Kconfig.gpio
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
# Copyright 2024 Stefan Gloor
# SPDX-License-Identifier: Apache-2.0

config MIPI_DBI_GPIO
bool "MIPI DBI GPIO driver"
default y
depends on DT_HAS_ZEPHYR_MIPI_DBI_GPIO_ENABLED
select GPIO
help
Enable support for MIPI DBI GPIO driver. This driver implements
a MIPI-DBI mode A and B compatible controller using GPIO.

Loading

0 comments on commit 5f4758c

Please sign in to comment.