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 35DBACCA473 for ; Fri, 24 Jun 2022 20:57:35 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S230075AbiFXU5e (ORCPT ); Fri, 24 Jun 2022 16:57:34 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59260 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S229669AbiFXU5c (ORCPT ); Fri, 24 Jun 2022 16:57:32 -0400 Received: from mailrelay4-1.pub.mailoutpod1-cph3.one.com (mailrelay4-1.pub.mailoutpod1-cph3.one.com [46.30.210.185]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 76E1285788 for ; Fri, 24 Jun 2022 13:57:30 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=/JChbeb0+ddPmmhO6bH/gW0U7jB0TFUZa9rFUexUNuw=; b=JKdJQEUfKp1QFV+UD99j1ydTv/QU9prvh84O/u7VG9e4EIdpKRXsMDgY0Z9bRuBasFpJB8lm5MgOm X7rGj9oNcJW4a0iHpf16+ttxXHXB4F/0LH59IQiZM/FyE9fTNnd6kSARLQlOEpXCeWbI8UX0km8fKK 7a63EKWr6VdoPI5AylGX1VJh0vM5492xqLk//J/YOz86+vRyyv+LJo1y3DUnOk86EDclCErNZt6Fge NGmoQoBmQnAkrZtcELTFsUL5xZXGYPCmPQw7/tLzF+sf30c5EtIJhaLfLOhZx5OleIraoA3xHAJ/Tv D2v38pdivXNsKxnJxrYqZgZyFQ/mNCw== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed1; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=/JChbeb0+ddPmmhO6bH/gW0U7jB0TFUZa9rFUexUNuw=; b=J+aAbwG8hKeK+atJ+qj57zXphDBbLq9UWl53vXw/i9HQJ3XTpsJoi+riVNTbpEwZMhr0OHOKQydiA Awx56rMAQ== X-HalOne-Cookie: 3f7c760cad120e0e31a1fa96f348245ab13e84d1 X-HalOne-ID: 411b75fe-f400-11ec-8233-d0431ea8bb10 Received: from mailproxy1.cst.dirpod4-cph3.one.com (80-162-45-141-cable.dk.customer.tdc.net [80.162.45.141]) by mailrelay4.pub.mailoutpod1-cph3.one.com (Halon) with ESMTPSA id 411b75fe-f400-11ec-8233-d0431ea8bb10; Fri, 24 Jun 2022 20:57:27 +0000 (UTC) Date: Fri, 24 Jun 2022 22:57:25 +0200 From: Sam Ravnborg To: Max Fierke Cc: thierry.reding@gmail.com, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org, krzysztof.kozlowski+dt@linaro.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH 3/3] drm: panel: Add driver for ClockworkPi cwd686 panel Message-ID: References: <20220601051748.1305450-1-max@maxfierke.com> <20220601051748.1305450-4-max@maxfierke.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20220601051748.1305450-4-max@maxfierke.com> Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Hi Max, On Wed, Jun 01, 2022 at 12:17:48AM -0500, Max Fierke wrote: > 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. In general a nice driver, but there is a few comments in the following. Sam > > 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 Thanks for providing pointers! > > 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