Received: by 2002:a6b:fb09:0:0:0:0:0 with SMTP id h9csp790107iog; Fri, 24 Jun 2022 14:18:24 -0700 (PDT) X-Google-Smtp-Source: AGRyM1t96GlaCPwfh/RzhO1JbxhJt6zs9twI0Yo2X5jtdKUoOq1uehUgzvmVxkoGays0Us1rpaJ1 X-Received: by 2002:a63:3d47:0:b0:40c:9736:28c with SMTP id k68-20020a633d47000000b0040c9736028cmr704695pga.41.1656105504564; Fri, 24 Jun 2022 14:18:24 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1656105504; cv=none; d=google.com; s=arc-20160816; b=rompa1i7qKpAXpvpwlLERC7/zjriDHdbNceeHDoLqaiZbo4k6lmSyKpZRdBknf2MVz s5fqhw7TLbsTHpf/4DE49FzedomD7p9oCYuTBnGr5nUB6J0Go6R9sU0IQtvqMamai373 zbkudXvaq62vFzZQu0HdJBHN+LctCMmBO5esGc7bNP/jdW5n/iNg69262+vwEd0Dja+k FZCibzQ89tx/3txj1pgejUaSLChvvlm+bbwSZzulrTOd/0EzCOrfEPSoR3/l+0RWJc3G /d6Zw7wxQMjvul8ShgY0YRGCA0A0ZhLQhplWu9u2detVEdls9UUqhI+qMQ5XACj+v9eD 9mTA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:in-reply-to:content-disposition:mime-version :references:message-id:subject:cc:to:from:date:dkim-signature :dkim-signature; bh=/JChbeb0+ddPmmhO6bH/gW0U7jB0TFUZa9rFUexUNuw=; b=r5CsbTqwOy1FHMzAYw7CumyhI1wIwVAu0k7WdlEBdajjBB9P6/nA8PXaTdzDSVdGD5 aiYFy5UbcBZlR7ihm2K+fkGYz0KOwmgstfOvxsEqNXj1T8yGy66oLKFBlMmSS5tecKP6 eH7tDdICsQIklfu0vUwJO+E/ZJUcYrj8gZV36MWj6lUO01r1w26EU4ZxeC9fOAVfYxfJ ZhEiWdrviXkX5QiOURsPXhJmbwpgoAJOo7ke9dnlQXC+xB0w2TRK8Gn4Q1hu312Hn9VP ZZ1wCpIW8Qe0Xj550iT2atBM+g9cqJ69SZgvStzuChZUMUYUHtspO1Ht1ijlcPN3rAUG S9Sw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=JKdJQEUf; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id jb3-20020a170903258300b00162039486e4si3907199plb.319.2022.06.24.14.18.07; Fri, 24 Jun 2022 14:18:24 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@ravnborg.org header.s=rsa1 header.b=JKdJQEUf; dkim=neutral (no key) header.i=@ravnborg.org; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S229844AbiFXU5d (ORCPT + 99 others); Fri, 24 Jun 2022 16:57:33 -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> X-Spam-Status: No, score=-0.4 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_NONE, SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE,URIBL_BLACK autolearn=no autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net 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