From patchwork Mon Jul 29 19:55:23 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: =?utf-8?q?Noralf_Tr=C3=B8nnes?= X-Patchwork-Id: 11064447 Return-Path: Received: from mail.wl.linuxfoundation.org (pdx-wl-mail.web.codeaurora.org [172.30.200.125]) by pdx-korg-patchwork-2.web.codeaurora.org (Postfix) with ESMTP id 0488614DB for ; Mon, 29 Jul 2019 19:55:55 +0000 (UTC) Received: from mail.wl.linuxfoundation.org (localhost [127.0.0.1]) by mail.wl.linuxfoundation.org (Postfix) with ESMTP id EA64B209CE for ; Mon, 29 Jul 2019 19:55:54 +0000 (UTC) Received: by mail.wl.linuxfoundation.org (Postfix, from userid 486) id DE8D427FB0; Mon, 29 Jul 2019 19:55:54 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.3.1 (2010-03-16) on pdx-wl-mail.web.codeaurora.org X-Spam-Level: X-Spam-Status: No, score=-5.2 required=2.0 tests=BAYES_00,MAILING_LIST_MULTI, RCVD_IN_DNSWL_MED autolearn=ham version=3.3.1 Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher DHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by mail.wl.linuxfoundation.org (Postfix) with ESMTPS id E42CD2818E for ; Mon, 29 Jul 2019 19:55:53 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 00BF589D44; Mon, 29 Jul 2019 19:55:49 +0000 (UTC) X-Original-To: dri-devel@lists.freedesktop.org Delivered-To: dri-devel@lists.freedesktop.org Received: from smtp.domeneshop.no (smtp.domeneshop.no [IPv6:2a01:5b40:0:3005::1]) by gabe.freedesktop.org (Postfix) with ESMTPS id A9E796E1D3 for ; Mon, 29 Jul 2019 19:55:48 +0000 (UTC) Received: from 211.81-166-168.customer.lyse.net ([81.166.168.211]:57528 helo=localhost.localdomain) by smtp.domeneshop.no with esmtpsa (TLS1.2:ECDHE_RSA_AES_128_CBC_SHA1:128) (Exim 4.84_2) (envelope-from ) id 1hsBkI-0003F7-Gn; Mon, 29 Jul 2019 21:55:46 +0200 From: =?utf-8?q?Noralf_Tr=C3=B8nnes?= To: dri-devel@lists.freedesktop.org Subject: [RFC 1/4] drm/panel: Add Ilitek ILI9341 parallel RGB panel driver Date: Mon, 29 Jul 2019 21:55:23 +0200 Message-Id: <20190729195526.13337-2-noralf@tronnes.org> X-Mailer: git-send-email 2.20.1 In-Reply-To: <20190729195526.13337-1-noralf@tronnes.org> References: <20190729195526.13337-1-noralf@tronnes.org> MIME-Version: 1.0 X-Mailman-Original-DKIM-Signature: v=1; a=rsa-sha256; q=dns/txt; c=relaxed/relaxed; d=tronnes.org; s=ds201810; h=Content-Transfer-Encoding:MIME-Version:References:In-Reply-To:Message-Id:Date:Subject:Cc:To:From; bh=fLDNm0MClzrUfYGoDZi/cTIJXrji1H53LUAwEmmMHK4=; b=dyNWSF41RFs3LJfmlNPLPFM9i3DyPfUms2NyRTkSzg6VfjMzFJCBJigVDiSyE7UQbo5qHh0OC4ZN0jzPVXmAOlqfw9DnEF53w6pNRb/mxTQThUSEvNoMV+0VyvOtVW81IiQQS+enAUhxY9JLUPb1Pf1Qzj6r86RCI34to51UWNBk4aOO0rN61+Q+nKcxD4Uric15Vj6BK/Xq4N9ufQWKL/u7+uy2re0NKaelQEz6pa1QlyaY/dydBAD2gZrcHeCjQdZ2NQx32FTbxjPPIYEmHH55Q7MuKADzDvBWQmw03Th9ttRss2t3PdM+7rHj6W5BWjGboO2YbpHwx/8SxXaVbg==; X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.23 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: daniel.vetter@ffwll.ch, josef@lusticky.cz, thierry.reding@gmail.com, laurent.pinchart@ideasonboard.com, sam@ravnborg.org Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" X-Virus-Scanned: ClamAV using ClamSMTP From: Josef Lusticky Add driver for Ilitek ILI9341 panels in parallel RGB mode Signed-off-by: Josef Lusticky --- MAINTAINERS | 6 + drivers/gpu/drm/panel/Kconfig | 9 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9341.c | 291 +++++++++++++++++++ 4 files changed, 307 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9341.c diff --git a/MAINTAINERS b/MAINTAINERS index 060ffe635832..1f638d96113b 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -5115,6 +5115,12 @@ S: Maintained F: drivers/gpu/drm/tinydrm/hx8357d.c F: Documentation/devicetree/bindings/display/himax,hx8357d.txt +DRM DRIVER FOR ILITEK ILI9341 PANELS +M: Josef Lusticky +S: Maintained +F: drivers/gpu/drm/panel/panel-ilitek-ili9341.c +F: Documentation/devicetree/bindings/display/panel/ilitek,ili9341.txt + DRM DRIVER FOR INTEL I810 VIDEO CARDS S: Orphan / Obsolete F: drivers/gpu/drm/i810/ diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index eaecd40cc32e..34a5b262f924 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -56,6 +56,15 @@ 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 panels" + depends on OF && SPI + depends on BACKLIGHT_CLASS_DEVICE + select TINYDRM_MIPI_DBI + help + Say Y here if you want to enable support for Ilitek ILI9341 + QVGA (240x320) RGB panel. + 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 62dae45f8f74..ba4a303c1a66 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -4,6 +4,7 @@ obj-$(CONFIG_DRM_PANEL_LVDS) += panel-lvds.o obj-$(CONFIG_DRM_PANEL_SIMPLE) += panel-simple.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..0c700b171025 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9341.c @@ -0,0 +1,291 @@ +// SPDX-License-Identifier: GPL-2.0+ +/* + * Ilitek ILI9341 drm_panel driver + * 240RGBx320 dots resolution TFT LCD display + * + * This driver supports the following panel configurations: + * - Command interface: + * - MIPI-DBI Type 3 Option 1 + * (9-bit SPI with Data/Command bit - IM[3:0] = 1101) + * - MIPI-DBI Type 3 Option 3 + * (8-bit SPI with Data/Command GPIO - IM[3:0] = 1110) + * - Graphical data interface: + * - MIPI-DPI 18-bit parallel RGB interface + * + * Copyright (C) 2019 Josef Lusticky + * + */ + +#include +#include +#include +#include +#include +#include + +#include