From nobody Thu Apr 2 01:27:39 2026 Received: from mail-wm1-f49.google.com (mail-wm1-f49.google.com [209.85.128.49]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.subspace.kernel.org (Postfix) with ESMTPS id EBBE936BCDE for ; Wed, 18 Mar 2026 07:34:12 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.49 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773819254; cv=none; b=JEuiS2wXNE+RJI04a4RUCmyJ/ekZZ51vMu7dO1Fbr7G5RsdqLnjT3wy5NEA+nZl1mLT2ChnV0gQamr8ataJS/8ENh5pFdZUUZn2Zkw5Y6d8WHpZ3OnY2AbAcudJe39Qam0XTiBdiLqFy85c4CZRxMGYQsMY6IU4HDJvm8/DO6gU= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1773819254; c=relaxed/simple; bh=V876cwWBK3ntId8rXch5YYqzCsQYarYKIwva3jawn7c=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=AyDNKrNR5Sdy43PlCNnl7zeqR2DzVHZIG0x+8/RdU9twZ9tZCjQTnuZ65365qsXbsBXnaIXjpIlGU8FDDUxj9LMPS7SMSJOA3S7VN5G/r4ncCrOj4Xikb4yA726wU9OTFo3XDwbr/24WVgMPDOoHDyO+8J3Vvh3Vc86LOrxzKcc= ARC-Authentication-Results: i=1; smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com; spf=pass smtp.mailfrom=amarulasolutions.com; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b=ZSK7o7Bo; arc=none smtp.client-ip=209.85.128.49 Authentication-Results: smtp.subspace.kernel.org; dmarc=pass (p=none dis=none) header.from=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; spf=pass smtp.mailfrom=amarulasolutions.com Authentication-Results: smtp.subspace.kernel.org; dkim=pass (1024-bit key) header.d=amarulasolutions.com header.i=@amarulasolutions.com header.b="ZSK7o7Bo" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-4852f8ac7e9so77018095e9.1 for ; Wed, 18 Mar 2026 00:34:12 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1773819251; x=1774424051; darn=vger.kernel.org; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:from:to:cc:subject:date :message-id:reply-to; bh=3iJZ4A+Z3YuQkOwuMAleN5q9lsTUW1qlL9ybdzQtN3g=; b=ZSK7o7Bo1WJGFjcx1uuviXmSPMt2tDDn7dtfCxkcIGVW7EYCIQf8fQtZ4bgUIUlrmm 5pJ1z3HzSQ9d4GDFJWAdwrEpPXW+cCgA6WtULteJvH63Hmv54kr+lzrnJ/SbznJm4MD2 3Jfn9/f2rPfrfdGDESmi++WthttBXs54RltKw= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20251104; t=1773819251; x=1774424051; h=content-transfer-encoding:mime-version:references:in-reply-to :message-id:date:subject:cc:to:from:x-gm-gg:x-gm-message-state:from :to:cc:subject:date:message-id:reply-to; bh=3iJZ4A+Z3YuQkOwuMAleN5q9lsTUW1qlL9ybdzQtN3g=; b=kR0OET2nysYTouAnG8W+PyuT017T5kmOZL+yPCMGe3/ZsR71CZ7Prw8GaRlgDxbE35 IRFoQFid1zk6P/4cvyr4BHOUZfwKfZfKHsnaRnNY4LLn6ZVojIaFqYUDK1ATTMy9N+BK wDj+8NM+MpSdNse1wIBQBsQ26mN307AgcVW8AddeVpk9ajT4zcCvACUP4qkmnk3lFbmN 3oCF/fZm8y0pNkrwW0FeFnx6weQPfCMtCF1nKEQ4jwtxL3IExWav6LqY2wTzAJRtSJJH poIprFPOJdxLAZgy73Tz/rckqjnhm3twrAfq5rEUKqbkrYf4tRKN4oAaAcRJ4As/941G gd1A== X-Gm-Message-State: AOJu0YxVuE19pkT2jXleJazZsJu8edSQhcBy9d/uiODV1ap7PUGDVF3r 7YzoCnmeEiRu2vVEJJXtPctR2F/V7zdkmR06Ju6r6g26b/8DfbkpKYBXNibYCdLHv1RuPIV39Z6 WX91j X-Gm-Gg: ATEYQzymnX4xQr89JJWAv8LsDy3d2E8qXNRKEwlrLVbzERIbL8l+jSLPWlFGWef2xiQ bVC0s1645LAV6Ch3kwMv8kcnTfoKy/GcB2HUc6BDsRYGub9Lzr/vY4HMXb/+NtqeVl1D0yqn+75 3M8AlnCBaGZjhsDjHeQVlL1Qm4dosmNTO5T6Tw/7EdKyAOw3JCYH2dGUhvempnYoQMPSGIiUSRN S0Ya1liG2VPHWhABhhnHd7k0IxYG1opMLjXEsXndpynfTuld3fSzNB0Xrt6rjxkzCNYtueMETO1 cXTn0SVydNmWGgjdHaFLfdemoW5l9ZdJEi5WrfG/NSfHC0fFdVscS5YhW+dYoT6ML9UqooKKG/m IenvQYtEXTrDWTZ3EZ1NTtUn8HVDa5AGxGRvPyzRKQnFOIQnONeD2Gpw8H+np3Z3le9pDQwkA7Y Jwcd9ECNbZKnkJI0rBL7x45SqYQ1Gu/TN2B9zqBvearzBIffQQONDTPG9wNm6Xo/e+DCrkiAL9I Y7GNjiQdeEp3gtBElMBSdbNaQPdpMZ1tAfpNJO0HQCvjrkxZesqj9e56KQ2WsatFFFPZO5j/Nyd mScrtlGkIFKeIkIsADKkBg== X-Received: by 2002:a7b:cd98:0:b0:485:30d4:6b98 with SMTP id 5b1f17b1804b1-486f443c6f1mr24907585e9.15.1773819251003; Wed, 18 Mar 2026 00:34:11 -0700 (PDT) Received: from dario-ThinkPad-P14s-Gen-5.homenet.telecomitalia.it (host-87-9-97-160.retail.telecomitalia.it. [87.9.97.160]) by smtp.gmail.com with ESMTPSA id 5b1f17b1804b1-486f45f7e96sm25615765e9.0.2026.03.18.00.34.08 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 18 Mar 2026 00:34:10 -0700 (PDT) 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 v5 4/4] drm/panel: ilitek-ili9806e: add Rocktech RK050HR345-CT106A SPI panel Date: Wed, 18 Mar 2026 08:32:53 +0100 Message-ID: <20260318073346.18041-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260318073346.18041-1-dario.binacchi@amarulasolutions.com> References: <20260318073346.18041-1-dario.binacchi@amarulasolutions.com> Precedence: bulk X-Mailing-List: linux-kernel@vger.kernel.org List-Id: List-Subscribe: List-Unsubscribe: MIME-Version: 1.0 Content-Transfer-Encoding: quoted-printable Content-Type: text/plain; charset="utf-8" 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 v5: - Add Reviewed-by tag of Neil Armstrong for patches: - 1/4 drm/panel: ilitek-ili9806e: rename to specific DSI driver - 2/4 drm/panel: ilitek-ili9806e: split core and DSI logic Changes in v4: - Fix "WARNING: unmet direct dependencies detected for DRM_PANEL_ILITEK_ILI9806E_CORE" reported by kernel test robot 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 | 12 + 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, 355 insertions(+), 13 deletions(-) create mode 100644 drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c diff --git a/MAINTAINERS b/MAINTAINERS index fcb91fe8d061..15e88008bd14 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8027,6 +8027,7 @@ F: drivers/gpu/drm/panel/panel-ilitek-ili9805.c =20 DRM DRIVER FOR ILITEK ILI9806E PANELS M: Michael Walle +M: Dario Binacchi S: Maintained F: drivers/gpu/drm/panel/panel-ilitek-ili9806e-* =20 diff --git a/drivers/gpu/drm/panel/Kconfig b/drivers/gpu/drm/panel/Kconfig index 7fc20421cba5..ec12850fc231 100644 --- a/drivers/gpu/drm/panel/Kconfig +++ b/drivers/gpu/drm/panel/Kconfig @@ -270,6 +270,18 @@ config DRM_PANEL_ILITEK_ILI9806E_DSI Say Y if you want to enable support for panels based on the Ilitek ILI9806E controller using DSI. =20 +config DRM_PANEL_ILITEK_ILI9806E_SPI + tristate "Ilitek ILI9806E-based RGB SPI panel" + depends on OF + depends on SPI + depends on BACKLIGHT_CLASS_DEVICE + select DRM_MIPI_DBI + select VIDEOMODE_HELPERS + select DRM_PANEL_ILITEK_ILI9806E_CORE + 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 f56dafb36499..948c4a2d58ff 100644 --- a/drivers/gpu/drm/panel/Makefile +++ b/drivers/gpu/drm/panel/Makefile @@ -28,6 +28,7 @@ obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9341) +=3D panel-ilitek-= ili9341.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9805) +=3D panel-ilitek-ili9805.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_CORE) +=3D panel-ilitek-ili9806e-co= re.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_DSI) +=3D panel-ilitek-ili9806e-dsi= .o +obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9806E_SPI) +=3D panel-ilitek-ili9806e-spi= .o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9881C) +=3D panel-ilitek-ili9881c.o obj-$(CONFIG_DRM_PANEL_ILITEK_ILI9882T) +=3D panel-ilitek-ili9882t.o obj-$(CONFIG_DRM_PANEL_INNOLUX_EJ030NA) +=3D panel-innolux-ej030na.o diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-core.c b/drivers/g= pu/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 @@ -20,15 +21,11 @@ struct ili9806e { void *transport; struct drm_panel panel; =20 + unsigned int num_supplies; struct regulator_bulk_data supplies[2]; struct gpio_desc *reset_gpio; }; =20 -static const char * const regulator_names[] =3D { - "vdd", - "vccio", -}; - void *ili9806e_get_transport(struct drm_panel *panel) { struct ili9806e *ctx =3D container_of(panel, struct ili9806e, panel); @@ -44,7 +41,7 @@ int ili9806e_power_on(struct device *dev) =20 gpiod_set_value(ctx->reset_gpio, 1); =20 - ret =3D regulator_bulk_enable(ARRAY_SIZE(ctx->supplies), ctx->supplies); + ret =3D 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) =20 gpiod_set_value(ctx->reset_gpio, 1); =20 - ret =3D regulator_bulk_disable(ARRAY_SIZE(ctx->supplies), ctx->supplies); + ret =3D regulator_bulk_disable(ctx->num_supplies, ctx->supplies); if (ret) dev_err(dev, "regulator bulk disable failed: %d\n", ret); =20 @@ -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 =3D false; + int ret; =20 ctx =3D 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 =3D transport; =20 - for (i =3D 0; i < ARRAY_SIZE(ctx->supplies); i++) - ctx->supplies[i].supply =3D regulator_names[i]; + ctx->supplies[ctx->num_supplies++].supply =3D "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 =3D "vccio"; + set_prepare_prev_first =3D true; + } =20 - ret =3D devm_regulator_bulk_get(dev, ARRAY_SIZE(ctx->supplies), - ctx->supplies); + ret =3D devm_regulator_bulk_get(dev, ctx->num_supplies, ctx->supplies); if (ret) return dev_err_probe(dev, ret, "failed to get regulators\n"); =20 @@ -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"); =20 - ctx->panel.prepare_prev_first =3D true; + if (set_prepare_prev_first) + ctx->panel.prepare_prev_first =3D true; + drm_panel_add(&ctx->panel); =20 return 0; diff --git a/drivers/gpu/drm/panel/panel-ilitek-ili9806e-spi.c b/drivers/gp= u/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