From: David Heidelberg Date: Thu, 23 Oct 2025 20:24:26 +0000 (+0200) Subject: drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel X-Git-Url: http://git.ipfire.org/gitweb.cgi?a=commitdiff_plain;h=88148c30ef26593e239ee65284126541b11e0726;p=thirdparty%2Fkernel%2Flinux.git drm/panel: Add Samsung S6E3FC2X01 DDIC with AMS641RW panel Add panel driver used in the OnePlus 6T. No datasheet, based mostly on EDK2 init sequence and the downstream driver. Note: This driver doesn't use previously mentioned "samsung,s6e3fc2x01" by OnePlus 6T device-tree. The reason is because DDIC itself without knowing the panel type used with it will not give the driver enough information about the panel used, as the panel cannot be autodetected. While would be more practical to support the original compatible, I would like to avoid it, to prevent confusing devs upstreaming DDICs. Based on work of: Casey Connolly Joel Selvaraj Nia Espera Signed-off-by: David Heidelberg Reviewed-by: Jessica Zhang Reviewed-by: Dmitry Baryshkov Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20251023-s6e3fc2x01-v5-2-8f8852e67417@ixit.cz --- diff --git a/MAINTAINERS b/MAINTAINERS index eb9292a6ff7a6..5d59ff76cfc6f 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8072,6 +8072,7 @@ DRM DRIVER FOR SAMSUNG S6E3FC2X01 DDIC M: David Heidelberg S: Maintained F: Documentation/devicetree/bindings/display/panel/samsung,s6e3fc2x01.yaml +F: drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c DRM DRIVER FOR SAMSUNG S6E3HA8 PANELS M: Dzmitry Sankouski diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 045ffb2ccd0f0..fadb7f397837e 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -801,6 +801,19 @@ config DRM_PANEL_SAMSUNG_S6D7AA0 select DRM_MIPI_DSI select VIDEOMODE_HELPERS +config DRM_PANEL_SAMSUNG_S6E3FC2X01 + tristate "Samsung S6E3FC2X01 DSI panel controller" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y or M here if you want to enable support for the + Samsung S6E3FC2 DDIC and connected MIPI DSI panel. + Currently supported panels: + + Samsung AMS641RW (found in the OnePlus 6T smartphone) + config DRM_PANEL_SAMSUNG_S6E3HA2 tristate "Samsung S6E3HA2 DSI video mode panel" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 0356775a443ad..ae56f64982cfb 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -79,6 +79,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D16D0) += panel-samsung-s6d16d0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D27A1) += panel-samsung-s6d27a1.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6D7AA0) += panel-samsung-s6d7aa0.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FA7) += panel-samsung-s6e3fa7.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC2X01) += panel-samsung-s6e3fc2x01.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA8) += panel-samsung-s6e3ha8.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c new file mode 100644 index 0000000000000..e63080204af77 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc2x01.c @@ -0,0 +1,385 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Copyright (c) 2022 Nia Espera + * Copyright (c) 2025 David Heidelberg + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include