From patchwork Wed May 6 06:37:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 11530459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AD7D92A for ; Wed, 6 May 2020 07:02:51 +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 494A5206E6 for ; Wed, 6 May 2020 07:02:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iUYtDazy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 494A5206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com 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 1BEFA6E437; Wed, 6 May 2020 07:02:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48C1689D44 for ; Wed, 6 May 2020 06:37:27 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id x77so523980pfc.0 for ; Tue, 05 May 2020 23:37:27 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=RnyC9aWc6aCugoq6jC4gNzOMjk99pUvPue2fER/PUVs=; b=iUYtDazyFAcnzcM3QJfkVreg2rUCxU2HZBMCqN9wkBsp8mbSAdypJIqYzB39WJvy1O ck0o3wrREJaIKAiN6yA+0NIET+tNkKuRTWK3fsb3+6y8SWVutjcKKSo7S3rxJJ1rdVRy H/tlIlvrbeptkvKfZWFv9OEympjbLF++77rR5S6B5tItY1OgtU8TSBnf3nF9M/dUGLvA bLUmpel0Tnu1qjrKq8aQqPrALztu05BKpkNikCUJUy/uje7Fdhpc9pLeweOjCGMLBrcD RpBjylhCX/jwfPGKyhBeY6sxzw5pluJfcOFUwz71RzXjdeD39HJYbqMC2HKtK2ICzJVf oShQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=RnyC9aWc6aCugoq6jC4gNzOMjk99pUvPue2fER/PUVs=; b=o3oOCRnzIN19XzzXA7WbOqQU4wCVwWb5uHCjbK9h8KVfp6LDX7W7xoci5zHxvUevhJ pnedDo9xjKrDzbeEclGNtF4BveeHKWvKxljusHZo/NPJyvBUm+C7SpZtXD8afJV0nAMT 8+Y23a/d+MwStdMsR26gQMjX2yqEsLO6xSclszSwggHoO5Lnmm8un0ChYEStQpEvpf+7 HroNATJsq8kR7thpl4OoHDnIc+72Es25xRF3pYyCHKPPdMWI4+8+pDGmdRcKWj/hs3RO jcZrhSzS1g6PMfSA2Me0MN1wM56CdhQuqyJO6pGO5Zfnfz7KmskmozX1AlOgI5f41IrQ XJBA== X-Gm-Message-State: AGi0PubON/f17JWYlrpzXkqt2yy1MG/5UbGubJl0rWuvHAlh8dh36Rzk 1KiTG+I+vtIJKfHoLnAthHM= X-Google-Smtp-Source: APiQypJtvQ75uaB/xm6YegmxP4tsz7t0dF0xYVqZE0gJ1Mn3o6OigBM4fxSGk+7IgYzfa1l9Poq+GQ== X-Received: by 2002:a62:9211:: with SMTP id o17mr6641093pfd.234.1588747046671; Tue, 05 May 2020 23:37:26 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([103.206.190.146]) by smtp.gmail.com with ESMTPSA id y63sm773289pfg.138.2020.05.05.23.37.23 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2020 23:37:26 -0700 (PDT) From: dillon.minfei@gmail.com To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, alexandre.torgue@st.com Subject: [PATCH 3/4] drm/panel: Add Ilitek ILI9341 driver Date: Wed, 6 May 2020 14:37:17 +0800 Message-Id: <1588747037-31198-2-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588747037-31198-1-git-send-email-dillon.minfei@gmail.com> References: <1588747037-31198-1-git-send-email-dillon.minfei@gmail.com> X-Mailman-Approved-At: Wed, 06 May 2020 07:02:40 +0000 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: dillon min , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: dillon min This adds support for the Ilitek ILI9341 QVGA (240x320) TFT panel driver. This panel driver supports parallel RGB input. The controller is combined with a physical panel and configured through the device tree. Signed-off-by: dillon min --- drivers/gpu/drm/panel/Kconfig | 8 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 513 +++++++++++++++++++++++++++ 3 files changed, 522 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 a1723c1..e42692c 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -95,6 +95,14 @@ 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_IL9341 + tristate "Ilitek ILI9341 240x320 QVGA panels" + depends on OF && SPI + select REGMAP + help + Say Y here if you want to enable support for Ilitek IL9341 + QVGA (240x320) RGB 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 96a883c..d123543 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -8,6 +8,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_IL9341) += 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 0000000..e458677 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,513 @@ +// SPDX-License-Identifier: GPL-2.0-only +/* + * Ilitek ILI9341 TFT LCD drm_panel driver. + * + * This panel can be configured to support: + * - 16-bit parallel RGB interface + * + * Copyright (C) 2020 Dillon Min + * Derived from drivers/drm/gpu/panel/panel-ilitek-ili9322.c + */ + +#include +#include +#include +#include +#include +#include +#include +#include