1# Copyright 2023 NXP
2#
3# SPDX-License-Identifier: Apache-2.0
4
5zephyr_sources_ifdef(CONFIG_MIPI_DBI_SPI mipi_dbi_spi.c)
6zephyr_sources_ifdef(CONFIG_MIPI_DBI_BITBANG mipi_dbi_bitbang.c)
7zephyr_sources_ifdef(CONFIG_MIPI_DBI_SMARTBOND mipi_dbi_smartbond.c)
8zephyr_sources_ifdef(CONFIG_MIPI_DBI_NXP_LCDIC mipi_dbi_nxp_lcdic.c)
9zephyr_sources_ifdef(CONFIG_MIPI_DBI_NXP_FLEXIO_LCDIF mipi_dbi_nxp_flexio_lcdif.c)
10zephyr_sources_ifdef(CONFIG_MIPI_DBI_STM32_FMC mipi_dbi_stm32_fmc.c)
11# Data bus width is used by the SDK driver and processes it as a compile time option
12if(CONFIG_MIPI_DBI_NXP_FLEXIO_LCDIF)
13  dt_chosen(flexio0_lcd PROPERTY "zephyr,display")
14  dt_prop(data_bus_width PATH "${flexio0_lcd}" PROPERTY "mipi-mode")
15  # Values for mipi-mode property are defined inside dt-bindings/mipi_dbi/mipi_dbi.h.
16  # We pass a define to the SDK driver if we are using 8-bit mode.
17  if((data_bus_width EQUAL 8) OR (data_bus_width EQUAL 5))
18    zephyr_compile_definitions(FLEXIO_MCULCD_DATA_BUS_WIDTH=8)
19  endif()
20  zephyr_compile_definitions(FLEXIO_MCULCD_LEGACY_GPIO_FUNC=0)
21endif()
22