From 6a60273a0e8274820210abcfe7ec0d5f1f38f458 Mon Sep 17 00:00:00 2001 From: Hironori KIKUCHI Date: Sun, 4 Aug 2024 15:14:48 +0900 Subject: [PATCH] drm/panel: st7701: Add support for SPI for configuration The ST7701 supports not only MIPI DSI, but also SPI as an interface for configuration. To support a panel connected via SPI with an RGB parallel interface, add support for SPI using MIPI DBI helpers. Signed-off-by: Hironori KIKUCHI Reviewed-by: Neil Armstrong Reviewed-by: Jessica Zhang Reviewed-by: Conor Dooley Link: https://lore.kernel.org/r/20240804061503.881283-5-kikuchan98@gmail.com Signed-off-by: Neil Armstrong Link: https://patchwork.freedesktop.org/patch/msgid/20240804061503.881283-5-kikuchan98@gmail.com --- drivers/gpu/drm/panel/Kconfig | 3 +- drivers/gpu/drm/panel/panel-sitronix-st7701.c | 123 +++++++++++++++--- 2 files changed, 110 insertions(+), 16 deletions(-) diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 9f49b0189d3b..5d83ddc06ece 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -784,7 +784,8 @@ config DRM_PANEL_SHARP_LS060T1SX01 config DRM_PANEL_SITRONIX_ST7701 tristate "Sitronix ST7701 panel driver" depends on OF - depends on DRM_MIPI_DSI + depends on SPI || DRM_MIPI_DSI + select DRM_MIPI_DBI if SPI depends on BACKLIGHT_CLASS_DEVICE help Say Y here if you want to enable support for the Sitronix diff --git a/drivers/gpu/drm/panel/panel-sitronix-st7701.c b/drivers/gpu/drm/panel/panel-sitronix-st7701.c index a0644f7a4c8b..9e83a760a8ab 100644 --- a/drivers/gpu/drm/panel/panel-sitronix-st7701.c +++ b/drivers/gpu/drm/panel/panel-sitronix-st7701.c @@ -4,6 +4,7 @@ * Author: Jagan Teki */ +#include #include #include #include @@ -14,6 +15,7 @@ #include #include #include +#include #include