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.5 required=3.0 tests=DKIM_ADSP_CUSTOM_MED, DKIM_SIGNED,DKIM_VALID,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 97BF0C4724C for ; Fri, 8 May 2020 04:14:47 +0000 (UTC) Received: from bombadil.infradead.org (bombadil.infradead.org [198.137.202.133]) (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 620B120663 for ; Fri, 8 May 2020 04:14:47 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=lists.infradead.org header.i=@lists.infradead.org header.b="sVZd6Ekm"; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="H+nggP6D" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 620B120663 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.org DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=lists.infradead.org; s=bombadil.20170209; h=Sender: Content-Transfer-Encoding:Content-Type:MIME-Version:Cc:List-Subscribe: List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id:References: In-Reply-To:Message-Id:Date:Subject:To:From:Reply-To:Content-ID: Content-Description:Resent-Date:Resent-From:Resent-Sender:Resent-To:Resent-Cc :Resent-Message-ID:List-Owner; bh=pWEI8GEh283j8F6ryGiNWUpUOyadbWTKuEWw6xyKyew=; b=sVZd6EkmIh+ZIZK3af0d76S9un xyyeFVf5/eFW8ENbH9WQBbVt98r66PjLP+Y2fPBDebnHXJNU/H2j8YSs+feGvJyd2X/s0990x5o/y fJl7YpciNImh5ffOwJCFq90fejiQEZtrnXxoyFDoEv+wY7Sx0fb1bTl3NHEfI72c62n1tWmy4wG2Y 4W7ztsh+80Ero8Tcd+2xAW3IDY7grZI+IfhWIMa4PI9HWeLDqQFabVBn4YDvzbIlZIpB+D6hjziyd i/tAPnmgTUFUmE9BoGTQ6eY6QYqiXzCMtGQftk9D8Ed2kITQ18TY8qF/HE/aCRuSEDJwtO9/TMU+T P5NcFNYw==; Received: from localhost ([127.0.0.1] helo=bombadil.infradead.org) by bombadil.infradead.org with esmtp (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWuPO-0007Ny-Su; Fri, 08 May 2020 04:14:46 +0000 Received: from mail-pg1-x543.google.com ([2607:f8b0:4864:20::543]) by bombadil.infradead.org with esmtps (Exim 4.92.3 #3 (Red Hat Linux)) id 1jWuOP-0006VU-Bl for linux-arm-kernel@lists.infradead.org; Fri, 08 May 2020 04:13:50 +0000 Received: by mail-pg1-x543.google.com with SMTP id l25so275908pgc.5 for ; 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=p68XJduWfF87F7r09I+5ArGVNuECVj7chLkymXYXnvCqhAzTsIjW1i3gmPnxid9fOp srqMb0vLqmtgCQC5Q/fxI6pz2ob8FKUTK5w+igdev3FlLEX85RBYSRqqontz7pRxL3Fi BoDTwDCidVbyWYbFmMJ2msVRKyJ3SiTHistceCBOirc2sTDLRG/jKLmq1hMrEdCZhSMK I/lg5V6Rh+snyzYndG8/AMhca/IOOv50THguxN+3IhjAlJzfsZCyUGAcq6BSmL5RYOMK wNpdqAuVjaACZETnSweG19UMO0a+JBZZsOnZ3C/XPH6DdlqTRsyl6ij2zaJ4A9MlobOC LJ2A== X-Gm-Message-State: AGi0PuYV4Eyx09P+JYivATnSxT+Ksmok+f487LjZfZYGfJGm+kwk7U+N X0jE/u0oKG9O6OobyqqLOnE= 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 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> X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20200507_211345_544850_2B075B83 X-CRM114-Status: GOOD ( 20.71 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, linux-stm32@st-md-mailman.stormreply.com, dillon min , linux-clk@vger.kernel.org, linux-arm-kernel@lists.infradead.org MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+infradead-linux-arm-kernel=archiver.kernel.org@lists.infradead.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