From mboxrd@z Thu Jan 1 00:00:00 1970 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=-9.6 required=3.0 tests=DKIM_SIGNED,DKIM_VALID, DKIM_VALID_AU,FREEMAIL_FORGED_FROMDOMAIN,FREEMAIL_FROM, HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_PATCH,MAILING_LIST_MULTI,SIGNED_OFF_BY, SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=unavailable 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 6B807C47254 for ; Fri, 8 May 2020 04:13:47 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 3CDF920736 for ; Fri, 8 May 2020 04:13:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H+nggP6D" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726900AbgEHENq (ORCPT ); Fri, 8 May 2020 00:13:46 -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-Google-Smtp-Source: APiQypKIXCx3OiHgfj/BJUE5gz3XlOICq81l2/Lgnr2WhzvArNlm0vWi4U0U7RjXA0BGIgI860PXtg== 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