From patchwork Wed Sep 1 16:03:29 2021 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Daniel Mack X-Patchwork-Id: 12469731 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.9 required=3.0 tests=BAYES_00, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER,INCLUDES_PATCH, MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,UNWANTED_LANGUAGE_BODY, URIBL_BLOCKED,USER_AGENT_GIT 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 7C1F6C432BE for ; Wed, 1 Sep 2021 16:06:09 +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 410386069E for ; Wed, 1 Sep 2021 16:06:09 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.4.1 mail.kernel.org 410386069E Authentication-Results: mail.kernel.org; dmarc=none (p=none dis=none) header.from=zonque.org Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 9BCC36E210; Wed, 1 Sep 2021 16:06:08 +0000 (UTC) Received: from mail.bugwerft.de (mail.bugwerft.de [IPv6:2a03:6000:1011::59]) by gabe.freedesktop.org (Postfix) with ESMTP id 9ACFF6E210 for ; Wed, 1 Sep 2021 16:06:07 +0000 (UTC) Received: from hq-00021.. (unknown [46.183.103.17]) by mail.bugwerft.de (Postfix) with ESMTPSA id 9E20B32D3FA; Wed, 1 Sep 2021 16:05:55 +0000 (UTC) From: Daniel Mack To: airlied@linux.ie, daniel@ffwll.ch Cc: robh+dt@kernel.org, devicetree@vger.kernel.org, dri-devel@lists.freedesktop.org, Daniel Mack , Daniel Vetter , Thomas Zimmermann Subject: [PATCH v10 2/2] drm/tiny: add driver for newhaven,1.8-128160EF Date: Wed, 1 Sep 2021 18:03:29 +0200 Message-Id: <20210901160329.1519656-3-daniel@zonque.org> X-Mailer: git-send-email 2.31.1 In-Reply-To: <20210901160329.1519656-1-daniel@zonque.org> References: <20210901160329.1519656-1-daniel@zonque.org> MIME-Version: 1.0 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: , Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" This patch adds support for Newhaven's NHD-1.8-128160EF display, featuring an Ilitek ILI9163 controller. Signed-off-by: Daniel Mack Acked-by: Daniel Vetter Acked-by: Thomas Zimmermann --- drivers/gpu/drm/tiny/Kconfig | 13 ++ drivers/gpu/drm/tiny/Makefile | 1 + drivers/gpu/drm/tiny/ili9163.c | 224 +++++++++++++++++++++++++++++++++ 3 files changed, 238 insertions(+) create mode 100644 drivers/gpu/drm/tiny/ili9163.c diff --git a/drivers/gpu/drm/tiny/Kconfig b/drivers/gpu/drm/tiny/Kconfig index d46f95d9196d..ca2d9255548b 100644 --- a/drivers/gpu/drm/tiny/Kconfig +++ b/drivers/gpu/drm/tiny/Kconfig @@ -67,6 +67,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 BACKLIGHT_CLASS_DEVICE + select DRM_KMS_CMA_HELPER + select DRM_KMS_HELPER + select DRM_MIPI_DBI + 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 9cc847e756da..c96c663c3499 100644 --- a/drivers/gpu/drm/tiny/Makefile +++ b/drivers/gpu/drm/tiny/Makefile @@ -5,6 +5,7 @@ obj-$(CONFIG_DRM_CIRRUS_QEMU) += cirrus.o obj-$(CONFIG_DRM_GM12U320) += gm12u320.o obj-$(CONFIG_DRM_SIMPLEDRM) += simpledrm.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 000000000000..b0953e1aa3ed --- /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