From 246f4d6148889ab13778ff91fde76e42df4f69fe Mon Sep 17 00:00:00 2001 From: Jami Kettunen Date: Wed, 18 Nov 2020 23:41:24 +0200 Subject: [PATCH] drm/panel: Add panel driver for Samsung S6E3FC1 The S6E3FC1 is 6" 1080x2160 MIPI DSI command mode AMOLED LCD display found on OnePlus 5T (2017) smartphones. The panel needs to be enabled from a device tree using the "samsung,s6e3fc1" compatible. This driver was generated using the following & includes some minor cleanup (such as s/to_s6e3fc1/to_s6e3fc1_panel/g): $ python3 lmdpdg.py dumpling.dtb -r vddio --- drivers/gpu/drm/panel/Kconfig | 15 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-samsung-s6e3fc1.c | 343 ++++++++++++++++++ 3 files changed, 359 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-samsung-s6e3fc1.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 7818b4e9b9c9..1e793a359f31 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -499,6 +499,21 @@ config DRM_PANEL_SAMSUNG_S6E3FA5 To compile this driver as a module, choose M here: the module will be called panel-samsung-s6e3fa5. +config DRM_PANEL_SAMSUNG_S6E3FC1 + tristate "Samsung S6E3FC1 DSI command mode panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + help + Say Y here if you want to enable support for Samsung S6E3FC1 AMOLED + command mode panel as found in OnePlus 5T (2017) devices. The panel has a + FHD (1080x2160) resolution and uses 24 bit RGB per pixel. It provides a + MIPI DSI interface to the host and has a built-in LED backlight. + + To compile this driver as a module, choose M here: the module + will be called panel-samsung-s6e3fc1. + 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 b8becd6b4084..f87506bca5df 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -48,6 +48,7 @@ obj-$(CONFIG_DRM_PANEL_SAMSUNG_LD9040) += panel-samsung-ld9040.o 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_S6E3FA5) += panel-samsung-s6e3fa5.o +obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3FC1) += panel-samsung-s6e3fc1.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E3HA2) += panel-samsung-s6e3ha2.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63J0X03) += panel-samsung-s6e63j0x03.o obj-$(CONFIG_DRM_PANEL_SAMSUNG_S6E63M0) += panel-samsung-s6e63m0.o diff --git a/drivers/gpu/drm/panel/panel-samsung-s6e3fc1.c b/drivers/gpu/drm/panel/panel-samsung-s6e3fc1.c new file mode 100644 index 000000000000..a1bd2c3e0cd3 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-samsung-s6e3fc1.c @@ -0,0 +1,343 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* Copyright (c) 2021 Jami Kettunen + * Generated with linux-mdss-dsi-panel-driver-generator from vendor device tree + * Copyright (c) 2021, The Linux Foundation. All rights reserved. + */ + +#include +#include +#include +#include +#include +#include +#include + +#include