From patchwork Wed Jul 19 15:21:47 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 122683 Return-Path: Delivered-To: ouuuleilei@gmail.com Received: by 2002:a59:c923:0:b0:3e4:2afc:c1 with SMTP id j3csp2515802vqt; Wed, 19 Jul 2023 08:25:57 -0700 (PDT) X-Google-Smtp-Source: APBJJlERjrteM2R0aBzx0ly/aggBr7oEyc7hkv1dCKvdy4TvsQKV8iseQV+E2BL6YF8oNqNC0gcp X-Received: by 2002:a05:6a20:7289:b0:12f:405d:c4d0 with SMTP id o9-20020a056a20728900b0012f405dc4d0mr23859255pzk.54.1689780357626; Wed, 19 Jul 2023 08:25:57 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1689780357; cv=none; d=google.com; s=arc-20160816; b=mb4CzKwjjmrkfz1cmPPunGFDY17BoMo07BQj5j+LULdka2qBOcYIPmEjLYVrBIl7BV D30JjqFP4Wk6xk/hzxEwFg+vQFuC8Uxk78Kq8w/3euXGkqCBCLg0BM6YdzbNDPkxM1b7 RPL3Ag9y0zmHDF5+j+KYKEQAaSYuOEEUUR4DKKafvrfd7iAXX3xVmdjBdMtTqeyzc/cx Dh8wkrmG8NUeVO1pFpmCKXfinBAIdsF7XFrDyVdRNRUOSSbkZjVb1tLS5VujLwNJw3x0 voU90ADjnhz7QAZvRq5YOXgwHEAPFs0hNn38oE0UwLR/oLZr5JgYnbvvR0h/Z3z+lC23 ZwOw== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:content-transfer-encoding:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from :dkim-signature; bh=CBg6tMAdVYwms8PoDmVDoX4vd6DGK68Jkg1jw+ADWwM=; fh=HcbfsntMiBBz8gizMGA0MXARb+41J9wGABY3u2xI0pA=; b=q/iWRF05hLWkBZs7oK6OlB8TJ4TYKepiRNFPyD8sPMqzTir4vEDqI1ThCS16xQwpm4 /630qAR1p0dVkIFEC2MozteFkbhIDg2Eihc/D5SBsS44uUjDmHe8f2iePDv7ozThJwqD EtQ6YtTUxtgZqsKU4btjKBd9RWd8u21KSNyJG0CFNLxzDlS1uOWP0sEIWvwL2RTOPjBJ BwDziltJrxMSUljUIvKSk5PDadOnUgTHNw6tirwxq4NPmjGP9i+Ti6Vv4WkVKOivA1Lb +xYr/mB7udQfzgh8SFsGPDAYyh+muEyLY15gzvtuCZkb+p6xZEhHI9GjT9ua7KmLIvpp 0Gog== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="aR/SHyNS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id g30-20020a63201e000000b0055acc7f8097si3636465pgg.364.2023.07.19.08.25.43; Wed, 19 Jul 2023 08:25:57 -0700 (PDT) Received-SPF: pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) client-ip=2620:137:e000::1:20; Authentication-Results: mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b="aR/SHyNS"; spf=pass (google.com: domain of linux-kernel-owner@vger.kernel.org designates 2620:137:e000::1:20 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=pass (p=REJECT sp=REJECT dis=NONE) header.from=bootlin.com Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S231705AbjGSPWM (ORCPT + 99 others); Wed, 19 Jul 2023 11:22:12 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:59298 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S231702AbjGSPWH (ORCPT ); Wed, 19 Jul 2023 11:22:07 -0400 Received: from relay5-d.mail.gandi.net (relay5-d.mail.gandi.net [217.70.183.197]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id D4712CC; Wed, 19 Jul 2023 08:22:04 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id D8D241C0004; Wed, 19 Jul 2023 15:22:01 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1689780123; h=from:from:reply-to:subject:subject:date:date:message-id:message-id: to:to:cc:cc:mime-version:mime-version: content-transfer-encoding:content-transfer-encoding: in-reply-to:in-reply-to:references:references; bh=CBg6tMAdVYwms8PoDmVDoX4vd6DGK68Jkg1jw+ADWwM=; b=aR/SHyNSTmmLtcNqB+J3ayR5nChFZV5WIIyU8NdO1DcHd5j80flvY2QDdSPni84XjSGeDo 46eiLd5R4x1b5doItnVZA4Ivvbbfpr/VZ1o9nqw1SPGZdL3RBbbkRv0NGh3GNFSrSc4h3k UskcvhjiS3knW6+l0tV6OOGPOlqlHLtEUmllA+rm+yQEZr8HI/khOaBvtWQYENgVKuBCBS 3tF0DTr/q+2k0TmY8IXiYwtMhCzC3YjJeg6pskSXeTnh9R58Ng1NrjFEOeYlRBrj6XrtnE FJ7bLk1uYtaZi2yaJH7cbi776JNbguv/4ud9i2F6hZ7pecEehFiNr0PazpLxxA== From: Luca Ceresoli To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Cc: Luca Ceresoli , dri-devel@lists.freedesktop.org, devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, Thomas Petazzoni , Paul Kocialkowski Subject: [PATCH 3/3] DRM: panel: add Ilitek ILI9806E driver Date: Wed, 19 Jul 2023 17:21:47 +0200 Message-Id: <20230719152147.355486-3-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230719152147.355486-1-luca.ceresoli@bootlin.com> References: <20230719152147.355486-1-luca.ceresoli@bootlin.com> MIME-Version: 1.0 X-GND-Sasl: luca.ceresoli@bootlin.com X-Spam-Status: No, score=-2.1 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_BLOCKED, RCVD_IN_MSPIKE_H4,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS, T_SCC_BODY_TEXT_LINE,URIBL_BLOCKED autolearn=ham autolearn_force=no version=3.4.6 X-Spam-Checker-Version: SpamAssassin 3.4.6 (2021-04-09) on lindbergh.monkeyblade.net Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org X-getmail-retrieved-from-mailbox: INBOX X-GMAIL-THRID: 1771863128147999550 X-GMAIL-MSGID: 1771863128147999550 Add a driver for the ILITEK ILI9806E 480x864 RGB LCD controller connected over SPI, and implement the ShenZhen New Display Co NDS040480800-V3 480x800 panel. Signed-off-by: Luca Ceresoli --- MAINTAINERS | 1 + drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9806e.c | 384 ++++++++++++++++++ 4 files changed, 399 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9806e.c diff --git a/MAINTAINERS b/MAINTAINERS index 3c38699ee821..4d657a049acc 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6520,6 +6520,7 @@ M: Luca Ceresoli S: Maintained T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml +F: drivers/gpu/drm/panel/panel-ilitek-ili9806e.c DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS M: Jagan Teki diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 203c0ef0bbfd..e3e89d86668a 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -194,6 +194,19 @@ config DRM_PANEL_ILITEK_ILI9341 QVGA (240x320) RGB panels. support serial & parallel rgb interface. +config DRM_PANEL_ILITEK_ILI9806E + tristate "Ilitek ILI9806E panel" + depends on OF + depends on BACKLIGHT_CLASS_DEVICE + select VIDEOMODE_HELPERS + select DRM_MIPI_DBI + help + Say Y here if you want to enable support for LCD panels connected + over SPI and based on the Ilitek ILI9806E controller. + + The ILI9806E is an LCD controller capable of driving 18-bit a-Si + TFT LCDs up to a resolution of 480x800. + 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 30cf553c8d1d..f465140ae7df 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -17,6 +17,7 @@ obj-$(CONFIG_DRM_PANEL_FEIYANG_FY07024DI26A30D) += panel-feiyang-fy07024di26a30d obj-$(CONFIG_DRM_PANEL_HIMAX_HX8394) += panel-himax-hx8394.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_ILI9806E) += panel-ilitek-ili9806e.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o obj-$(CONFIG_DRM_PANEL_INNOLUX_P079ZCA) += panel-innolux-p079zca.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c b/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c new file mode 100644 index 000000000000..57c12bff70f8 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c @@ -0,0 +1,384 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * Driver for the Ilitek ILI9806E a-Si TFT LCD controller. + * + * Copyright (c) 2023 Delcon SRL + * Luca Ceresoli + */ + +#include +#include +#include + +#include +#include +#include +#include +#include + +#include