From nobody Tue Apr 7 17:16:24 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 6EEC1396D06 for ; Thu, 26 Feb 2026 08:47:25 +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=1772095649; cv=none; b=b9dd9UI9rySAZyhncUhMGBgo8HWXLvEg1iUem4yXk4yNRuP4bUSylcKp67bQsgwhfOMSa2OvPq3Dj1mpSfZ2B8b4p+vQlVRLs+zHQrXbHTNHyeMGQ3ppamU3fAdpJrc/boLI7lqNt4hxmXDMZeZrXcLADuzp2pZjfcPNMYXktCY= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1772095649; c=relaxed/simple; bh=P0fIVFLGH+mBdpDY835tDMAsh1A5//vvhjHjZhOAoR0=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=pG8pZI+bcrlxinoQJvTgPFR4aZ4cP55YEYdr14SDTs9enAHFEmQxfYCVIDv4xDiZH+P27bN8/m9GHRz+3N7wGaKQ7lZI/vFpxZQ6r/Y9S//nw4aJXhK10POjhVBwxz+Fv4pLYvSQHTl937Clf8HAXMxUGk8WVXSdQXII3YdhvZ0= 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=ByalteDK; 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="ByalteDK" Received: by mail-wm1-f49.google.com with SMTP id 5b1f17b1804b1-48374014a77so6405385e9.3 for ; Thu, 26 Feb 2026 00:47:25 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1772095643; x=1772700443; 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=gtsQMjhiq506Xq8FXI7rtm/QcNWCTlABZTBMqgdKP/4=; b=ByalteDK+r+UyDRyAgV7rCZ5+9goVrGi2m1JGkua0jVWrqRzrYBWEioAg8pbci7Nac SI0CusjSHz2TKRrp/AwTMEzXaeVWtc9mJPh6gyGG1VehqWQ69Zu49Yo61qLS2HRZ90LT i2M4H9BSb+4aB+6MSwTo/wC2yF+vdAF/HRESI= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1772095643; x=1772700443; 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=gtsQMjhiq506Xq8FXI7rtm/QcNWCTlABZTBMqgdKP/4=; b=NJpYt1VMbosGX/0siGcKon+zsGsydfd9jWvfRLPH5N/zOzWf5WefEMP1tw+TMNbDel 1B4G/SGA8eaPQO9GPhaFgzygb72IPMwc5cKYmV7z9U2/ZQS3psGIqWcxV8vbH4WGVqzc 9nvlnL/F5sOWUMR5bF71SGhxmaxlT4nqkxP/yrjism0MwNVQIhdLPOJP1CJoG4EoYwqh LRFKCVttUC+O/dl4TyHt7VgjWb6f2d/MzWjknsKSjJLZw+M1pRgkEh8IwGPcWCKa+YOd jnEbc73FzkleznsFoo2ozLBhnlhO+HPVi25kN9GvdYjs65Br/qmp7Erc/0YO/AZG+WyL /Ufg== X-Gm-Message-State: AOJu0Yyyioj0dUUhJhv0rynYERnQItiVMQo8bhFKb6J34V0/bgaivL9t pSc/1ePyNrkHhJJflsS3UVHeGaCV4Mv0ovSp9cETATwRsF6oTrq4Th2gvMpfxzJznuXYcqY6MZg JsCjW X-Gm-Gg: ATEYQzwW17JUj6L/z8mndNfr0dz7SJQ2IiHMei/YwO5Z8S5K2O5i1Ptcu4x4meLkQid ka7r1UVLBHtJSS6o1WdRh9yVrtiioacR5Fvq1gJ/agiTH84yE0WAmPkJ3m7+iTYlA+9icRn1stA Tv5gPlhRXDhu3GFDFEei54ICqnY+LJeOIqOcywhfMsJWI8H5yuB6xZyLl+QXEtk1QxRDSqA/AT7 kGzsvjuZe7i+tC+Fp51EZqyyl74jyNrW2PLrCfFGuiP5ikwg1C1HBg8Q9jN8I2Lb0f29HdxEydn ZbmlkcIsCBDeRgojYs6aogfVfAgPPx9RplQ32ZGvvkWPJ8euwtx1Xq6jBWZhFUBo86uhBE5RhR3 WXLthFd6v1jegZPMQgtKWC/vDrf24G49NM8UuF5yXUp/UMM3Wvc7rLDni4tJ+oHGUtBAWyHvSpY 6IHnRLlGpL/D19hgKADrMLcx4rqoxEgso9jQEs4rUiBSbwgQWDVlgKV/UvKxCMU/g/E+Bbvo8Fb +B+mKbru31H9MGl5bvfkZlYllUKLtHDi2N9aMgbneFS9hLum+6+/Nkpw3aj47xw7zIe/hqYD74q gUN+/PIMzSXOTEc1jV/OOWhN X-Received: by 2002:a05:600c:4f4b:b0:477:a54a:acba with SMTP id 5b1f17b1804b1-483a95e1f34mr335619665e9.17.1772095643354; Thu, 26 Feb 2026 00:47:23 -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-483bfb85c58sm31581075e9.9.2026.02.26.00.47.22 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Thu, 26 Feb 2026 00:47:22 -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: [RESEND PATCH v4 4/4] drm/panel: ilitek-ili9806e: add Rocktech RK050HR345-CT106A SPI panel Date: Thu, 26 Feb 2026 09:47:03 +0100 Message-ID: <20260226084713.2566672-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260226084713.2566672-1-dario.binacchi@amarulasolutions.com> References: <20260226084713.2566672-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 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 46bd910ba2c4..6c5ad37513f7 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -8031,6 +8031,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