Received: by 2002:a25:1985:0:0:0:0:0 with SMTP id 127csp1632431ybz; Thu, 30 Apr 2020 02:48:20 -0700 (PDT) X-Google-Smtp-Source: APiQypLjoGrjLHiaN+ln+xx7d+RJvll/xHgJs/5W/wRssand1ykBvFY9YgLqae/uvuPw+v6CzXmY X-Received: by 2002:a50:bb25:: with SMTP id y34mr1721869ede.237.1588240100251; Thu, 30 Apr 2020 02:48:20 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1588240100; cv=none; d=google.com; s=arc-20160816; b=lL3zXZo7ACQxju1Ga8Pbkmooam/HJPW1zkbZTd4LN1Lgf4g8PvmBRH92qXINftSPcC rp7DlanjlnTreQqxW2zcu+6soU7RevXY7ycBk+CMXXgI6d7PkzNhgyUSxBFEZmazaYzi X8UhCwpe8D16rNxzZGEf89vgYqyd3geMtEC6Jp52zunQPLeozRrpADw+ZyUyWnrwxYD8 NepdNonhe79QED4oOrhcwW5CPGNC4wVAiQnku7abrNZ3XeoHDOmFnJMROw5VXTqBsRVr howtTca011MRtNxbtngiVOZjQvWPqYFp5oTUHG76YrI+J7BZthqyY5SgN9Rk2YAah6cO BQ0g== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:message-id:date:subject:cc:to:from :dkim-signature; bh=gr0hI7CL6fB6j9wMytJhc/FnMRlpxRyBzBuyxLhHAI8=; b=wvLw4hNQs5jLr2+SHMEs6u+ijnQWM3cXhjF5vKphXsEBfDn6RyYkGZAS5vOORrGjze ugFEXfllB/FsmTQaQ+JLWtkP7zSCdMWBy06F4hof9r756/FNENdJ+c5Nrzg+sriTVDqD cCMo8NDP3H0N3q/SvObjO77hQdg/htqeB0rLt7m3DTP2Mdf5avzzM5g0KbpuljCrAF4w Q3oz3+dopKd1J6JRE9tUQKmdNkqWYdciRenn8vaFzCArYXpjQc+w2mO/yaI/tMQMcKja s5QzetoYe/Owl1xOxyEcCtnPjfcNV7w3rvfcg6Pd6czifR84bZu0Yhejmg7tE4t4o64i 8pHw== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m6+Ixr0S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Return-Path: Received: from vger.kernel.org (vger.kernel.org. [23.128.96.18]) by mx.google.com with ESMTP id l4si638312edl.169.2020.04.30.02.47.56; Thu, 30 Apr 2020 02:48:20 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) client-ip=23.128.96.18; Authentication-Results: mx.google.com; dkim=pass header.i=@gmail.com header.s=20161025 header.b=m6+Ixr0S; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 23.128.96.18 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=NONE sp=QUARANTINE dis=NONE) header.from=gmail.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1726866AbgD3Jn6 (ORCPT + 99 others); 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-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