From aa593278d760e468f79e2c785a96b7b049653a2e Mon Sep 17 00:00:00 2001 From: Potato Date: Fri, 20 Oct 2023 23:18:19 +0800 Subject: [PATCH 2/6] drm: panel: add clockwork cwu50 - set `power_off_case` to 2(other than 1) to enable power off by DCS command --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-clockwork-cwu50.c | 567 ++++++++++++++++++ 3 files changed, 580 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-clockwork-cwu50.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 168403f59175..4a99ef1b0178 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -68,6 +68,18 @@ config DRM_PANEL_BOE_TV101WUM_NL6 Say Y here if you want to support for BOE TV101WUM and AUO KD101N80 45NA WUXGA PANEL DSI Video Mode panel +config DRM_PANEL_CLOCKWORK_CWU50 + tristate "Clockwork CWU50 panel" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for the Clockwork CWU50 + JD9365D-based panel, e.g. as used within the Clockwork uConsole. + The panel has a 720x1280 resolution and uses 24 bit RGB per pixel. + + To compile this driver as a module, choose M here. + config DRM_PANEL_DSI_CM tristate "Generic DSI command mode panels" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index bc4ded65aa4b..25d9c19d9cd0 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_DRM_PANEL_ASUS_Z00T_TM5P5_NT35596) += panel-asus-z00t-tm5p5-n35596. obj-$(CONFIG_DRM_PANEL_BOE_BF060Y8M_AJ0) += panel-boe-bf060y8m-aj0.o obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o +obj-$(CONFIG_DRM_PANEL_CLOCKWORK_CWU50) += panel-clockwork-cwu50.o obj-$(CONFIG_DRM_PANEL_DSI_CM) += panel-dsi-cm.o obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.o diff --git a/drivers/gpu/drm/panel/panel-clockwork-cwu50.c b/drivers/gpu/drm/panel/panel-clockwork-cwu50.c new file mode 100644 index 000000000000..a814d6bb25dd --- /dev/null +++ b/drivers/gpu/drm/panel/panel-clockwork-cwu50.c @@ -0,0 +1,567 @@ +/* + * SPDX-License-Identifier: GPL-2.0+ + * Copyright (c) 2021 Clockwork Tech LLC + * Copyright (c) 2021 Max Fierke + * + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include