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=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 C6D47C8300B for ; Thu, 30 Apr 2020 09:43:59 +0000 (UTC) Received: from vger.kernel.org (vger.kernel.org [23.128.96.18]) by mail.kernel.org (Postfix) with ESMTP id 92E15214D8 for ; Thu, 30 Apr 2020 09:43:59 +0000 (UTC) Authentication-Results: mail.kernel.org; dkim=pass (2048-bit key) header.d=gmail.com header.i=@gmail.com header.b="m6+Ixr0S" Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726882AbgD3Jn6 (ORCPT ); Thu, 30 Apr 2020 05:43:58 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:44314 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-FAIL-OK-FAIL) by vger.kernel.org with ESMTP id S1726453AbgD3Jn6 (ORCPT ); Thu, 30 Apr 2020 05:43:58 -0400 Received: from mail-pg1-x542.google.com (mail-pg1-x542.google.com [IPv6:2607:f8b0:4864:20::542]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id 3FD8EC035494 for ; Thu, 30 Apr 2020 02:43:58 -0700 (PDT) Received: by mail-pg1-x542.google.com with SMTP id d17so2519001pgo.0 for ; Thu, 30 Apr 2020 02:43:58 -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; bh=gr0hI7CL6fB6j9wMytJhc/FnMRlpxRyBzBuyxLhHAI8=; b=m6+Ixr0STjxYZVpRDL844Isb+67uW0C2F0d663ZgNegYoJeIXYrH29k2P3zLfYxI8h aXG5tH0hdt2HmVjvlYWb1JHQPSP4mnpz5U9GIZSzARHbunMq3BJcVasoxT41PQ+bPlvo 7cG4FaleBp3qg6D7oXgikv04+s9GynEIwcSDiALe287VuVJoGxswzTJeSWvxCRPhDGpe /MpSFqLUcs4rGFqvQmL4vOAy6hepvb7j/nbS6zGtRkTIlc4L4czGKPAn/1OieCy4XtZl /Rxtg/BI25j2iTdNJNxgX/RNm2laDMeTSnScpYHHB704ZSEJKDTVD0/q4Z/WnYXxdJ8m R9UQ== 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; bh=gr0hI7CL6fB6j9wMytJhc/FnMRlpxRyBzBuyxLhHAI8=; b=nG2ir0ZjLKVzbBb5uqXp4uMSzkQAoBD/jMBvV1f/ow2bBMUmGFhFFtoyjthcEBEEaz 67kU8UcYsAmc6ah0GpurDAhSBcjMMioqcy9P2GLON81oyYPwK9XUqpIgp3AtqqjzSkw3 9+/1+zNQHwenfcskKl94C2uJgmAEXmj9l0gro7XTU3AQrsHOk3cRukXUfSB5mWTBboh9 4xj2Pp9sQm5yvBcfnHMGjUutS+BDJ9uuvikdg6tZ2xLmABUkEAIeWKeP4S/oqCk6c/Wf WwP3J7lqSU7TxOAvRsLl6OJcaV4lmFCUGygZdoZvVGJuliGUTQAZjS2KO0CUkJyrG7gY 57zw== X-Gm-Message-State: AGi0PuYGlJ45x/vKzmh6mhEnDXALwo1Q/ntZW3QoxWKrL/NgfquefXP2 ostQv5aHky/ssJoOzi4zXhM= X-Google-Smtp-Source: APiQypIbYVQ8osUArEwuFJ5B3mipTnVJpo2go4CAkoMNQSK5aE2zVfId/w7IjqXZ4nMRcRzwFcghOg== X-Received: by 2002:a63:1a0b:: with SMTP id a11mr2319564pga.29.1588239837567; Thu, 30 Apr 2020 02:43:57 -0700 (PDT) Received: from fmin-OptiPlex-7060.nreal.work ([137.59.101.138]) by smtp.gmail.com with ESMTPSA id w12sm3024337pfq.133.2020.04.30.02.43.54 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Apr 2020 02:43:56 -0700 (PDT) From: dillon.minfei@gmail.com To: thierry.reding@gmail.com Cc: sam@ravnborg.org, airlied@linux.ie, daniel@ffwll.ch, dri-devel@lists.freedesktop.org, linux-kernel@vger.kernel.org, dillon.minfei@gmail.com Subject: [PATCH 3/4] add drm panel ilitek 9341 driver Date: Thu, 30 Apr 2020 17:43:52 +0800 Message-Id: <1588239832-11536-1-git-send-email-dillon.minfei@gmail.com> X-Mailer: git-send-email 2.7.4 Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org From: dillon min 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 | 555 +++++++++++++++++++++++++++ 3 files changed, 564 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..dafae89 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,555 @@ +// 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