From patchwork Wed May 6 06:31:33 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 11530463 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 36DFD92A for ; Wed, 6 May 2020 07:02:56 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 15977206E6 for ; Wed, 6 May 2020 07:02:56 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="bU7UCV6b" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 15977206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id DCE956E49D; Wed, 6 May 2020 07:02:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by gabe.freedesktop.org (Postfix) with ESMTPS id 2CF4A89C51 for ; Wed, 6 May 2020 06:31:45 +0000 (UTC) Received: by mail-pg1-x542.google.com with SMTP id f6so521246pgm.1 for ; Tue, 05 May 2020 23:31:45 -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=2Kklx6WNLIBEUnlaQW9xoqKKQiAQpc9O2rLkXNwH/Ew=; b=bU7UCV6bT4jUeZ7RQOMu3wRGQ+cZ2Cu8ugjmU1y3EAWGuBnm6OpfWbbpm6You3RxiK +LNF41UdPSiADhh5JhmW871M4g9IyrtTY1VBBlcdOnXjrbiSLoEC9cw73n94zcbxC/h4 uTcyuFXuXjfASNKh0szxgXDzYvSFQaxJAVYZs3yeVCNIzfKVS9Js1tAMtPCytYfB9FO2 GbZGWunwUSAsMp15drDmbitMgBncVnT1rOujQS3EKdwaSx98nrVIOieXLoRGhBPGvOlI HBBSfV0L6Y4Ovy8H6VTXXQk7wj31wccLCPh3rMi08OpmJ7Pn1VfItyFPGxlWIZf5+Jxc Kn4w== 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=2Kklx6WNLIBEUnlaQW9xoqKKQiAQpc9O2rLkXNwH/Ew=; b=K5/fPeWysXfm3UmFujDC4ACsIG0+6YgU2qS8zua8UrQJWsU/hOfjiRDrgsxgORGITu GX0nZfON6WQeiGmpKnpY+pqic2orE8DEN1vUL6qkYiNp1lKq6VuBmFpXiSA8yiTnhkjz sCCkJ/MdL0rbTkHIk4sxAeM8vJ1veeRxE7IZ5K81ymJQjuusI5wSiV2Pfd/+GsL0RxNR 2h4t65rCqYmo3bEMuswEC0gNGjdQoAkxRQ5CXKxV3mpyo7uwAgUexFLIRzPWd30v17a/ xHsQzIh/jQ9VZaaud+R/pRrk6rYmVKB0EWc2jUY3ZEYdb6Vh2wfQFvCysALgOlgWSJFh FVFA== X-Gm-Message-State: AGi0PuZGG0TaPD91WOwDbQig0wC3s4Quts3Nr741zrzc/L1PzfAx213r w6xTRlOCzd3s33bctFYEX1c= X-Google-Smtp-Source: APiQypJSzYnaLatTQqkl0/D+fk+Akri+ROm11yE/Km6azhEgc2fuE8h7m7GlL200Ebyzf1EpLGYWMg== X-Received: by 2002:a63:b51b:: with SMTP id y27mr5362061pge.400.1588746704798; Tue, 05 May 2020 23:31:44 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([103.206.190.146]) by smtp.gmail.com with ESMTPSA id y3sm3771975pjb.41.2020.05.05.23.31.42 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Tue, 05 May 2020 23:31:44 -0700 (PDT) From: dillon.minfei@gmail.com To: thierry.reding@gmail.com, sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, robh+dt@kernel.org Subject: [PATCH 2/4] dt-bindings: display: Add ilitek-9341 binding Date: Wed, 6 May 2020 14:31:33 +0800 Message-Id: <1588746693-31078-2-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1588746693-31078-1-git-send-email-dillon.minfei@gmail.com> References: <1588746693-31078-1-git-send-email-dillon.minfei@gmail.com> X-Mailman-Approved-At: Wed, 06 May 2020 07:02:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, dillon min , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" From: dillon min add ili9341 for stm32f429-disco board some hardware resources can be found here https://www.st.com/zh/evaluation-tools/32f429idiscovery.html Signed-off-by: dillon min --- .../bindings/display/panel/ilitek,ili9341.yaml | 55 ++++++++++++++++++++++ 1 file changed, 55 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml new file mode 100644 index 0000000..5138f56 --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9341.yaml @@ -0,0 +1,55 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9341.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek-9341 Display Panel + +maintainers: + - Dillon Min + +description: | + Ilitek ILI9341 TFT panel driver with SPI control bus + This is a driver for 320x240 TFT panels, accepting a rgb input + streams that get adapted and scaled to the panel. + VCOMH outputs. + +properties: + compatible: + items: + - const: ilitek,ili9341 + + reg: + maxItems: 1 + + data-mapping: + const: stm32f429-disco,ltdc-panel + + dc-gpios: true + + port: true + +additionalProperties: false + +required: + - compatible + - reg + - dc-gpios + +examples: + - | + panel: display@0 { + compatible = "stm32f429-disco,ltdc-panel", "ilitek,ili9341"; + reg = <0>; + spi-3wire; + spi-max-frequency = <10000000>; + dc-gpios = <&gpiod 13 0>; + port { + panel_in: endpoint { + remote-endpoint = <&display_out>; + }; + }; + }; +... + From patchwork Wed May 6 06:37:17 2020 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dillon Min X-Patchwork-Id: 11530459 Return-Path: Received: from mail.kernel.org (pdx-korg-mail-1.web.codeaurora.org [172.30.200.123]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 6AD7D92A for ; Wed, 6 May 2020 07:02:51 +0000 (UTC) Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (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 494A5206E6 for ; Wed, 6 May 2020 07:02:51 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=fail reason="signature verification failed" (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="iUYtDazy" DMARC-Filter: OpenDMARC Filter v1.3.2 mail.kernel.org 494A5206E6 Authentication-Results: mail.kernel.org; dmarc=fail (p=none dis=none) header.from=gmail.com Authentication-Results: mail.kernel.org; spf=none smtp.mailfrom=dri-devel-bounces@lists.freedesktop.org Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 1BEFA6E437; Wed, 6 May 2020 07:02:41 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from mail-pf1-x442.google.com (mail-pf1-x442.google.com [IPv6:2607:f8b0:4864:20::442]) by gabe.freedesktop.org (Postfix) with ESMTPS id 48C1689D44 for ; Wed, 6 May 2020 06:37:27 +0000 (UTC) Received: by mail-pf1-x442.google.com with SMTP id x77so523980pfc.0 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=o3oOCRnzIN19XzzXA7WbOqQU4wCVwWb5uHCjbK9h8KVfp6LDX7W7xoci5zHxvUevhJ pnedDo9xjKrDzbeEclGNtF4BveeHKWvKxljusHZo/NPJyvBUm+C7SpZtXD8afJV0nAMT 8+Y23a/d+MwStdMsR26gQMjX2yqEsLO6xSclszSwggHoO5Lnmm8un0ChYEStQpEvpf+7 HroNATJsq8kR7thpl4OoHDnIc+72Es25xRF3pYyCHKPPdMWI4+8+pDGmdRcKWj/hs3RO jcZrhSzS1g6PMfSA2Me0MN1wM56CdhQuqyJO6pGO5Zfnfz7KmskmozX1AlOgI5f41IrQ XJBA== X-Gm-Message-State: AGi0PubON/f17JWYlrpzXkqt2yy1MG/5UbGubJl0rWuvHAlh8dh36Rzk 1KiTG+I+vtIJKfHoLnAthHM= X-Google-Smtp-Source: APiQypJtvQ75uaB/xm6YegmxP4tsz7t0dF0xYVqZE0gJ1Mn3o6OigBM4fxSGk+7IgYzfa1l9Poq+GQ== 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 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> X-Mailman-Approved-At: Wed, 06 May 2020 07:02:40 +0000 X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: dillon min , linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org MIME-Version: 1.0 Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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