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 X-Spam-Level: X-Spam-Status: No, score=-13.5 required=3.0 tests=BAYES_00,DKIM_INVALID, DKIM_SIGNED,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.0 Received: from mail.kernel.org (mail.kernel.org [198.145.29.99]) by smtp.lore.kernel.org (Postfix) with ESMTP id BE79DC433E0 for ; Thu, 11 Feb 2021 16:00:44 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.kernel.org (Postfix) with ESMTPS id 2BA5264E16 for ; Thu, 11 Feb 2021 16:00:43 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 2BA5264E16 Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=ffwll.ch Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 77CC16E45E; Thu, 11 Feb 2021 16:00:42 +0000 (UTC) Received: from mail-wm1-x335.google.com (mail-wm1-x335.google.com [IPv6:2a00:1450:4864:20::335]) by gabe.freedesktop.org (Postfix) with ESMTPS id A66A46E45E for ; Thu, 11 Feb 2021 16:00:41 +0000 (UTC) Received: by mail-wm1-x335.google.com with SMTP id w4so6016018wmi.4 for ; Thu, 11 Feb 2021 08:00:41 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=ffwll.ch; s=google; h=date:from:to:cc:subject:message-id:references:mime-version :content-disposition:in-reply-to; bh=cNgaaVQs3zU0kVtFJkNNjRwEemEYCxMfHaxR3Iu2GSA=; b=YjRhF/fO3Jfe7TwAutq5x/1cKNp0hOUlf5NGBnK5CYJpAi/Jo5mPLj4bSBx3EH7w/r sf+edUcYOuFCFgmM9KTKZ2Dlu6ZIwBYlY+hBAsSc0Tz5T30qxh3ZpJ2zDG/CXyDasgUH 32ejh5G73mq/pD+Zhjj0DrSKS/B/wuQcwtOao= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:date:from:to:cc:subject:message-id:references :mime-version:content-disposition:in-reply-to; bh=cNgaaVQs3zU0kVtFJkNNjRwEemEYCxMfHaxR3Iu2GSA=; b=WIiw+DJci7m558SJobjBQXhMb9LseMa6QPNjgxGVYkCRY15k+/QIHGOYFJxbCvpHK6 4l2DUJXEwtmp7qqQZu+izDt2x2leIlKhxmjE9nEiL7VrNeGHbRPSro5WChTDNNLG3m5/ +LU2t/sLBEkjrlhmClYwSGri7YkjxmRUVSczlKesHN8zsYSwKln4SlxqyyE/59lYgTHL VqI0MA45eKYmIraWDq7Ncsr9E4cflPF/+Op7cyXa9tgw3RjKdM9rFydeSKVv4Guuisf3 qnIfZs50iLWVQ+WGlWIfkFlmjMg5trK6m81plskVD2tj/FzuY2Rx5sIsGDgiTGgRfGGK Ugmg== X-Gm-Message-State: AOAM533TeZa8fMY/CHFrXfy1MqBvERlp8ontT8k0O93ID69OjGsej3Bv IlQ+B/9QUg5uqhZ+yAsM02Y//g== X-Google-Smtp-Source: ABdhPJwTrkUWbcBUs0xKAFu10mjk9CwME3Yrm/himWB+SbYd5Wi1f1ZhM0bO+wt5Ys38oAZAAOtT9g== X-Received: by 2002:a1c:29c6:: with SMTP id p189mr5961481wmp.110.1613059240253; Thu, 11 Feb 2021 08:00:40 -0800 (PST) Received: from phenom.ffwll.local ([2a02:168:57f4:0:efd0:b9e5:5ae6:c2fa]) by smtp.gmail.com with ESMTPSA id d9sm5757477wrq.74.2021.02.11.08.00.39 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 11 Feb 2021 08:00:39 -0800 (PST) Date: Thu, 11 Feb 2021 17:00:38 +0100 From: Daniel Vetter To: Daniel Mack Subject: Re: [PATCH] drm/tiny: add driver for newhaven,1.8-128160EF Message-ID: References: <20210211095058.473776-1-daniel@zonque.org> MIME-Version: 1.0 Content-Disposition: inline In-Reply-To: <20210211095058.473776-1-daniel@zonque.org> X-Operating-System: Linux phenom 5.7.0-1-amd64 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: airlied@linux.ie, robh+dt@kernel.org, dri-devel@lists.freedesktop.org Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" On Thu, Feb 11, 2021 at 10:50:58AM +0100, Daniel Mack wrote: > This patch adds support for Newhaven's NHD-1.8-128160EF display, featuring > an Ilitek ILI9163 controller. > > Signed-off-by: Daniel Mack > --- > .../bindings/display/ilitek,ili9163.txt | 27 +++ I think the dt stuff needs to be split up and cc'ed to dt maintainers for ack. > drivers/gpu/drm/tiny/Kconfig | 13 + > drivers/gpu/drm/tiny/Makefile | 1 + > drivers/gpu/drm/tiny/ili9163.c | 224 ++++++++++++++++++ > 4 files changed, 265 insertions(+) > create mode 100644 Documentation/devicetree/bindings/display/ilitek,ili9163.txt > create mode 100644 drivers/gpu/drm/tiny/ili9163.c > > diff --git a/Documentation/devicetree/bindings/display/ilitek,ili9163.txt b/Documentation/devicetree/bindings/display/ilitek,ili9163.txt > new file mode 100644 > index 0000000000000..fee119991c14e > --- /dev/null > +++ b/Documentation/devicetree/bindings/display/ilitek,ili9163.txt > @@ -0,0 +1,27 @@ > +Ilitek ILI9163 display panels > + > +This binding is for display panels using an Ilitek ILI9163 controller in SPI > +mode. > + > +Required properties: > +- compatible: "newhaven,1.8-128160EF", "ilitek,ili9163" > +- dc-gpios: D/C pin > +- reset-gpios: Reset pin > + > +The node for this driver must be a child node of a SPI controller, hence > +all mandatory properties described in ../spi/spi-bus.txt must be specified. > + > +Optional properties: > +- rotation: panel rotation in degrees counter clockwise (0,90,180,270) > +- backlight: phandle of the backlight device attached to the panel > + > +Example: > + display@0{ > + compatible = "newhaven,1.8-128160EF", "ilitek,ili9163" > + reg = <0>; > + spi-max-frequency = <32000000>; > + dc-gpios = <&gpio0 9 GPIO_ACTIVE_HIGH>; > + reset-gpios = <&gpio0 8 GPIO_ACTIVE_HIGH>; > + rotation = <270>; > + backlight = <&backlight>; > + }; > diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig > index 2b6414f0fa759..9de0c0eeea6f5 100644 > --- a/drivers/gpu/drm/tiny/Kconfig > +++ b/drivers/gpu/drm/tiny/Kconfig > @@ -41,6 +41,19 @@ config TINYDRM_HX8357D > > If M is selected the module will be called hx8357d. > > +config TINYDRM_ILI9163 > + tristate "DRM support for ILI9163 display panels" > + depends on DRM && SPI > + select DRM_KMS_HELPER > + select DRM_KMS_CMA_HELPER > + select DRM_MIPI_DBI > + select BACKLIGHT_CLASS_DEVICE > + help > + DRM driver for the following Ilitek ILI9163 panels: > + * NHD-1.8-128160EF 128x160 TFT > + > + If M is selected the module will be called ili9163. > + > config TINYDRM_ILI9225 > tristate "DRM support for ILI9225 display panels" > depends on DRM && SPI > diff --git a/drivers/gpu/drm/tiny/Makefile b/drivers/gpu/drm/tiny/Makefile > index 6ae4e9e5a35fb..78016b2ed11b5 100644 > --- a/drivers/gpu/drm/tiny/Makefile > +++ b/drivers/gpu/drm/tiny/Makefile > @@ -3,6 +3,7 @@ > obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o > obj-$(CONFIG_DRM_GM12U320) += gm12u320.o > obj-$(CONFIG_TINYDRM_HX8357D) += hx8357d.o > +obj-$(CONFIG_TINYDRM_ILI9163) += ili9163.o > obj-$(CONFIG_TINYDRM_ILI9225) += ili9225.o > obj-$(CONFIG_TINYDRM_ILI9341) += ili9341.o > obj-$(CONFIG_TINYDRM_ILI9486) += ili9486.o > diff --git a/drivers/gpu/drm/tiny/ili9163.c b/drivers/gpu/drm/tiny/ili9163.c > new file mode 100644 > index 0000000000000..9f90ea9556c4d > --- /dev/null > +++ b/drivers/gpu/drm/tiny/ili9163.c > @@ -0,0 +1,224 @@ > +// SPDX-License-Identifier: GPL-2.0+ > + > +#include > +#include > +#include > +#include > +#include > +#include > + > +#include > +#include > +#include > +#include > +#include > +#include > +#include > +#include