Received: by 2002:a25:23cc:0:0:0:0:0 with SMTP id j195csp1313905ybj; Thu, 7 May 2020 21:15:58 -0700 (PDT) X-Google-Smtp-Source: APiQypLS5w3Gh9kXH3kVrT0thwQBIrEvPmSo94/9W+WHoW098uGV8XZYi/H8la2Mb5bVgSRsQ2yd X-Received: by 2002:a50:f78c:: with SMTP id h12mr519997edn.207.1588911358132; Thu, 07 May 2020 21:15:58 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588911358; cv=none; d=google.com; s=arc-20160816; b=RuxWK1dY4V5z0jaLVJAdd7gyicha65b1yp/2NBSnJYhfQNmbTggFzYyxjlFQLHWAQV xnxBUQrmO1b2LSiq+r1CwETfT5nO4+D2qgz/imvO+gTUZKLbh22WbPQfYYr5yxO3TzYM WZlwG5DOtqH944miALfJbyf8uQL/FRaW+aoJdbHEb7PCyF0RuvnIf1O2Vr8/DnaiEIoJ UfAKfgLSKVXPbBMxX4CrAQB007vvHCQkgJLzVjOh/Mt++yqh1bYYjcxEDx68/FSRp2Nv DvGEtAEpr++RzP+TeVNwSp9Tp5BTkmFmE7X6qwWr9g5QTOIymLbow+Db00V08ApYrJA2 Odqg== 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=RsXnVDCbmTfLF5+palayxdoYvVpqGplnm+64NVDY5/0=; b=gAPCmNTgD/nPCfR3gs9CGNPXAjJedq3TxlKzJPDTgYuT5VwvMrLlyCRnmBdwbIRjT6 V0Yl69/V7s8Pw77xycGi3PfhgmguzLuanfcLMoxJ3KEF/sjTWGDe4izu4JVtqtGW8CQE 7eMy+Yoj/hGUOT5EtiG9WGLY+imnfSDKRL90Z+wJ96Z6QBsX2/Vc65zfOPct5BNGZ/SM n+mgCBxu2xqHGdTWiAL4b+JXJnZdq6uD178FpaCHFAE0A8E4uNmvA8hrpwuje6V5OrHN s5D9ciOOg83LXG63q0JdzUp7bJpq182mRrlBcopppOQyXT1cj+uz5kE+qG/O0Qb7d8y3 kCuQ== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=H+nggP6D; 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 ec9si118208ejb.160.2020.05.07.21.15.35; Thu, 07 May 2020 21:15: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=H+nggP6D; 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 S1726873AbgEHENp (ORCPT + 99 others); Fri, 8 May 2020 00:13:45 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:36482 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1725287AbgEHENo (ORCPT ); Fri, 8 May 2020 00:13:44 -0400 Received: from mail-pg1-x541.google.com (mail-pg1-x541.google.com [IPv6:2607:f8b0:4864:20::541]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 13EBFC05BD43; Thu, 7 May 2020 21:13:44 -0700 (PDT) Received: by mail-pg1-x541.google.com with SMTP id a4so286049pgc.0; Thu, 07 May 2020 21:13:44 -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=RsXnVDCbmTfLF5+palayxdoYvVpqGplnm+64NVDY5/0=; b=H+nggP6DxG1IL5CVrn1gSdvaF5SFSachwPT+ih2sWs6AlHEmJYuFETRjIuoil8M//R tEwjy2aY7s8AaTT6QLUFV8YUKje9ZFvop4pLFP2tkjA2Y7mHYsT0YJWUYK2SoyzV0BMG l9UJxwf0cAm/JwFgFEF5Kko0TrzqocaBr2Y913yTaHQusBBTpeXerWVxri9GSwfA1Sh+ 5iXgc7Qdnrvc7fYMEkN3v50aGJjdsOLubWgFV0MnpXiacxhcIQjPT7EA5HTAE4zTC4lG W4AiHtMplZqJrqckcC+0ZxHgGrO2Xtetu4K+aj5SgxySZeK/1I+VeXnlcvY/bxCzy03r SAdw== 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=RsXnVDCbmTfLF5+palayxdoYvVpqGplnm+64NVDY5/0=; b=hLmtN57PFp8SGTksGFxorYB09dn6d8X37XAp2a2mnwo1VMmWoNekMHws/Lq4pHAVco rmsdoXvQVQD51Ae7YlrFx0Nm1VZandThDHqovuibzvOMsUnWNQXjYJoWeWyKsXsBPL3Y vyaKzPgyoztahid1APSZgAKQxNOs9zy8el+oxcfNZAuLsWuDG8T6/+xub9jz+TvkjwBu HioM4cxMRU9rEQTdFAoS4KF+ImASgjBg76xPQkpU4fRf6+QEwX9U/WdhWofiqoI3ktui CzhfVxVlQPiHfynMdxAbMbu4zCTgjrAMuYJj3M4vCs1sdQZU0jQq7Feiv/9CqQpuXynD nAww== X-Gm-Message-State: AGi0PuYzarl14vlpO48Sscb2H4a9BFQw7EGLah4A8zyA/pWWPo05jqCE RGv9SqB8zXEhMIj/sH6CNl4= X-Received: by 2002:a63:3e0b:: with SMTP id l11mr365147pga.363.1588911223404; Thu, 07 May 2020 21:13:43 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([103.206.190.146]) by smtp.gmail.com with ESMTPSA id h12sm314868pfq.176.2020.05.07.21.13.38 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 07 May 2020 21:13:43 -0700 (PDT) From: dillon.minfei@gmail.com To: robh+dt@kernel.org, mcoquelin.stm32@gmail.com, alexandre.torgue@st.com, thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, mturquette@baylibre.com, sboyd@kernel.org Cc: devicetree@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-clk@vger.kernel.org, dillon min Subject: [PATCH v2 5/5] drm/panel: add panel driver for Ilitek ili9341 panels Date: Fri, 8 May 2020 12:13:14 +0800 Message-Id: <1588911194-12433-6-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588911194-12433-1-git-send-email-dillon.minfei@gmail.com> References: <1588911194-12433-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 is a driver for 320x240 TFT panels, accepting a rgb input streams that get adapted and scaled to the panel. 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 | 561 +++++++++++++++++++++++++++ 3 files changed, 570 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..ec22d80 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,561 @@ +// 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