From mboxrd@z Thu Jan 1 00:00:00 1970 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 vger.kernel.org (vger.kernel.org [23.128.96.18]) by smtp.lore.kernel.org (Postfix) with ESMTP id 92904C433F5 for ; Wed, 1 Jun 2022 05:18:37 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1349601AbiFAFSg (ORCPT ); Wed, 1 Jun 2022 01:18:36 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:57244 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1349526AbiFAFSX (ORCPT ); Wed, 1 Jun 2022 01:18:23 -0400 Received: from out2-smtp.messagingengine.com (out2-smtp.messagingengine.com [66.111.4.26]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 2A69E6BFFD; Tue, 31 May 2022 22:18:22 -0700 (PDT) Received: from compute2.internal (compute2.nyi.internal [10.202.2.46]) by mailout.nyi.internal (Postfix) with ESMTP id 8DB845C0275; Wed, 1 Jun 2022 01:18:21 -0400 (EDT) Received: from mailfrontend1 ([10.202.2.162]) by compute2.internal (MEProxy); Wed, 01 Jun 2022 01:18:21 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=maxfierke.com; h=cc:cc:content-transfer-encoding:date:date:from:from :in-reply-to:in-reply-to:message-id:mime-version:references :reply-to:sender:subject:subject:to:to; s=fm1; t=1654060701; x= 1654147101; bh=Z4c5l7qUoGS88EuAcjvcUWjRMB6pGyMquLDRSXhcqgU=; b=3 e1z1rriR9v8v+r4l0K2m7t8LU63J5S23HkZflSceGzhEdOKYX5JOCY9tXwwX0Mzq IOhhP7coc+Utvor/JKhdaD1Mqsv0hW+ppKW7BKKL2ULoR3KOvLmeuraF5emRsbL8 XoEBnPkmUcUmYf+pJhSTwY0moeiCfQ4jrK2OhomTnFijDvqv8Rpv5FojdPJC8U3k +CE2zrXirg7DLEfCn7BebCVPj86k/4s3TNWVOOmfepU5iGfFYw5XiUcjfA5yQ4Dm F2v/W4gGofci903kPd06vpKtysZw0ShM30lnHF1GwJQEOp94zLYtEe++s/uuYK/T 5N0Wj7q7ujusxCi8RJXhw== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-transfer-encoding:date:date :feedback-id:feedback-id:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to:x-me-proxy:x-me-proxy:x-me-sender:x-me-sender :x-sasl-enc; s=fm1; t=1654060701; x=1654147101; bh=Z4c5l7qUoGS88 EuAcjvcUWjRMB6pGyMquLDRSXhcqgU=; b=B1gfmbaJujzCGFf3yt6gfw2Ixih03 5aLYzClGX8Hu8N+0KEnpBAoqugSdR0C9VCS268fRMOK+AB5dVC6UUQBg50zVuycF zWME9n4qPe0/6GVlN3PovsqN3rvSmjmn9XULIKebEDZdN9edvDMBTExCUzmitOv9 OQPhGGFRDsi/d4r8/Bd0OxPhF/G4675kQ82Karx04+BBvK4puh5K8Tduy1XfeEDz W+XyzvnJCTaYhfbt/l/Th3am7t8HJZr2D97CRr5qE4v0AJRD367PneEkZV5OBY/q tIwJwYlsRN+yNNzvPQRXLRJA2I47kNtHyRBCPnSu+vW+8jJwy4jy/R7Bw== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvfedrkeelgdeludcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecunecujfgurhephffvvefufffkofgjfhgggfestdekre dtredttdenucfhrhhomhepofgrgicuhfhivghrkhgvuceomhgrgiesmhgrgihfihgvrhhk vgdrtghomheqnecuggftrfgrthhtvghrnhepjeelkeeluddtieegheduvdetudejiedvfe evkeeuhedvueeuudefueetfeefvedvnecuffhomhgrihhnpehgihhthhhusgdrtghomhen ucevlhhushhtvghrufhiiigvpedtnecurfgrrhgrmhepmhgrihhlfhhrohhmpehmrgigse hmrgigfhhivghrkhgvrdgtohhm X-ME-Proxy: Feedback-ID: idee9475d:Fastmail Received: by mail.messagingengine.com (Postfix) with ESMTPA; Wed, 1 Jun 2022 01:18:20 -0400 (EDT) From: Max Fierke To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Max Fierke Subject: [PATCH 3/3] drm: panel: Add driver for ClockworkPi cwd686 panel Date: Wed, 1 Jun 2022 00:17:48 -0500 Message-Id: <20220601051748.1305450-4-max@maxfierke.com> X-Mailer: git-send-email 2.36.1 In-Reply-To: <20220601051748.1305450-1-max@maxfierke.com> References: <20220601051748.1305450-1-max@maxfierke.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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 Signed-off-by: Max Fierke --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + .../gpu/drm/panel/panel-clockworkpi-cwd686.c | 458 ++++++++++++++++++ 3 files changed, 471 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 4f1f004b3c54..f9cf2c8124b7 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_CLOCKWORKPI_CWD686 + tristate "ClockworkPi 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 ClockworkPi CWD686 + ICNL9707-based panel, e.g. as used within the ClockworkPi 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_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 42a7ab54234b..24584bd7d4f8 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_CLOCKWORKPI_CWD686) += panel-clockworkpi-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-clockworkpi-cwd686.c b/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c new file mode 100644 index 000000000000..4ef24388d37c --- /dev/null +++ b/drivers/gpu/drm/panel/panel-clockworkpi-cwd686.c @@ -0,0 +1,458 @@ +// 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 ClockworkPi's 5.10 BSP + */ + +#include +#include +#include +#include +#include +#include +#include +#include +#include +#include