Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1701888ybj; Wed, 6 May 2020 03:48:58 -0700 (PDT) X-Google-Smtp-Source: APiQypJTb1OUcSnQ+QLLxqoRuuo+GfoZzeYvAEWeFbRnKWYwTurGZBAlvedNf4fKiWOuwd0kwjgX X-Received: by 2002:a50:9e8f:: with SMTP id a15mr6119106edf.68.1588762138740; Wed, 06 May 2020 03:48:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588762138; cv=none; d=google.com; s=arc-20160816; b=L4nyh7gJ/+ECX9vzLRpEmvcAU318cYAvtHjJJI033O+5cx+HmsSlVwZDZiMmeNAYSQ SjWPfl6ewyjfnO8T+uBZ6Y4H/4tVK5RsEl2sByi+x72XW+8PPkXRjiBqfUVqRrRcbJsr Br2aNDgDOnaMBup1N9iUgXkGSff/FLJnu0B3I1TcxAlpskjLHKgUqxb7ibDOCetg88/t YvVFIqt3CcSyvqbrCkvYszC/ehnIevxdM81x/WAVMvbXAMYa2QpeTIEQ5DQdiGtmGHTc /rDD0pw88wX2Ph4I/1n6yv52e7BzlDl2Ez3vfZkRDtTmAWcyH74Md0QqWrS0CeosE1sh 5MSA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:dkim-signature; bh=RnyC9aWc6aCugoq6jC4gNzOMjk99pUvPue2fER/PUVs=; b=zrNiwAA81qjTUufiigenfMhd0pMHlsXWxGqhb+/rS5M5+JGqrGVYE3wnLbDeObvgst p78w7vl2NirMudDuTQ971in/Q4fEbdtDhbjg9qsJOnp4H02/1XVZa7AvPUxLnSuRak4p nq8FEItedW+FY/aDpy2IMvawtsyqHaNBCogPPFdI/bqxKQexj70tMSxHet0Y8bkrV7ow F/yyElfRDrSLtCnt0hzrROz29ug9+L1txXrGQG4ThqdhQ2m80Hn//+waw5oaf5A3SF0u OMpd2ZqF+EWkdruNIpBcvWwc0tMH4o00RazuhXhYMCCNnH/t9/y10aScqr1icygTyll0 vrqw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=iUYtDazy; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id y9si770198edu.7.2020.05.06.03.48.35; Wed, 06 May 2020 03:48:58 -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=pass header.i=@gmail.com header.s=20161025 header.b=iUYtDazy; 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=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727935AbgEFGh2 (ORCPT + 99 others); Wed, 6 May 2020 02:37:28 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:32798 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1725873AbgEFGh1 (ORCPT ); Wed, 6 May 2020 02:37:27 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 531EDC061A0F for ; Tue, 5 May 2020 23:37:27 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id b8so341910pgi.11 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=qoihE3MjylQHV3oKsYRTPHpFRP1gsLKK/z+ogw52Kw95sxlsxGojJZCVT1MXTVVnuq zuDxaVcLVk0vay1dOXCDWKppvdvc6KiYvCjBSehZgYSzJp4OxfJY3JyqC4hmk/jFuVf+ ft/Rxp5HkHkT50pm4iQtjl+XYgu9nu3T0lw1zdqYwdYTfovI3MML55V/5xHb6Qj/Wr/C mvphgyoFWWDsCw1a1RERedh9tJx/QVqVESg+nRZsKM/SYWfZtDFjDP2tecwqRWNKMjVW eZGV6I5p5j58D+Yqn7Tq/u7/tYbLLCkRD07jBuQ7S8d/8RySiX0/xEaw7Wbii4eaiYDD JJqQ== X-Gm-Message-State: AGi0PuaSsUpFvcTdZwlz9knd8dY7mID1rV9kQPQ0scXIARhsvICoV3mD Q2zh4zSCSFaXv227/3C/44g= 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 Cc: dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, dillon min 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> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org 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