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 B53C5C433F5 for ; Thu, 27 Jan 2022 10:04:56 +0000 (UTC) Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S238889AbiA0KE4 (ORCPT ); Thu, 27 Jan 2022 05:04:56 -0500 Received: from out4-smtp.messagingengine.com ([66.111.4.28]:33093 "EHLO out4-smtp.messagingengine.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231889AbiA0KEz (ORCPT ); Thu, 27 Jan 2022 05:04:55 -0500 Received: from compute5.internal (compute5.nyi.internal [10.202.2.45]) by mailout.nyi.internal (Postfix) with ESMTP id 38DF25C01D3; Thu, 27 Jan 2022 05:04:55 -0500 (EST) Received: from mailfrontend2 ([10.202.2.163]) by compute5.internal (MEProxy); Thu, 27 Jan 2022 05:04:55 -0500 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=cerno.tech; h=cc :cc:content-type:date:date:from:from:in-reply-to:in-reply-to :message-id:mime-version:references:reply-to:sender:subject :subject:to:to; s=fm2; bh=xopkhIypaCipPIeujCY8BrcQk6x1DWJf0YA/S4 pHu14=; b=ShIxdNQ7MZp/1macY2DQlytgfoWZZVS6ZrCjlipoPIB2lWkhB5h07c soBcUe7trRlkFvaJg9eNVzYl/DJxB4sdqhLGMR85ns6XHVtBbEI4XfMnVkn0G8iR 2DuRKH/his9vG5H3iLrmhjLmuVQxMYZspfAwUaRRzI7Y5oib0LAPOFn8L61Cfi6j 0kQSYWWmF4AaljXWRyKJp3EGssvFywDhQyv2MsFdvGhLsgf62CYSTM4ETa0xmUpT rgWTZ3JmO0DLZxBRXvIsFAQx7yApt3LDKZL6LWpoPdKC0/VGq9vahYjxVr/h4xuC kH1LrKUF77xZIYDC+fWILH1mUAMXktFQ== DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d= messagingengine.com; h=cc:cc:content-type:date:date: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; bh=xopkhIypaCipPIeuj CY8BrcQk6x1DWJf0YA/S4pHu14=; b=eikibHqlrHqMFODXXRh9jtMeLAuVA8o/A Uk70r6fVkhxh556pd7Gbi5PHzy/9EZKd2SC/2yKruNbeDIb/F1uyRGva7eYx0/Yq vL6J4OePnDUjT7xGnIDXDwRkRINATzB0+QgddMSDYrbeSSZholgnM9TAHHFjgiPi ow1vA5bUDmBlH9a/weJZV7KtvhvTCXqjX8nylWWbSpACQzyPOmVIrIVsW8WAd4rR 4cbtLh1w+fX0J2aeqDfP38fh2RLMNmERhaWGiGBPVSwOF6nNBynkJXH/4v1uCT5V bqWU98jcmhc/pFgKju59rR6N14EbkZZPsn7LMi9aKCEI70i0YjtEQ== X-ME-Sender: X-ME-Received: X-ME-Proxy-Cause: gggruggvucftvghtrhhoucdtuddrgedvvddrfeefgdduudcutefuodetggdotefrodftvf curfhrohhfihhlvgemucfhrghsthforghilhdpqfgfvfdpuffrtefokffrpgfnqfghnecu uegrihhlohhuthemuceftddtnecusecvtfgvtghiphhivghnthhsucdlqddutddtmdenuc fjughrpeffhffvuffkfhggtggujgesghdtreertddtudenucfhrhhomhepofgrgihimhgv ucftihhprghrugcuoehmrgigihhmvgestggvrhhnohdrthgvtghhqeenucggtffrrghtth gvrhhnpeehgeejkeeujeejueejiefhtddtteehteevudeihfejffetffegteevhfeitefg geenucffohhmrghinhepfhhrvggvuggvshhkthhophdrohhrghdpghhithhhuhgsrdgtoh hmnecuvehluhhsthgvrhfuihiivgeptdenucfrrghrrghmpehmrghilhhfrhhomhepmhgr gihimhgvsegtvghrnhhordhtvggthh X-ME-Proxy: Received: by mail.messagingengine.com (Postfix) with ESMTPA; Thu, 27 Jan 2022 05:04:54 -0500 (EST) Date: Thu, 27 Jan 2022 11:04:52 +0100 From: Maxime Ripard To: Noralf =?utf-8?Q?Tr=C3=B8nnes?= Cc: robh+dt@kernel.org, thierry.reding@gmail.com, sam@ravnborg.org, dave.stevenson@raspberrypi.com, david@lechnology.com, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org Subject: Re: [PATCH v2 3/3] drm/panel: Add MIPI DBI compatible SPI driver Message-ID: <20220127100452.bmxcgf6ye3nxrgtq@houat> References: <20220125175700.37408-1-noralf@tronnes.org> <20220125175700.37408-4-noralf@tronnes.org> MIME-Version: 1.0 Content-Type: multipart/signed; micalg=pgp-sha512; protocol="application/pgp-signature"; boundary="y4vfjt4ve5verjss" Content-Disposition: inline In-Reply-To: <20220125175700.37408-4-noralf@tronnes.org> Precedence: bulk List-ID: X-Mailing-List: devicetree@vger.kernel.org --y4vfjt4ve5verjss Content-Type: text/plain; charset=iso-8859-1 Content-Disposition: inline Content-Transfer-Encoding: quoted-printable On Tue, Jan 25, 2022 at 06:57:00PM +0100, Noralf Tr=F8nnes wrote: > Add a driver that will work with most MIPI DBI compatible SPI panels. > This avoids adding a driver for every new MIPI DBI compatible controller > that is to be used by Linux. The 'compatible' Device Tree property with > a '.bin' suffix will be used to load a firmware file that contains the > controller configuration. >=20 > Example (driver will load sainsmart18.bin): >=20 > display@0 { > compatible =3D "sainsmart18", "panel-mipi-dbi-spi"; > reg =3D <0>; > reset-gpios =3D <&gpio 25 0>; > dc-gpios =3D <&gpio 24 0>; > }; >=20 > v2: > - Drop model property and use compatible instead (Rob) > - Add wiki entry in MAINTAINERS >=20 > Signed-off-by: Noralf Tr=F8nnes > --- > MAINTAINERS | 8 + > drivers/gpu/drm/panel/Kconfig | 11 + > drivers/gpu/drm/panel/Makefile | 1 + > drivers/gpu/drm/panel/panel-mipi-dbi.c | 394 +++++++++++++++++++++++++ > 4 files changed, 414 insertions(+) > create mode 100644 drivers/gpu/drm/panel/panel-mipi-dbi.c >=20 > diff --git a/MAINTAINERS b/MAINTAINERS > index d03ad8da1f36..8baa98723bdc 100644 > --- a/MAINTAINERS > +++ b/MAINTAINERS > @@ -6047,6 +6047,14 @@ T: git git://anongit.freedesktop.org/drm/drm-misc > F: Documentation/devicetree/bindings/display/multi-inno,mi0283qt.txt > F: drivers/gpu/drm/tiny/mi0283qt.c > =20 > +DRM DRIVER FOR MIPI DBI compatible panels > +M: Noralf Tr=F8nnes > +S: Maintained > +W: https://github.com/notro/panel-mipi-dbi/wiki > +T: git git://anongit.freedesktop.org/drm/drm-misc > +F: Documentation/devicetree/bindings/display/panel/panel-mipi-dbi-spi.ya= ml > +F: drivers/gpu/drm/panel/panel-mipi-dbi.c > + > DRM DRIVER FOR MSM ADRENO GPU > M: Rob Clark > M: Sean Paul > diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig > index 434c2861bb40..1851cda5f877 100644 > --- a/drivers/gpu/drm/panel/Kconfig > +++ b/drivers/gpu/drm/panel/Kconfig > @@ -274,6 +274,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. > =20 > +config DRM_PANEL_MIPI_DBI > + tristate "MIPI DBI compatible panel" > + depends on SPI > + depends on BACKLIGHT_CLASS_DEVICE > + depends on DRM_KMS_HELPER > + select DRM_KMS_CMA_HELPER > + select DRM_MIPI_DBI > + help > + Say Y here if you want to enable support for MIPI DBI compatible pane= ls. > + To compile this driver as a module, choose M here. > + > 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/Makef= ile > index d99fbbce49d1..a90c30459964 100644 > --- a/drivers/gpu/drm/panel/Makefile > +++ b/drivers/gpu/drm/panel/Makefile > @@ -25,6 +25,7 @@ obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK050H3146W) +=3D panel= -leadtek-ltk050h3146w.o > obj-$(CONFIG_DRM_PANEL_LEADTEK_LTK500HD1829) +=3D panel-leadtek-ltk500hd= 1829.o > obj-$(CONFIG_DRM_PANEL_LG_LB035Q02) +=3D panel-lg-lb035q02.o > obj-$(CONFIG_DRM_PANEL_LG_LG4573) +=3D panel-lg-lg4573.o > +obj-$(CONFIG_DRM_PANEL_MIPI_DBI) +=3D panel-mipi-dbi.o > obj-$(CONFIG_DRM_PANEL_NEC_NL8048HL11) +=3D panel-nec-nl8048hl11.o > obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35510) +=3D panel-novatek-nt35510.o > obj-$(CONFIG_DRM_PANEL_NOVATEK_NT35950) +=3D panel-novatek-nt35950.o > diff --git a/drivers/gpu/drm/panel/panel-mipi-dbi.c b/drivers/gpu/drm/pan= el/panel-mipi-dbi.c > new file mode 100644 > index 000000000000..6e3dc2de21d2 > --- /dev/null > +++ b/drivers/gpu/drm/panel/panel-mipi-dbi.c > @@ -0,0 +1,394 @@ > +// SPDX-License-Identifier: GPL-2.0 > +/* > + * DRM driver for MIPI DBI compatible display panels > + * > + * Copyright 2022 Noralf Tr=F8nnes > + */ > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include