Received: by 2002:a17:90b:8d0:0:0:0:0 with SMTP id ds16csp5060843pjb; Mon, 27 Jul 2020 11:54:54 -0700 (PDT) X-Google-Smtp-Source: ABdhPJyd/ni9ib94uTlqOLX0Eg5iuw38/cNjlJYwAueMekqaz4wEJmyBVduDjD1ISdjGkb07SEXc X-Received: by 2002:a17:906:b353:: with SMTP id cd19mr13816173ejb.395.1595876093805; Mon, 27 Jul 2020 11:54:53 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1595876093; cv=none; d=google.com; s=arc-20160816; b=nO1UXb23Bjy+IuyHKptIibi3poBbpkL+ONF66wHRsbj3QSFvh/anShM0Ma3Ql0vtbY vrGjBH/IAkO4XI5IbbXmO4IZsx1jCvBV2SgKnHyeH8hwOkhBDKfEmoUVGsS8Vs6DZDnB btYlLH/H2E2n8Tt+4cI4E2kMA+3mrY4raU1DS7xfWuhhW7smkTm6udLUb3o5RFet6EcD L+uFGpOvl3IZ6dNsKqysfw1nb1wR3ON+F7nBqBQAC1Oqr0Y/61+Y5phdrV9ArqVRpau1 XiqHsKlE8qAuI2fP4l25zz7g5d3xqSdlKX8H9tZrTlhngFqWkjqsybZ/usDL2pb4/zgq zBIw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=jtxfHG4bxksjZ6TRQO5uGI4AQuPVDToPbM1aaCtpT1Y=; b=E5hs9p/RA1xyG35uj3RVPOcnY2C4rcwDhdc/A/cQJ/W0RVILlfAjsEa6BbLXhXF13Q 4pG4jii31wqBGDcBNlhQ8zNxGDCKQ6EQmJp90DssA4/W+xK9c+1bIpxcZ37IDhbXMnCv D47JxI3Hbu0NMEWz6kl0TJhNNNOuEnegjE904y4GrK6jRd9y3aAnKcgdlUcEOHOotIr9 Hdmc2FbHIMzvdxiUaIwdMDqG2+5/SCc8LKzBZVKXaddRYNUJ0urUoncwPYkxOLu6BCpt 3UlgOoz7RmQEuKfb7FNC/4f8o99ZpGkp4NCy3bFlPa93tRzbQjqSTnwFUB/LUN62FqDk 6CHQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=Suo1ALJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id c95si8025071edf.304.2020.07.27.11.54.32; Mon, 27 Jul 2020 11:54:53 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=fail header.i=@crapouillou.net header.s=mail header.b=Suo1ALJc; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=crapouillou.net Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1729237AbgG0QrR (ORCPT + 99 others); Mon, 27 Jul 2020 12:47:17 -0400 Received: from crapouillou.net ([89.234.176.41]:37710 "EHLO crapouillou.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1726753AbgG0QrQ (ORCPT ); Mon, 27 Jul 2020 12:47:16 -0400 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=crapouillou.net; s=mail; t=1595868398; h=from:from:sender:reply-to:subject:subject:date:date: message-id:message-id:to:to:cc:cc:mime-version:mime-version: content-type:content-type: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=jtxfHG4bxksjZ6TRQO5uGI4AQuPVDToPbM1aaCtpT1Y=; b=Suo1ALJcGJkTEhdl84pE1zZdk+xlJruMg9o+8XxKvfaMK8tiLcuXRMKAY1NKBk+RdGQudX PUVGOyX9MnwYomZAP9wyWlGudH87yNxmmx03MkSnWJKUVFEcc1QM7ePYEL5eGx3YJ7k1dK Er09Dhy2+HJF9JacthTupjKD+yxIbnA= From: Paul Cercueil To: Thierry Reding , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Andrzej Hajda , Neil Armstrong , Laurent Pinchart , Jonas Karlman , Jernej Skrabec , Maarten Lankhorst , Maxime Ripard , Thomas Zimmermann , =?UTF-8?q?Noralf=20Tr=C3=B8nnes?= Cc: od@zcrc.me, dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Paul Cercueil Subject: [PATCH 6/6] drm/panel: Add Ilitek ILI9341 DBI panel driver Date: Mon, 27 Jul 2020 18:46:13 +0200 Message-Id: <20200727164613.19744-7-paul@crapouillou.net> In-Reply-To: <20200727164613.19744-1-paul@crapouillou.net> References: <20200727164613.19744-1-paul@crapouillou.net> MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org This driver is for the Ilitek ILI9341 based YX240QV29-T 2.4" 240x320 TFT LCD panel from Adafruit. Signed-off-by: Paul Cercueil --- drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 345 +++++++++++++++++++ 3 files changed, 355 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 6a8a51a702d8..132a42a81895 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -105,6 +105,15 @@ config DRM_PANEL_ILITEK_IL9322 Say Y here if you want to enable support for Ilitek IL9322 QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. +config DRM_PANEL_ILITEK_ILI9341 + tristate "Ilitek ILI9341 320x240 QVGA panels" + depends on OF + depends on DRM_MIPI_DSI + depends on BACKLIGHT_CLASS_DEVICE + help + Say Y here if you want to enable support for Ilitek IL9341 + QVGA (320x240) RGB, YUV and ITU-T BT.656 panels. + config DRM_PANEL_ILITEK_ILI9881C tristate "Ilitek ILI9881C-based panels" depends on OF diff --git a/drivers/gpu/drm/panel/Makefile b/drivers/gpu/drm/panel/Makefile index a0516ced87db..ad5e6089c3ef 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -9,6 +9,7 @@ obj-$(CONFIG_DRM_PANEL_ELIDA_KD35T133) += panel-elida-kd35t133.o obj-$(CONFIG_DRM_PANEL_FEIXIN_K101_IM2BA02) += panel-feixin-k101-im2ba02.o obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d.o obj-$(CONFIG_DRM_PANEL_ILITEK_IL9322) += panel-ilitek-ili9322.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o obj-$(CONFIG_DRM_PANEL_JDI_LT070ME05000) += panel-jdi-lt070me05000.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9341.c b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c new file mode 100644 index 000000000000..3af6628639d6 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,345 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * DRM driver for Ilitek ILI9341 panels + * + * Copyright 2018 David Lechner + * Copyright 2020 Paul Cercueil + * + * Based on mi0283qt.c: + * Copyright 2016 Noralf Trønnes + */ + +#include +#include +#include +#include +#include +#include +#include +#include + +#include +#include +#include +#include