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 4941CC3DA7D for ; Tue, 3 Jan 2023 20:04:48 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S233145AbjACUEr (ORCPT ); Tue, 3 Jan 2023 15:04:47 -0500 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:45768 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S230488AbjACUEp (ORCPT ); Tue, 3 Jan 2023 15:04:45 -0500 Received: from mailrelay2-1.pub.mailoutpod2-cph3.one.com (mailrelay2-1.pub.mailoutpod2-cph3.one.com [46.30.211.177]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 678341208A for ; Tue, 3 Jan 2023 12:04:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ravnborg.org; s=rsa2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=w5Zo8g3TaYgtcTCgy3oZXz9/r6oEXx/FaThzGWxOlgQ=; b=QF69kclAMJ1WiSsVmXgspI+wlsnU1t5wU03xvDraQsT68u08anwbPpNJIn/TflWrKk2F+ONiHpzGM MX3JjayNIqj5eOUlBv66xgI3DBgKDmsNGcW6bwmy+pJ+v7niPJR0EvWAogkn5hcfU3hbddwbZOj4vx jm00BoJwXtI+/24vTjoNHC34xV2mJtEMsiVBWA84nAxrCDsFwA6nb9fbaM5RqKMsd2tDjijaDIf8X5 R9noZ5HBCHQTQJ/cLbA7rNjRFT6qYvHH8+Mj/2+mpnaeQXmzSFiJ0bqX2P1fePrrhSbAGjXwZFh8HE Yb7WEmng4fXdoz/1YH5V82TTcfmAz/g== DKIM-Signature: v=1; a=ed25519-sha256; c=relaxed/relaxed; d=ravnborg.org; s=ed2; h=in-reply-to:content-type:mime-version:references:message-id:subject:cc:to: from:date:from; bh=w5Zo8g3TaYgtcTCgy3oZXz9/r6oEXx/FaThzGWxOlgQ=; b=sbKGLxlBEXYMWohDM8FaIG2hTwP7YZamH7LZXuMzh/8Q6ed7kYQM7W2fjeo38rD5YlasF6hANxnXf J6z4YNQAQ== X-HalOne-ID: b45856cc-8ba1-11ed-b3cd-93f0a866dfbb Received: from ravnborg.org (2-105-2-98-cable.dk.customer.tdc.net [2.105.2.98]) by mailrelay2 (Halon) with ESMTPSA id b45856cc-8ba1-11ed-b3cd-93f0a866dfbb; Tue, 03 Jan 2023 20:03:38 +0000 (UTC) Date: Tue, 3 Jan 2023 21:03:36 +0100 From: Sam Ravnborg To: Chris Morgan Cc: dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-rockchip@lists.infradead.org, maccraft123mc@gmail.com, tzimmermann@suse.de, mripard@kernel.org, maarten.lankhorst@linux.intel.com, heiko@sntech.de, krzysztof.kozlowski+dt@linaro.org, robh+dt@kernel.org, daniel@ffwll.ch, airlied@gmail.com, thierry.reding@gmail.com, linus.walleij@linaro.org, Chris Morgan Subject: Re: [PATCH V7 3/4] drm/panel: Add Magnachip D53E6EA8966 Panel Driver Message-ID: References: <20230103190707.104595-1-macroalpha82@gmail.com> <20230103190707.104595-4-macroalpha82@gmail.com> MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <20230103190707.104595-4-macroalpha82@gmail.com> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org Hi Chris. On Tue, Jan 03, 2023 at 01:07:06PM -0600, Chris Morgan wrote: > From: Chris Morgan > > Support Magnachip D53E6EA8966 based panels such as the Samsung > AMS495QA01 panel as found on the Anbernic RG503. Note this driver > supports only the AMS495QA01 today which receives video signals via DSI, > however it receives commands via 3-wire SPI using DBI. > > Signed-off-by: Chris Morgan > Signed-off-by: Maya Matuszczyk > Reviewed-by: Linus Walleij Sorry for being late with my feedback - I have not had any linux bandwidth lately. See a few comments in the following. Mostly, I am concerned that backlight does not work in an optimal way. Sam > --- > drivers/gpu/drm/panel/Kconfig | 11 + > drivers/gpu/drm/panel/Makefile | 1 + > .../drm/panel/panel-magnachip-d53e6ea8966.c | 514 ++++++++++++++++++ > 3 files changed, 526 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c > > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 737edcdf9eef..204b84a83604 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -298,6 +298,17 @@ config DRM_PANEL_LG_LG4573 > Say Y here if you want to enable support for LG4573 RGB panel. > To compile this driver as a module, choose M here. > > +config DRM_PANEL_MAGNACHIP_D53E6EA8966 > + tristate "Magnachip D53E6EA8966 DSI panel" > + depends on OF && SPI > + depends on DRM_MIPI_DSI > + depends on BACKLIGHT_CLASS_DEVICE > + select DRM_MIPI_DBI > + help > + DRM panel driver for the Samsung AMS495QA01 panel controlled > + with the Magnachip D53E6EA8966 panel IC. This panel receives > + video data via DSI but commands via 9-bit SPI using DBI. > + > config DRM_PANEL_NEC_NL8048HL11 > tristate "NEC NL8048HL11 RGB panel" > depends on GPIOLIB && OF && SPI > diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile > index f8f9d9f6a307..20de312aa5e9 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -27,6 +27,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) += panel-leadtek-ltk050h3146w.o > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) += panel-leadtek-ltk500hd1829.o > obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) += panel-lg-lb035q02.o > obj-$(CONFIG_DRM_PANEL_LG_LG4573) += panel-lg-lg4573.o > +obj-$(CONFIG_DRM_PANEL_MAGNACHIP_D53E6EA8966) += panel-magnachip-d53e6ea8966.o > obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) += panel-nec-nl8048hl11.o > obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3051D) += panel-newvision-nv3051d.o > obj-$(CONFIG_DRM_PANEL_NEWVISION_NV3052C) += panel-newvision-nv3052c.o > diff --git a/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c > new file mode 100644 > index 000000000000..ec90da8e2ae7 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-magnachip-d53e6ea8966.c > @@ -0,0 +1,514 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * Magnachip d53e6ea8966 MIPI-DSI panel driver > + * Copyright (C) 2022 Chris Morgan 2023 > + */ > + > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include