From patchwork Tue Feb 3 07:54:51 2026 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Dario Binacchi X-Patchwork-Id: 4456 Return-Path: X-Original-To: linux-amarula@patchwork.amarulasolutions.com Delivered-To: linux-amarula@patchwork.amarulasolutions.com Received: from mail-wm1-f70.google.com (mail-wm1-f70.google.com [209.85.128.70]) by ganimede.amarulasolutions.com (Postfix) with ESMTPS id D4BA93F24C for ; Tue, 3 Feb 2026 08:56:00 +0100 (CET) Received: by mail-wm1-f70.google.com with SMTP id 5b1f17b1804b1-4806a27aa31sf49321295e9.2 for ; Mon, 02 Feb 2026 23:56:00 -0800 (PST) ARC-Seal: i=2; a=rsa-sha256; t=1770105360; cv=pass; d=google.com; s=arc-20240605; b=L1aZwMNVlVdbsPih5c0740rzHjsY51Lg0ZRWmE0We/T7GpEAa/VDHS7Zwt1dH86xA+ 4VffFBOTfQYPwnhXxxYQnXdu9qP9oCJH95nwS5dshtQebAJTZzHfFSYV/ws0bsrTa4b9 aSWk3hG98jQR71IDhFPVIU3EsRR7at0vnni5HTNM/CfnWr9JivB7BcYcs99dxk9B2hS3 HgDlSpjmth3ZqVeHg0rr6zRxs34/YGHa/GJh6Xp3hbt2RMN7Kk6peExSF54ijFBpj3q4 jo1eAf06D4DOqNs6HhnyPiBoe8+OsEUTv4fEamdhlPj3iYvdS0/FV9P8PQJ3sCB7IK0t x+Wg== ARC-Message-Signature: i=2; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=Awyx1DvPeFt2KydQSHS5xfLOIUpplZsXz9bXtLTwA4s=; fh=LOQ1776+tnREQw1wrAB/AOsuG6lEXtx36KxiiUmE+8E=; b=Rkv7ckh0w7ivdLKMOQUmOqKCsGM9eKGy+3YG7hvmDo0Vvl1rHiTTZbGZ5uAemzXoCB Z5E3PCzRc+h+tHm51nka6EESpOz3/W4eIW2uGedM+QO3DqWvC5HrUhIpOnnoy7foe6tK En3EwYe/Sck4cUB9lJkwFxFy0z4V2WNigV7rs+l4S2UTGx6g9Sn+t+2s0pOVqjz1FbzU hCI9w3o+26jBUBgydxeoHa+0/ulZ9UhHu8qKORprXCs6LLe9YAy2mNU0xhY37fdiGqZX Z/CNHpJwvsqQ1DiJU2BkMYbvlcwks/hMjf4JM9HMI1ajwDazTkLDjRVbgj9Q1BnW59pB 80eg==; darn=patchwork.amarulasolutions.com ARC-Authentication-Results: i=2; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXN8g57o; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1770105360; x=1770710160; darn=patchwork.amarulasolutions.com; h=list-unsubscribe:list-archive:list-help:list-post:list-id :mailing-list:precedence:x-original-authentication-results :x-original-sender:mime-version:references:in-reply-to:message-id :date:subject:cc:to:from:from:to:cc:subject:date:message-id:reply-to; bh=Awyx1DvPeFt2KydQSHS5xfLOIUpplZsXz9bXtLTwA4s=; b=gk6cy/y8vfNPfU8TlXRi/J5EproJS+4SHKC6Dk6diFZ35CvgNMSOe0RMHBBKrkoZer CXZpFsKqLzhjNotrrOrUkPBVLriu2JbWb7UQw72H9S7OF54MD0flrKRMr5BPQzE0GEcJ nKwzxWLs/B2sHdkcJurJjhePTrz5kVoeoTPoA= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770105360; x=1770710160; h=list-unsubscribe:list-archive:list-help:list-post :x-spam-checked-in-group:list-id:mailing-list:precedence :x-original-authentication-results:x-original-sender:mime-version :references:in-reply-to:message-id:date:subject:cc:to:from:x-gm-gg :x-beenthere:x-gm-message-state:from:to:cc:subject:date:message-id :reply-to; bh=Awyx1DvPeFt2KydQSHS5xfLOIUpplZsXz9bXtLTwA4s=; b=bFkSveAr+ucTqXIya6Lu3qwxBxqwBFhjlMK0JGUtKkZ8GL6q3xVhrrbfgD24tFrxPd fO5q2/LgFMCHIh9fDC+PL/vbE5h+E2kTXvk7AA0vedxe4Mf6X3JEjEi4h5cqr3fjvdbc 3xM75QaUOZvBTTQeO3Tx4UX1oN/omWSQgfxCOFPyp5isI765918kT1d1gwQtqOsJaUK7 R0GFLuloOU7CnAeIKYbnBoVK7G7VOwR7E8+5+HcLWEOFvE9b8TUvqzri9nSSyHNBZjW0 piDMdUrsZFWvLbKJB3kdZDomFoEU7ElFP02uoU8oG3YuKuyXPBq3x+Qazmh/+h2W2cR8 Ismg== X-Forwarded-Encrypted: i=2; AJvYcCWm5IhoLYaJJpT8Mc1NClmIPQUuneS0yl65pXDaoWYl/3QqYSxDI8FOoGUJxD5gkLCF8PO7/M+lr00Ai8R/@patchwork.amarulasolutions.com X-Gm-Message-State: AOJu0YzWrQ0pM6Gu6fUkIeYzER1w8+qhjuxmvCsSabGUppc+q60IyBQT HmKrJ9d3RmKjfOz0jik6QOzvvS5wzjspm7YO4ezgmY2GnIN7bIJTu/L40pHxT6FV8D8cAw== X-Received: by 2002:a05:600c:a01:b0:480:462e:d640 with SMTP id 5b1f17b1804b1-482db4b53f0mr187039535e9.36.1770105360388; Mon, 02 Feb 2026 23:56:00 -0800 (PST) X-BeenThere: linux-amarula@amarulasolutions.com; h="AV1CL+G2RL6CGl23jDsQSBLeRej3wDv2slpYJ1H8h3pDwj746g==" Received: by 2002:a05:600c:45cc:b0:477:a252:a832 with SMTP id 5b1f17b1804b1-482e9e263e5ls22835485e9.1.-pod-prod-05-eu; Mon, 02 Feb 2026 23:55:58 -0800 (PST) X-Received: by 2002:a05:600c:138d:b0:47e:e5c5:f3a3 with SMTP id 5b1f17b1804b1-482db493a03mr217235875e9.24.1770105358294; Mon, 02 Feb 2026 23:55:58 -0800 (PST) ARC-Seal: i=1; a=rsa-sha256; t=1770105358; cv=none; d=google.com; s=arc-20240605; b=Khe1zOunGbot+YmDd8f6Xgnxe9ya0AuzkQT8QM1B7rjp9j+GsF+HVM7lxPRGhq8lFL vG9t8menRSn52PXpJVF89MuA8z9OkndaszwmyJoQLULVtHfAolRHXah2bahMFSZSHJwA Tmzx+ujW4JvHOpGt6+s0EqAc5Bj2Cvg/3QrMSdxR18retz0uazbRF2XtxP0Des7pvAiG ZUZ8EHLmVMZyF34ilMNAxNtLf2B6/eChoI9SMBviOf7+tF6knfnHsUdBrF3Y953fBIL7 8+DyS7wV26+w002SyZ6CM1eRK8nksOtilmaV1jiLEK4Hx2LTeF8Qev3LXAoiGyEd1IrQ fKoA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20240605; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:dkim-signature; bh=EzPBZtkRvSXF5rHwCwtGaf1O5mGkAxb0gX3q0+Ld2QU=; fh=AdINyqa0RrhYjILkNDREXbEInCFvYIP+gW50d4EJsQ0=; b=DeXeLyk7mhTNW4qo0DQEGhNsnFPvDUuvKNkwE/b2YAenUE+iUYO3desfI79i2RTixP pOOshJmfokWHgTXrkcQ+3r/F7t+X2z3efpsqGRFWJdbQTA4w8IWSYeuh7wFrZcoVyu92 QKWjZQQUBGiEfiIdi9ji76So/gGHLWkyaLD0CyagaT/fT2mkH+0izFQM13gWIbxbmJJP jXCcW20unnHIBYlqRa2Uao319g8+JF8+oKQ+YfybGAMaK/bb5L3uUw1vcinKGJOEjQOl kyIwuzB1piOAT+K60sC7BsaSQCRSFjxoQDt3OiGs9Ilxdj95ezYwf5hB11j3+TkD99ZJ bq6g==; dara=google.com ARC-Authentication-Results: i=1; mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXN8g57o; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Received: from mail-sor-f41.google.com (mail-sor-f41.google.com. [209.85.220.41]) by mx.google.com with SMTPS id 5b1f17b1804b1-480709985bfsor27090555e9.24.2026.02.02.23.55.58 for (Google Transport Security); Mon, 02 Feb 2026 23:55:58 -0800 (PST) Received-SPF: pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) client-ip=209.85.220.41; X-Gm-Gg: AZuq6aLkNDQv1esuVpHwG6BApbxsm7Tc6hf7iEqIYju+WY/+iYkxXT6xd1D/OY39y8E 98h9iu2rR302ozmtOPoBjoZwiRSkeLv3QsoSgM/VfYRni/UEHcGdYFLnao1mpELz3++oKtWtERM rp8L5v7yIDVxMVHx8Hf9sMbKFGQbu6ilQblOLhvCpsevfDSRWBUwfuJ3ouxl/qeUOua2V5PzeFd QagWMiPhJPjexsyRPYFqPx9IHai/qNhMfHNWAzZtuPnXXxJq0isJLhLaE01Z0GJYU7pJLo/nBNg MSC5xMyKraSHT0dG62SdD9FX5IDM7knDQUizMtvSFdMAVQcuCZG/LfBfFykOPcKxOBcXm+rK4zr BfDV2lYKHA16yvzbdK10AuPS3/mRr9opzN00JE7uYqGYK6Xd8iGeo0baYEAgTLfUz4RFsNvKsvn bx4U9xdzHRvFPJEAJKVSUMbRe8dFleDVwwG8Gex/uZrtnDSsZQ3gW7vIcNqMEFssgsQ/vcIGKMR tsApKjdG7+BY1Hudd1ZJgCMAeG7m7kRees4dtaqB4SpaKmnj50+CHu3O/ue92gqjOSyhWYKC5bu fvjK5Vary9U= X-Received: by 2002:a05:600c:4e47:b0:477:af07:dd21 with SMTP id 5b1f17b1804b1-482db49cdb6mr204376565e9.25.1770105357825; Mon, 02 Feb 2026 23:55:57 -0800 (PST) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-95-248-31-95.retail.telecomitalia.it. [95.248.31.95]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-482e267b699sm111939885e9.16.2026.02.02.23.55.56 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 02 Feb 2026 23:55:57 -0800 (PST) From: Dario Binacchi To: linux-kernel@vger.kernel.org Cc: linux-amarula@amarulasolutions.com, Dario Binacchi , David Airlie , Jessica Zhang , Maarten Lankhorst , Maxime Ripard , Michael Walle , Neil Armstrong , Simona Vetter , Thomas Zimmermann , dri-devel@lists.freedesktop.org Subject: [PATCH v3 4/4] drm/panel: ilitek-ili9806e: add Rocktech RK050HR345-CT106A SPI panel Date: Tue, 3 Feb 2026 08:54:51 +0100 Message-ID: <20260203075548.14907-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260203075548.14907-1-dario.binacchi@amarulasolutions.com> References: <20260203075548.14907-1-dario.binacchi@amarulasolutions.com> MIME-Version: 1.0 X-Original-Sender: dario.binacchi@amarulasolutions.com X-Original-Authentication-Results: mx.google.com; dkim=pass header.i=@amarulasolutions.com header.s=google header.b=LXN8g57o; spf=pass (google.com: domain of dario.binacchi@amarulasolutions.com designates 209.85.220.41 as permitted sender) smtp.mailfrom=dario.binacchi@amarulasolutions.com; dmarc=pass (p=NONE sp=NONE dis=NONE) header.from=amarulasolutions.com; dara=neutral header.i=@amarulasolutions.com Content-Type: text/plain; charset="UTF-8" Precedence: list Mailing-list: list linux-amarula@amarulasolutions.com; contact linux-amarula+owners@amarulasolutions.com List-ID: X-Spam-Checked-In-Group: linux-amarula@amarulasolutions.com X-Google-Group-Id: 476853432473 List-Post: , List-Help: , List-Archive: List-Unsubscribe: , Add support for the Rocktech RK050HR345-CT106A panel based on the Ilitek ILI9806E controller using the SPI bus. The driver is designed to be easily extensible to support other panels with different initialization sequences and display timings by providing a specific descriptor structure for each model. Signed-off-by: Dario Binacchi --- Changes in v3: - Add Reviewed-by tag of Rob Herring Changes in v2: - Introduce DRM_PANEL_ILITEK_ILI9806E_CORE hidden kconfig option. - Split core and DSI logic. - Restore vdd-supply as required for both DSI and SPI types in the dt-bindings. - Dop useless settings in case of rocktech,rk050hr345-ct106a in the dt-bindings. MAINTAINERS | 1 + drivers/gpu/drm/panel/Kconfig | 10 + drivers/gpu/drm/panel/Makefile | 1 + .../drm/panel/panel-ilitek-ili9806e-core.c | 31 +- .../gpu/drm/panel/panel-ilitek-ili9806e-spi.c | 323 ++++++++++++++++++ 5 files changed, 353 insertions(+), 13 deletions(-) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c diff --git a/MAINTAINERS b/MAINTAINERS index b856a62666dc..6aaa32eab636 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7916,6 +7916,7 @@ F: drivers/gpu/drm/panel/panel-ilitek-ili9805.c DRM DRIVER FOR ILITEK ILI9806E PANELS M: Michael Walle +M: Dario Binacchi S: Maintained F: drivers/gpu/drm/panel/panel-ilitek-ili9806e-* diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 333e981eda96..d1cb04e838c5 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -270,6 +270,16 @@ config DRM_PANEL_ILITEK_ILI9806E_DSI Say Y if you want to enable support for panels based on the Ilitek ILI9806E controller using DSI. +config DRM_PANEL_ILITEK_ILI9806E_SPI + tristate "Ilitek ILI9806E-based RGB SPI panel" + depends on SPI + select DRM_PANEL_ILITEK_ILI9806E_CORE + select DRM_MIPI_DBI + select VIDEOMODE_HELPERS + help + Say Y if you want to enable support for panels based on the + Ilitek ILI9806E controller using SPI. + 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 13034cadb8d8..3697687651fe 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) += panel-ilitek-ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9805) += panel-ilitek-ili9805.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_CORE) += panel-ilitek-ili9806e-core.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_DSI) += panel-ilitek-ili9806e-dsi.o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI) += panel-ilitek-ili9806e-spi.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) += panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9882T) += panel-ilitek-ili9882t.o obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) += panel-innolux-ej030na.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c index c088685d9d85..be2cf1440155 100644 --- a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c @@ -11,6 +11,7 @@ #include #include #include +#include #include #include @@ -20,15 +21,11 @@ struct ili9806e { void *transport; struct drm_panel panel; + unsigned int num_supplies; struct regulator_bulk_data supplies[2]; struct gpio_desc *reset_gpio; }; -static const char * const regulator_names[] = { - "vdd", - "vccio", -}; - void *ili9806e_get_transport(struct drm_panel *panel) { struct ili9806e *ctx = container_of(panel, struct ili9806e, panel); @@ -44,7 +41,7 @@ int ili9806e_power_on(struct device *dev) gpiod_set_value(ctx->reset_gpio, 1); - ret = regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); + ret = regulator_bulk_enable(ctx->num_supplies, ctx->supplies); if (ret) { dev_err(dev, "regulator bulk enable failed: %d\n", ret); return ret; @@ -65,7 +62,7 @@ int ili9806e_power_off(struct device *dev) gpiod_set_value(ctx->reset_gpio, 1); - ret = regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); + ret = regulator_bulk_disable(ctx->num_supplies, ctx->supplies); if (ret) dev_err(dev, "regulator bulk disable failed: %d\n", ret); @@ -78,7 +75,8 @@ int ili9806e_probe(struct device *dev, void *transport, int connector_type) { struct ili9806e *ctx; - int i, ret; + bool set_prepare_prev_first = false; + int ret; ctx = devm_kzalloc(dev, sizeof(struct ili9806e), GFP_KERNEL); if (!ctx) @@ -87,11 +85,16 @@ int ili9806e_probe(struct device *dev, void *transport, dev_set_drvdata(dev, ctx); ctx->transport = transport; - for (i = 0; i < ARRAY_SIZE(ctx->supplies); i++) - ctx->supplies[i].supply = regulator_names[i]; + ctx->supplies[ctx->num_supplies++].supply = "vdd"; + if (of_device_is_compatible(dev->of_node, + "densitron,dmt028vghmcmi-1d") || + of_device_is_compatible(dev->of_node, + "ortustech,com35h3p70ulc")) { + ctx->supplies[ctx->num_supplies++].supply = "vccio"; + set_prepare_prev_first = true; + } - ret = devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), - ctx->supplies); + ret = devm_regulator_bulk_get(dev, ctx->num_supplies, ctx->supplies); if (ret) return dev_err_probe(dev, ret, "failed to get regulators\n"); @@ -106,7 +109,9 @@ int ili9806e_probe(struct device *dev, void *transport, if (ret) return dev_err_probe(dev, ret, "Failed to get backlight\n"); - ctx->panel.prepare_prev_first = true; + if (set_prepare_prev_first) + ctx->panel.prepare_prev_first = true; + drm_panel_add(&ctx->panel); return 0; diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c new file mode 100644 index 000000000000..9d10b0d28f52 --- /dev/null +++ b/drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c @@ -0,0 +1,323 @@ +// SPDX-License-Identifier: GPL-2.0 +/* + * SPI interface to the Ilitek ILI9806E panel. + * + * Copyright (c) 2026 Amarula Solutions, Dario Binacchi + */ + +#include +#include +#include +#include +#include + +#include +#include +#include + +#include