Received: by 2002:a05:6358:51dd:b0:131:369:b2a3 with SMTP id 29csp1272628rwl; Thu, 10 Aug 2023 08:48:26 -0700 (PDT) X-Google-Smtp-Source: AGHT+IHKm4gFjk3e94783dVa+ZT30WUkPPbSVLVPHDbeHXR17ZRcdOiHDftEiwnnXXLmm88B5OBO X-Received: by 2002:a2e:9447:0:b0:2b8:36d4:7b0a with SMTP id o7-20020a2e9447000000b002b836d47b0amr2174061ljh.29.1691682506544; Thu, 10 Aug 2023 08:48:26 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1691682506; cv=none; d=google.com; s=arc-20160816; b=Pl7SMHidP2Lg+bX4qb0IyIYAJeu4A415LcVoRnjMl9c2T1ntNDj4pZ4GWkAxXSjLIs afgTv5Hv6EKSi1TphuWFbj2Bz1K9/TQBizyC5+enGWm6SsZH7SSuB0BSv8kolgBKZDPI ez9vOT+ZNlvYQQkVn1hQJoEIXURCG+eBnlrxVClzWoXe1/nRCdOjOqSse8dZ0dCai7W+ X6BwXO/3tcwcx1XH4FxfOaGV1UcBg+lRPzAkyUwyEhib7tmA1hcwkbwriGL0jDd7BpuT AazNSEFPro5Cs3NQVax7axvbqe6jrUKVIg1iu4aQWmKojaAM954fHXmmYQTd1RxfGrL4 tgAg== 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=zecAnGqNYL9W689TKu6oPFuP711Ik4h3jwBO02soAIo=; fh=HcbfsntMiBBz8gizMGA0MXARb+41J9wGABY3u2xI0pA=; b=z9qFtS9VaZGYgzns9by5y0Gs3vR97YcO4N7kqEvsf3sbSniwyTkmvM6yQqKIBQ+2mX 6v/6aF9OTtO7IXGnU1yGpsyj5SCkE3P5J2WHGXQGifitaahoTsvtJ54dVwf292IAXBwl BGi8+9u0TCf/F6xURVu91ZBfSAqwmI3/UMfR5Sn7G4EHNtSGjhTujGuoixclKr9U4PdU NU4iX/wLTgI7zRx/lt/p5aqTZHl+piME1q1l0fkJFiP3EmpEcdpbtCpYuM92xr1Q5e4X vFyfLEY/PoZ+Mjex22hf76zCBnOcagGNbYSlHA78wEOEehtEhCGQuUkMWdJuACKFeJ01 xV9w== ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@bootlin.com header.s=gm1 header.b=Tm4N9Drc; 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 Return-Path: Received: from out1.vger.email (out1.vger.email. [2620:137:e000::1:20]) by mx.google.com with ESMTP id v21-20020a170906565500b00992f02a507bsi1681757ejr.864.2023.08.10.08.48.01; Thu, 10 Aug 2023 08:48:26 -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=Tm4N9Drc; 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 S235869AbjHJOll (ORCPT + 99 others); Thu, 10 Aug 2023 10:41:41 -0400 Received: from lindbergh.monkeyblade.net ([23.128.96.19]:37564 "EHLO lindbergh.monkeyblade.net" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S235851AbjHJOlb (ORCPT ); Thu, 10 Aug 2023 10:41:31 -0400 Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by lindbergh.monkeyblade.net (Postfix) with ESMTPS id B86192684; Thu, 10 Aug 2023 07:41:29 -0700 (PDT) Received: by mail.gandi.net (Postfix) with ESMTPA id 42499FF802; Thu, 10 Aug 2023 14:41:27 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691678488; 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=zecAnGqNYL9W689TKu6oPFuP711Ik4h3jwBO02soAIo=; b=Tm4N9DrcYtgUVAPmlBdkOozCUk/y/F9Jo69fmj0W8QeIXTUj8xPUv1qeUviRx/yoeu0xI4 OHPYppAOX/JkRn+PV6HWOSy/mhfzbLlaGJ9IwhOyDlnEewN9DD1bQhZrHaGKqNe2155eNa VpG4X4vkbk8MeBl+NOR1h/Eyg7WHX3d3XTVLbmHv1JNUS0FXr1xXGGln7U0BPJPbg8J4kv onVrMX7GOSw/DW6RwOuXQkWjnrPbd6Ei2l56MARPwWb7ADB54TA2YDQ0oRZaudNE7bKBmk T2Wl4HRs9/DFLHINfZzfuF0tnSAanxGzKl31P5akE92YGVo/Ejy2qRc+c4huvw== 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 v2 3/3] DRM: panel: add Ilitek ILI9806E driver Date: Thu, 10 Aug 2023 16:41:16 +0200 Message-Id: <20230810144116.855951-3-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20230810144116.855951-1-luca.ceresoli@bootlin.com> References: <20230810144116.855951-1-luca.ceresoli@bootlin.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-GND-Sasl: luca.ceresoli@bootlin.com X-Spam-Status: No, score=-2.8 required=5.0 tests=BAYES_00,DKIM_SIGNED, DKIM_VALID,DKIM_VALID_AU,DKIM_VALID_EF,RCVD_IN_DNSWL_LOW, RCVD_IN_MSPIKE_H5,RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_PASS 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 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 --- Changes in v2: - add ILI9806E_P1_DISCTRL1 bit description --- MAINTAINERS | 1 + drivers/gpu/drm/panel/Kconfig | 13 + drivers/gpu/drm/panel/Makefile | 1 + drivers/gpu/drm/panel/panel-ilitek-ili9806e.c | 385 ++++++++++++++++++ 4 files changed, 400 insertions(+) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9806e.c diff --git a/MAINTAINERS b/MAINTAINERS index 085e44a7b5e1..602dc866c2e3 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6520,6 +6520,7 @@ DRM DRIVER FOR ILITEK ILI9806E PANELS M: Luca Ceresoli S: Maintained 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..ffc60d924e63 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e.c @@ -0,0 +1,385 @@ +// 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