From patchwork Thu Aug 10 14:41:14 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13349539 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 53003C04FDF for ; Thu, 10 Aug 2023 14:41:31 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 7EEA610E53F; Thu, 10 Aug 2023 14:41:30 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by gabe.freedesktop.org (Postfix) with ESMTPS id AB0A810E53F for ; Thu, 10 Aug 2023 14:41:27 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id E806AFF803; Thu, 10 Aug 2023 14:41:23 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691678485; 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; bh=IyUXDREdoK5KpDJLjt4F6V+kTmb3e3jKUO9hAJV9buU=; b=ZgLU/UZ/OL7yBVxcfBH1xx7n+TJz4FIl8iltYgWqaAbmmkVE/41YRFMp+FPBkYeIu9k6Ez oRsKvAJno8tFLB4ykSuflOaLZf0GB+mpatdZHXl8ztIWkQTkjFHj4c87uUiLNodvy0z8Rn syEXlTdUw52bxhIDi35AtwEneFHwNGQXjNa7gK9eeVeLcWGrQEWCgZSZyBsY2y+MQdBF4b Y65dPOzdskTjPyJ20YrvGCO/OaKBv8mwyGGEdsEmZIDtwJyUvMdlD086bbz8clRd01LA3b B4NvKq25S7CLwBGBssD713B9P9fQ1piNf3KVK6lYJd+yQQx7ngV1XOFBt3Ogjw== From: Luca Ceresoli To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH v2 1/3] dt-bindings: vendor-prefixes: add ShenZhen New Display Co. Date: Thu, 10 Aug 2023 16:41:14 +0200 Message-Id: <20230810144116.855951-1-luca.ceresoli@bootlin.com> X-Mailer: git-send-email 2.34.1 MIME-Version: 1.0 X-GND-Sasl: luca.ceresoli@bootlin.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski , Thomas Petazzoni , Luca Ceresoli Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" ShenZhen New Display Co., Limited is the manufacturer of the NDS040480800-V3 LCD panel according the datasheet. Signed-off-by: Luca Ceresoli Acked-by: Conor Dooley Acked-by: Rob Herring --- Changes in v2: none --- Documentation/devicetree/bindings/vendor-prefixes.yaml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/vendor-prefixes.yaml b/Documentation/devicetree/bindings/vendor-prefixes.yaml index af60bf1a6664..f73d6d4eabbe 100644 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml @@ -929,6 +929,8 @@ patternProperties: description: Netronix, Inc. "^netxeon,.*": description: Shenzhen Netxeon Technology CO., LTD + "^newdisplay,.*": + description: ShenZhen New Display Co., Limited "^neweast,.*": description: Guangdong Neweast Optoelectronics CO., LTD "^newhaven,.*": From patchwork Thu Aug 10 14:41:15 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13349541 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 5EF3CC04A6A for ; Thu, 10 Aug 2023 14:41:39 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id 67BF510E542; Thu, 10 Aug 2023 14:41:32 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by gabe.freedesktop.org (Postfix) with ESMTPS id 7911810E53F for ; Thu, 10 Aug 2023 14:41:28 +0000 (UTC) Received: by mail.gandi.net (Postfix) with ESMTPA id DDBB6FF808; Thu, 10 Aug 2023 14:41:25 +0000 (UTC) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=bootlin.com; s=gm1; t=1691678487; 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=43vnQBR2KS8SqaomNNWpPAxrNsBiEbiI0oMhAMJc4f8=; b=PtpWr7bsRF04hV2V7F4lz5rDT+aPb9VSIG0T5EuvMg1Use6IFBC77u7cPz17+APSkwEfW8 ArOj9WmvtLiw+dSQSMw9vmx4JY2Vp3iRLs7xD2/R4aJNzqVuqhFvXNpyPsOAyJcGK1jq1w pPBDx9J22d/ORYUlyRuFC0lin98QeXvXETq+TOgmvmhQWC3wp8BQc9IVNtJK2vlnkExueh 1ZF+j0unyhIAQfb2ZYfiEYtatARGAlkUw/lUAEJ0jt8GWVG41GKX6w52AztCJqjVnnKofG /hMG7j7JDduQSTHXhCygxnuYyuwNvJqI7tCE5CUYeIVFJXVu3yMGtFa18rDw3g== From: Luca Ceresoli To: Neil Armstrong , Sam Ravnborg , David Airlie , Daniel Vetter , Rob Herring , Krzysztof Kozlowski , Conor Dooley Subject: [PATCH v2 2/3] dt-bindings: display: panel: Add panels based on ILITEK ILI9806E Date: Thu, 10 Aug 2023 16:41:15 +0200 Message-Id: <20230810144116.855951-2-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 X-GND-Sasl: luca.ceresoli@bootlin.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski , Thomas Petazzoni , Luca Ceresoli Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" Add bindings for LCD panels based on the ILITEK ILI9806E RGB controller connected over SPI and the "ShenZhen New Display Co NDS040480800-V3" 480x800 panel based on it. Signed-off-by: Luca Ceresoli Reviewed-by: Rob Herring --- Changes in v2: - remove T: line form MAINTAINERS entry - reference spi-peripheral-props.yaml - add 'maxItems: 1' to reg - use unevaluatedProperties - remove out of scope backlight node --- .../display/panel/ilitek,ili9806e.yaml | 63 +++++++++++++++++++ MAINTAINERS | 5 ++ 2 files changed, 68 insertions(+) create mode 100644 Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml diff --git a/Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml b/Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml new file mode 100644 index 000000000000..83d177be4e7d --- /dev/null +++ b/Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml @@ -0,0 +1,63 @@ +# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause) +%YAML 1.2 +--- +$id: http://devicetree.org/schemas/display/panel/ilitek,ili9806e.yaml# +$schema: http://devicetree.org/meta-schemas/core.yaml# + +title: Ilitek ILI9806E display panels + +maintainers: + - Luca Ceresoli + +description: + This binding is for display panels using an Ilitek ILI9806E controller in + SPI mode. + +allOf: + - $ref: panel-common.yaml# + - $ref: /schemas/spi/spi-peripheral-props.yaml# + +properties: + compatible: + items: + - enum: + # ShenZhen New Display Co 3.97" 480x800 RGB a-SI TFT LCD + - newdisplay,nds040480800-v3 + - const: ilitek,ili9806e + + reg: + maxItems: 1 + +required: + - compatible + - reg + - port + +unevaluatedProperties: false + +examples: + - | + #include + + spi { + #address-cells = <1>; + #size-cells = <0>; + + display@0 { + compatible = "newdisplay,nds040480800-v3", "ilitek,ili9806e"; + reg = <0>; + spi-max-frequency = <1000000>; + pinctrl-names = "default"; + pinctrl-0 = <&pinctrl_lcdgpios>; + reset-gpios = <&gpio 26 GPIO_ACTIVE_LOW>; + backlight = <&backlight>; + + port { + ili9806e_in: endpoint { + remote-endpoint = <&lcdif_out>; + }; + }; + }; + }; + +... diff --git a/MAINTAINERS b/MAINTAINERS index 0f966f05fb0d..085e44a7b5e1 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -6516,6 +6516,11 @@ T: git git://anongit.freedesktop.org/drm/drm-misc F: Documentation/devicetree/bindings/display/ilitek,ili9486.yaml F: drivers/gpu/drm/tiny/ili9486.c +DRM DRIVER FOR ILITEK ILI9806E PANELS +M: Luca Ceresoli +S: Maintained +F: Documentation/devicetree/bindings/display/panel/ilitek,ili9806e.yaml + DRM DRIVER FOR JADARD JD9365DA-H3 MIPI-DSI LCD PANELS M: Jagan Teki S: Maintained From patchwork Thu Aug 10 14:41:16 2023 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Luca Ceresoli X-Patchwork-Id: 13349540 Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from gabe.freedesktop.org (gabe.freedesktop.org [131.252.210.177]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 56FD2C001E0 for ; Thu, 10 Aug 2023 14:41:36 +0000 (UTC) Received: from gabe.freedesktop.org (localhost [127.0.0.1]) by gabe.freedesktop.org (Postfix) with ESMTP id D981710E544; Thu, 10 Aug 2023 14:41:32 +0000 (UTC) Received: from relay9-d.mail.gandi.net (relay9-d.mail.gandi.net [217.70.183.199]) by gabe.freedesktop.org (Postfix) with ESMTPS id BC53410E53F for ; Thu, 10 Aug 2023 14:41:29 +0000 (UTC) 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 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 X-GND-Sasl: luca.ceresoli@bootlin.com X-BeenThere: dri-devel@lists.freedesktop.org X-Mailman-Version: 2.1.29 Precedence: list List-Id: Direct Rendering Infrastructure - Development List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Cc: devicetree@vger.kernel.org, linux-kernel@vger.kernel.org, dri-devel@lists.freedesktop.org, Paul Kocialkowski , Thomas Petazzoni , Luca Ceresoli Errors-To: dri-devel-bounces@lists.freedesktop.org Sender: "dri-devel" 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