From 43f447605e44897bdc2fca1428024989a9918d80 Mon Sep 17 00:00:00 2001 From: Dave Stevenson Date: Wed, 5 Jan 2022 19:14:48 +0000 Subject: [PATCH] drm/panel: Add panel driver for Ilitek ILI9806E panel The Ilitek ILI9806E driver is used in the Pimoroni HyperPixel4 and potentially other displays. Whilst it can support multiple interfaces, this driver only accounts for SPI configuration and DPI video data. Signed-off-by: Dave Stevenson --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-ilitek-ili9806e-spi.c | 479 ++++++++++++++++++ 3 files changed, 491 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -223,6 +223,17 @@ config DRM_PANEL_ILITEK_ILI9806E Say Y if you want to enable support for panels based on the Ilitek ILI9806E controller. +config DRM_PANEL_ILITEK_ILI9806E_SPI + tristate "Ilitek ILI9806E-based panels on SPI/DPI" + depends on OF && SPI + select DRM_KMS_HELPER + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DBI + help + Say Y if you want to enable support for panels based on the + Ilitek ILI9806e controller using DPI for video and SPI for + configuration. + config DRM_PANEL_ILITEK_ILI9881C tristate "Ilitek ILI9881C-based panels" depends on OF --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -23,6 +23,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9805) += panel-ilitek-ili9805.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E) += panel-ilitek-ili9806e.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI) += panel-ilitek-ili9806e-spi.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9882T) += panel-ilitek-ili9882t.o obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c @@ -0,0 +1,479 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Ilitek ILI9806E TFT LCD drm_panel driver. + * + * Copyright (C) 2022 Raspberry Pi Ltd + * + * Derived from drivers/drm/gpu/panel/panel-sitronix-st7789v.c + * Copyright (C) 2017 Free Electrons + */ + +#include +#include + +#include +#include +#include +#include +#include +#include +#include +#include + +#include