From nobody Mon Feb 9 00:31:16 2026 Received: from mail-wm1-f51.google.com (mail-wm1-f51.google.com [209.85.128.51]) (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 B7699392C36 for ; Tue, 3 Feb 2026 07:55:59 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.51 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770105361; cv=none; b=uwQdCxYzVtQPBst3QtKG/ji9Uzl+i8zJ6za9naquU7o6Pupn0RpsDYZu3onfPMxG90WfQsyncwDKfClHK7RVLDnb/kP+HuTOiHtrwShDsYRT1TAztBXEFsjrxahFjRb/j1icUU4z1LTWv4KjJzkM9bE9biPF1vW3KJhoH1+CS0U= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770105361; c=relaxed/simple; bh=v2htD9jGTBgRA4bik0hd2czItbsapddLAEwJTm7ddxw=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=UdMYa3xy7x8KBj7NzQlt8qSnnaerkTBl9E7FTvQVNF+pvLtwG39cVZn44EyOzjgzNaHtMMAkcp1PbSczoyuTUYSQ0jSsidSSyusseS/30jusGyR8o4q0/eSG0ZDa+KrnewhUCfMByxAwREr5QtN2yMu5xTfF93hxRoNZfQ8oQxE= 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=pVCYq2PA; arc=none smtp.client-ip=209.85.128.51 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="pVCYq2PA" Received: by mail-wm1-f51.google.com with SMTP id 5b1f17b1804b1-4806b43beb6so38845275e9.3 for ; Mon, 02 Feb 2026 23:55:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1770105358; x=1770710158; 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=EzPBZtkRvSXF5rHwCwtGaf1O5mGkAxb0gX3q0+Ld2QU=; b=pVCYq2PADb/q6Rpw3WcPzihRaOxDx4Dz8S3FGTHYTtC1QwXy3hpOxBYad02crStDJO r+iuKY8m9PZdRytv2ht/JA8dWN67W/ioU9lefP7uto2WmyR1hcSzJjptB305G7zd/Umz rYU9frAKfB+2quuCHP544KNv0QMC546O25CMc= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770105358; x=1770710158; 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=EzPBZtkRvSXF5rHwCwtGaf1O5mGkAxb0gX3q0+Ld2QU=; b=nTi8kpoLxOVe9qoS9B9fvzSZu+85yvTFCTFzPJ1hK7XUHoidGuhu3ZKrpP+CmGZ4vM ZBjhhn83TJsvRVMxcoyu2QFQjQWKTzeGCh0v98gQ910aQ4Ls/HMjRaQhjAUXk5jIK6gR xjgPYXvKrpVG33SciwAogK8zCaM8biuffuZJ+CsfudbG26lKLAh/KPqsmUMaftpcJbO2 /x2VCrYtq9k8xFGkD9efe2Nu5rSJwnYtjQ11A+QNoI+PPSgTlkVdvblSV/IHQXAJrg9n NlCG3J+3vBMF4kbheTqSnlUaZf/mwJ35uJlU8yCZiGD5pfGry4xXqhPrVBumvwd9wl3N a2Fw== X-Gm-Message-State: AOJu0Yz+bPwUl0m2KBwOJ24P+8oT9GSD7mVsUWg06ciyaud0A0cTpz8r 3lzffe2yDxJ4BotVk9xnj2K2BQ0T7jrpN0Dkw9zEARKtdJ5WNKycpiO/ZPeOxiS5NaXMz8Zt4yj lzrJ8bBQ= X-Gm-Gg: AZuq6aItOmlSNSr9ch0sazxrEo6NvN7KoXqI2e1YKUMGW+88A1EqtLCmEiRg6KhDN9V pgYO/bVIfZa07V44s+xqR/iiWLfS3sHYgyI8L30vSdDlvV3hmlMPShM7AR8gvpB64Z+/wpD4AYI wFMCxo7gHzl1TnVm07e7wzfbNTkcRQVacQ5062jwdp6IkGc54radmvenmhLUK+qfBMw8zXvalwN 22PXHOA8Lng8EJ/UpLQbw5Q+WS0vyFtxGDcsHI/v/jK8dxKoCixCvpplwgi5NME0x9BFlqi024S 1+IfRA78OcS02kMOr2jQG+frVviqYG3YNtqvMDXkJTzPo1iH4ka0aI8nUq+4Rr7xzVeK/A1jOdC omcxiolOYPPwcA+oKJOk60tp0ZS+wEs6yi1apOacILfrN/GgB1Q/61nXT1saFXG2ZDjMdnSsC0K OVnq689mH143iDBgL4wqfuq8aAvlkoIsR6iCfgoeoieHPiP/MQxRPqrmQmAfXK7pIJL5ufwX3X8 H1xALLlyIjMMAedZcP0yjVLAnG/TbKuoI79cCGARiVQbIzYZKKNHmpikuHQrKIevR7aeynEaZvH 3NmfqaLs9Pc= 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> 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 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 =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 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. =20 +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) +=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