From 75a5dbd1f4f71b1382dae973538af00178ba55a0 Mon Sep 17 00:00:00 2001 From: Pengyu Luo Date: Thu, 9 Jul 2026 22:28:46 +0800 Subject: [PATCH] drm/panel: Add Novatek NT36536 panel driver Add a driver for panels using the Novatek NT36536 Display Driver IC, including support for the CSOT PP8807HB1-1, a dual-link 10-bit panel found in LENOVO Legion Y700 Gen4. Reviewed-by: Neil Armstrong Signed-off-by: Pengyu Luo Signed-off-by: Neil Armstrong Link: https://patch.msgid.link/20260709142846.12463-3-mitltlatltl@gmail.com --- drivers/gpu/drm/panel/Kconfig | 11 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-novatek-nt36536.c | 488 ++++++++++++++++++ 3 files changed, 500 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-novatek-nt36536.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index cfbfb371bc67..53c0b95c26ca 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -662,6 +662,17 @@ config DRM_PANEL_NOVATEK_NT36523 around the Novatek NT36523 display controller, such as some Boe panels used in Xiaomi Mi Pad 5 and 5 Pro tablets. +config DRM_PANEL_NOVATEK_NT36536 + tristate "Novatek NT36536 panel driver" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + select DRM_KMS_HELPER + help + Say Y here if you want to enable support for Novatek NT36536-based + display panels, such as the one found in the LENOVO Legion Y700 + Gen4. + config DRM_PANEL_NOVATEK_NT36672A tristate "Novatek NT36672A DSI panel" depends on GPIOLIB diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 0f29f22f589e..3b523cf37833 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -64,6 +64,7 @@ obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35532) += panel-novatek-nt35532.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35560) += panel-novatek-nt35560.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) += panel-novatek-nt35950.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36523) += panel-novatek-nt36523.o +obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36536) += panel-novatek-nt36536.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672A) += panel-novatek-nt36672a.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT36672E) += panel-novatek-nt36672e.o obj-$(CONFIG_DRM_PANEL_NOVATEK_NT37700F) += panel-novatek-nt37700f.o diff --git a/drivers/gpu/drm/panel/panel-novatek-nt36536.c b/drivers/gpu/drm/panel/panel-novatek-nt36536.c new file mode 100644 index 000000000000..2a82b54880c3 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-novatek-nt36536.c @@ -0,0 +1,488 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Novatek NT36536 DriverIC panels driver + * Copyright (c) 2026 Pengyu Luo + * + * Based on the sample code which is generated with + * linux-mdss-dsi-panel-driver-generator + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include +#include +#include + +#include