From 4533c11fcb93ca8fbf21c35e2a82567d65f8bae3 Mon Sep 17 00:00:00 2001 From: Waveshare_Team Date: Tue, 8 Apr 2025 20:07:20 +0800 Subject: [PATCH] drivers/gpu/drm/panel : Add the device for the Waveshare DSI-TOUCH series panels. the driver are provided for the Waveshare DSI-TOUCH series panels, modelled after the other Ilitek controller drivers, but not limited to Ilitek series controllers. The aim is to offer a more consistent operation and experience for the Waveshare DSI-TOUCH series panels. Signed-off-by: Waveshare_Team --- drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-waveshare-dsi-v2.c | 1312 +++++++++++++++++ 3 files changed, 1323 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -1001,6 +1001,16 @@ config DRM_PANEL_WAVESHARE_TOUCHSCREEN DSI Touchscreens. To compile this driver as a module, choose M here. +config DRM_PANEL_WAVESHARE_TOUCHSCREEN_V2 + tristate "Waveshare touchscreen panels V2" + depends on DRM_MIPI_DSI + depends on I2C + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Waveshare + DSI Touchscreens. To compile this driver as a module, + choose M here. + config DRM_PANEL_WIDECHIPS_WS2401 tristate "Widechips WS2401 DPI panel driver" depends on SPI && GPIOLIB --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -101,5 +101,6 @@ obj-$(CONFIG_DRM_PANEL_VISIONOX_RM69299) obj-$(CONFIG_DRM_PANEL_VISIONOX_VTDR6130) += panel-visionox-vtdr6130.o obj-$(CONFIG_DRM_PANEL_VISIONOX_R66451) += panel-visionox-r66451.o obj-$(CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN) += panel-waveshare-dsi.o +obj-$(CONFIG_DRM_PANEL_WAVESHARE_TOUCHSCREEN_V2) += panel-waveshare-dsi-v2.o obj-$(CONFIG_DRM_PANEL_WIDECHIPS_WS2401) += panel-widechips-ws2401.o obj-$(CONFIG_DRM_PANEL_XINPENG_XPP055C272) += panel-xinpeng-xpp055c272.o --- /dev/null +++ b/drivers/gpu/drm/panel/panel-waveshare-dsi-v2.c @@ -0,0 +1,1312 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Copyright (C) 2024 Waveshare International Limited + * + * Based on panel-raspberrypi-touchscreen by Broadcom + */ + +#include +#include +#include +#include +#include +#include +#include + +#include +#include + +#include +#include +#include + +#include