From patchwork Tue Apr 1 08:18:31 2025 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Patchwork-Submitter: =?utf-8?b?Q2hhcmxvdHRlIO+/vWxl77+977+9a2Vj?= X-Patchwork-Id: 14035210 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2D47AC36010 for ; Tue, 1 Apr 2025 17:22:28 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DF35710E636; Tue, 1 Apr 2025 17:22:20 +0000 (UTC) Authentication-Results: gabe.freedesktop.org; dkim=pass (1024-bit key; secure) header.d=chir.rs header.i=lotte@chir.rs header.b="U8M3tn+p"; dkim-atps=neutral Received: from sender-op-o17.zoho.eu (sender-op-o17.zoho.eu [136.143.169.17]) by gabe.freedesktop.org (Postfix) with ESMTPS id C726610E512 for ; Tue, 1 Apr 2025 08:34:40 +0000 (UTC) ARC-Seal: i=1; a=rsa-sha256; t=1743495565; cv=none; d=zohomail.eu; s=zohoarc; b=guotI+g5B6t/bPgzIYn+ID5MdcybjDgmjmVKgFLvA6IGqLsHH/hGrID4cEfTg7urs/h2Vkf/IVDh67kdQ5nl9SSfCfd+FblOCjTrgolPpqM3V3n49/gYmXORab3AL/nS0ALz/YFPxiHXLu38+HErk5OS5lnUvLZb5+sPWfpyiK8= ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=zohomail.eu; s=zohoarc; t=1743495565; h=Content-Type:Content-Transfer-Encoding:Cc:Cc:Date:Date:From:From:In-Reply-To:MIME-Version:Message-ID:References:Subject:Subject:To:To:Message-Id:Reply-To; bh=UwqOHRUGmjXp66HlNVWld2Eeio7ErVQl0UVMqzdMIiI=; b=NccoCvAafYVGapcf8RiybmXW2m+9ynjZTbcJ/CEk9Y9PAcwt/TFWIRGveopbhWGGaKKOcVY6bV0YdiBHD+YZfpRozQ3edA08kMBXJ2h+9WcuApAHr+K8LQe3SAObCRynb2W1/upCvzcc514ni+p6cI3tB+nz8pY2zYguC7WgP98= ARC-Authentication-Results: i=1; mx.zohomail.eu; dkim=pass header.i=chir.rs; spf=pass smtp.mailfrom=lotte@chir.rs; dmarc=pass header.from= DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; t=1743495565; s=zmail; d=chir.rs; i=lotte@chir.rs; h=From:From:To:To:Cc:Cc:Subject:Subject:Date:Date:Message-ID:In-Reply-To:References:MIME-Version:Content-Type:Content-Transfer-Encoding:Message-Id:Reply-To; bh=UwqOHRUGmjXp66HlNVWld2Eeio7ErVQl0UVMqzdMIiI=; b=U8M3tn+paRzAPK8E8uKnoQGL9kKUNDLTAqemvnWA5RUil5pW8t/t28oxU6q6qDWt VoeB+dpn14QNLoeVeE5SMicjQEo6g0QvRGKEm1JiJa6VC3UCi89DkniPR3nOC2keS+b 3vBSvRDA6Yms4bW6Lrik/GJvcYAV5Y3I0v0+w8nw= Received: by mx.zoho.eu with SMTPS id 1743495561886571.3388221735572; Tue, 1 Apr 2025 10:19:21 +0200 (CEST) From: =?unknown-8bit?b?Q2hhcmxvdHRlIN5sZcWEa2VjICA8bG90dGVAY2hpci5ycz4=?= To: neil.armstrong@linaro.org, quic_jesszhan@quicinc.com, robh@kernel.org, krzk+dt@kernel.org, conor+dt@kernel.org, max@maxfierke.com Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, =?utf-8?q?Charlotte_Dele=C5=84kec?= Subject: [PATCH v4 1/3] drm: panel: Add driver for Clockwork cwd686 panel Date: Tue, 1 Apr 2025 09:18:31 +0100 Message-ID: <20250401081852.283532-2-lotte@chir.rs> X-Mailer: git-send-email 2.48.1 In-Reply-To: <20250401081852.283532-1-lotte@chir.rs> References: <20250401081852.283532-1-lotte@chir.rs> MIME-Version: 1.0 X-ZohoMailClient: External X-Mailman-Approved-At: Tue, 01 Apr 2025 17:22:19 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: Max Fierke The ClockworkPi DevTerm (all models) uses a 6.86" IPS display of unknown provenance, which uses the Chipone ICNL9707 IC driver. The display panel I have has two model numbers: TXW686001 and WTL068601G, but cannot find any manufacturer associated with either, so opting for the ClockworkPi model number. This driver is based on the GPL-licensed driver released by ClockworkPi, authored by Pinfan Zhu, with some additional cleanup, rotation support, and display sleep re-enabling done by me. Original driver here for reference: https://github.com/clockworkpi/DevTerm/blob/main/Code/patch/armbian_build_a06/patch/kernel-004-panel.patch Display IC datasheet provided here: https://github.com/clockworkpi/DevTerm/blob/main/Schematics/ICNL9707_Datasheet.pdf Co-authored-by: Charlotte Deleńkec Signed-off-by: Charlotte Deleńkec Signed-off-by: Max Fierke --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-clockwork-cwd686.c | 447 ++++++++++++++++++ 3 files changed, 460 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-clockwork-cwd686.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index e059b06e0239..6fc23c10fa56 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -96,6 +96,18 @@ config DRM_PANEL_BOE_TV101WUM_LL2 Say Y here if you want to support for BOE TV101WUM-LL2 WUXGA PANEL DSI Video Mode panel +config DRM_PANEL_CLOCKWORK_CWD686 + tristate "Clockwork CWD686 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 CWD686 + ICNL9707-based panel, e.g. as used within the Clockwork DevTerm. + The panel has a 480x1280 resolution and uses 24 bit RGB per pixel. + + To compile this driver as a module, choose M here. + config DRM_PANEL_EBBG_FT8719 tristate "EBBG FT8719 panel driver" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index 1bb8ae46b59b..9f5b8d2a86e4 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -8,6 +8,7 @@ obj-$(CONFIG_DRM_PANEL_BOE_HIMAX8279D) += panel-boe-himax8279d.o obj-$(CONFIG_DRM_PANEL_BOE_TH101MB31UIG002_28A) += panel-boe-th101mb31ig002-28a.o obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_LL2) += panel-boe-tv101wum-ll2.o obj-$(CONFIG_DRM_PANEL_BOE_TV101WUM_NL6) += panel-boe-tv101wum-nl6.o +obj-$(CONFIG_DRM_PANEL_CLOCKWORK_CWD686) += panel-clockwork-cwd686.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-cwd686.c b/drivers/gpu/drm/panel/panel-clockwork-cwd686.c new file mode 100644 index 000000000000..53d65e6df1b0 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-clockwork-cwd686.c @@ -0,0 +1,447 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Copyright (c) 2021 Clockwork Tech LLC + * Copyright (c) 2021-2022 Max Fierke + * + * Based on Pinfan Zhu's work on panel-cwd686.c for Clockwork's 5.10 BSP + */ + +#include +#include +#include +#include +#include + +#include