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=-13.8 required=3.0 tests=BAYES_00, DKIM_ADSP_CUSTOM_MED,DKIM_SIGNED,DKIM_VALID,FREEMAIL_FORGED_FROMDOMAIN, FREEMAIL_FROM,HEADER_FROM_DIFFERENT_DOMAINS,INCLUDES_CR_TRAILER, INCLUDES_PATCH,MAILING_LIST_MULTI,SPF_HELO_NONE,SPF_PASS,USER_AGENT_GIT autolearn=ham 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 D8454C433B4 for ; Fri, 14 May 2021 11:05:17 +0000 (UTC) Received: from desiato.infradead.org (desiato.infradead.org [90.155.92.199]) (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 31572611CA for ; Fri, 14 May 2021 11:05:17 +0000 (UTC) DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 31572611CA 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+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=desiato.20200630; h=Sender:Content-Type: List-Subscribe:List-Help:List-Post:List-Archive:List-Unsubscribe:List-Id: MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From: Reply-To:Content-Transfer-Encoding:Content-ID:Content-Description:Resent-Date :Resent-From:Resent-Sender:Resent-To:Resent-Cc:Resent-Message-ID:List-Owner; bh=gqfHsLziGP8XbP2ZyR39FvL2vNXPskIGGdC4yIwIqcs=; b=qEbM76Os3v8qYkBHuvDcW4TNo /pUyYJGKbNCQ+RYwnm68qwYzFv2wb0nkzBMGWxymw78rc8dFvpZfymAzuW29ZGYm8nEBuJVJSiPwQ W02R3TCQ04O8EbCQ3VJk3E5Jo8tqUpaQ6Eos3xX/Azcg6I+rjto9FGuRnSiuBJs1LmHgwkN9+T9ps NCIo/S2KCw/XEUwPV6gqGzW+RRUi0rb3JQb6VThKJgsjV/pA0PyDdTeWprxCbk7NzWybishktAALE /NZwGoOqiA7v/82G5Wo6qRBw8/YrGg74zpQYgXsAHJS5SZarATXNbnZ28dwtAohf3Ba+K2p2kzJHs 0P4MeYx6g==; Received: from localhost ([::1] helo=desiato.infradead.org) by desiato.infradead.org with esmtp (Exim 4.94 #2 (Red Hat Linux)) id 1lhVap-007q0h-16; Fri, 14 May 2021 11:02:55 +0000 Received: from bombadil.infradead.org ([2607:7c80:54:e::133]) by desiato.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhVaj-007pzz-L8 for linux-arm-kernel@desiato.infradead.org; Fri, 14 May 2021 11:02:50 +0000 DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=infradead.org; s=bombadil.20210309; h=Content-Transfer-Encoding: Content-Type:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc: To:From:Sender:Reply-To:Content-ID:Content-Description; bh=jE/TIuKBojv1iuFg/T5O/fed0z0GfnmGxLAakbUu4oY=; b=p8GR3Gkb2122vfvJgbOCEUz/xY zaxokG2UFd7MpCX1U66yVolsRH1blZGxaRC8icYC1xP7t5cYvYuZaSd2tJBs2QmXLz01Zns7OA5m3 MYFbohG1dI+wdn7Ni7gpTUQbqXlYvl11Tw3ZWPP+frzJbH/CuH07z7s7cjBppIZUfFCZcqh3imKwa IwvbKKuamVtUW85kO1iluSYfYuME2/jPfrm2VcMMYIoE6UvmUqF+ap+6wg5U60efLfLLQlAHOSpTW +JHK2L9olRVN4drMyEWsSFlipb/dcQ8MvI8oY3g9oQKPdRQd0K5ghRvplYMbBgDAjckkOxnww8bU0 mR79Ajyw==; Received: from mail-pf1-x42f.google.com ([2607:f8b0:4864:20::42f]) by bombadil.infradead.org with esmtps (Exim 4.94 #2 (Red Hat Linux)) id 1lhVad-00Bv6x-Mw for linux-arm-kernel@lists.infradead.org; Fri, 14 May 2021 11:02:48 +0000 Received: by mail-pf1-x42f.google.com with SMTP id y70so1444583pfg.2 for ; Fri, 14 May 2021 04:02:43 -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 :mime-version:content-transfer-encoding; bh=jE/TIuKBojv1iuFg/T5O/fed0z0GfnmGxLAakbUu4oY=; b=UOnA/xHoWAoylld5n8qdV8qF3EI0++R95yJ2uZjleNHcH2VmHdl+KESdFJ3lskmiar dofXBXdXMivKMrzN9QnwIl4Phz1zgNrIhN5LPADglcq4u9ANc97tJ9ZAuIkM8omC1fBG XjlFkTs+tgcTdvTerxjjGhISqVOTuLwKBY+d7zryde9Kg1ZwupbLNR2Fs52pPpIaRz/Y LzUS4kWSgK1wRv05oU0KYFCAeapo4StJa3w0Jl+8Oc7v8KMuKnrTcwwGLl+wRg4+VLZ8 jgS4YS/chRyeGCBPeLEFmbpgdLrqHgRyWV9wfXWpadBH+SljTtP9tLPb0GCmgqw7Ec/S o9fw== 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:mime-version:content-transfer-encoding; bh=jE/TIuKBojv1iuFg/T5O/fed0z0GfnmGxLAakbUu4oY=; b=hjI/1/K5iSlVINsnx6iwbU8jSqK+/j1DURjc9WsKWHog74yS0R6qLRMzWwvU68ciJ5 sYQ7KwArnVIUYREbfMd2Vnjt45Afp2FqR+OceyDziCeRSldcOAtNQu3u1cMHVJOx6EUD vciy8I8ZT1T3rNYFYUkoqzBgX+A/2xHb+VRvnpGMpW6OAT4ZObsLm0h/FCUBPbniY3h2 u3v/+YGIXv9+CsTD2rfPEHdzLdvRdpJNehhsHJ7+2bMZ6ZOM8tfv9Ih6NKGE2Yl0tT1R DKZT6Zy5tnCqVwLnk5nFmGQYffbZLCW1xuTlfNZnZ7k05nMqWLcTUh5XxW9wUy0xTK9o 6tjg== X-Gm-Message-State: AOAM531Kie0hnksVqrqq7+aOwvUaMua0HvIC2+1Qo0fcgfBig6tx91kv hUVVOixObmWNvHXjN6PPfk4= X-Google-Smtp-Source: ABdhPJzK+hkd/wpfDhRxZiEaIuttcbu2ggk+EolTJL37Sv5yA/IDXUCz8EzJworDthVCTht66uOClA== X-Received: by 2002:a63:4c63:: with SMTP id m35mr45213490pgl.105.1620990162254; Fri, 14 May 2021 04:02:42 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.103.165]) by smtp.gmail.com with ESMTPSA id 202sm4193402pgg.59.2021.05.14.04.02.37 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Fri, 14 May 2021 04:02:41 -0700 (PDT) From: dillon.minfei@gmail.com To: patrice.chotard@foss.st.com, pierre-yves.mordret@foss.st.com, alain.volmat@foss.st.com, mcoquelin.stm32@gmail.com, alexandre.torgue@foss.st.com, sumit.semwal@linaro.org, christian.koenig@amd.com, mturquette@baylibre.com Cc: sboyd@kernel.org, linux-i2c@vger.kernel.org, linux-stm32@st-md-mailman.stormreply.com, linux-arm-kernel@lists.infradead.org, linux-kernel@vger.kernel.org, linux-media@vger.kernel.org, dri-devel@lists.freedesktop.org, linaro-mm-sig@lists.linaro.org, linux-clk@vger.kernel.org, Dillon Min Subject: [PATCH 1/4] drm/panel: Add ilitek ili9341 panel driver Date: Fri, 14 May 2021 19:02:29 +0800 Message-Id: <1620990152-19255-2-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1620990152-19255-1-git-send-email-dillon.minfei@gmail.com> References: <1620990152-19255-1-git-send-email-dillon.minfei@gmail.com> MIME-Version: 1.0 X-CRM114-Version: 20100106-BlameMichelson ( TRE 0.8.0 (BSD) ) MR-646709E3 X-CRM114-CacheID: sfid-20210514_040243_833875_FD6D084C X-CRM114-Status: GOOD ( 23.75 ) X-BeenThere: linux-arm-kernel@lists.infradead.org X-Mailman-Version: 2.1.34 Precedence: list List-Id: List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Content-Type: multipart/mixed; boundary="===============2701552059289027605==" Sender: "linux-arm-kernel" Errors-To: linux-arm-kernel-bounces+linux-arm-kernel=archiver.kernel.org@lists.infradead.org --===============2701552059289027605== Content-Type: text/plain; charset=y Content-Transfer-Encoding: 8bit From: Dillon Min This driver combine tiny/ili9341.c mipi_dbi_interface driver with mipi_dpi_interface driver, can support ili9341 with serial mode or parallel rgb interface mode by register configuration. Reviewed-by: Linus Walleij Link: https://lore.kernel.org/lkml/1590378348-8115-7-git-send-email-dillon.minfei@gmail.com/ Signed-off-by: Dillon Min --- drivers/gpu/drm/panel/Kconfig | 12 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 1285 ++++++++++++++++++++++++++ 3 files changed, 1298 insertions(+) create mode 100755 drivers/gpu/drm/panel/panel-ilitek-ili9341.c diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 4894913936e9..e4babba17864 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -123,6 +123,18 @@ 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_ILI9341 + tristate "Ilitek ILI9341 240x320 QVGA panels" + depends on OF && SPI + depends on DRM_KMS_HELPER + depends on DRM_KMS_CMA_HELPER + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DBI + help + Say Y here if you want to enable support for Ilitek IL9341 + QVGA (240x320) RGB panels. support serial & parallel rgb + interface. + 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 cae4d976c069..0ecde184665d 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -11,6 +11,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_ILI9341) += 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 000000000000..f84983cbb250 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,1285 @@ +// 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 + * - 18-bit parallel RGB interface + * - 4-line serial spi interface + * + * Copyright (C) 2020 Dillon Min + * Derived from drivers/drm/gpu/panel/panel-ilitek-ili9322.c + */ + +#include +#include +#include +#include +#include +#include +#include +#include