From nobody Mon Feb 9 16:13:09 2026 Received: from mail-ej1-f47.google.com (mail-ej1-f47.google.com [209.85.218.47]) (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 BB47B39E6E3 for ; Wed, 14 Jan 2026 16:16:48 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.218.47 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768407415; cv=none; b=CV5CNNSYr8iD4DX3WkXP3N709lLwd4JxvjtL4Z+m6R3+lSSrV87himmcE2tEhpkGHUDk4vB4Ua5SPxEvq06Ttcg1qiVevBDZRQgYqQVIKDZh1srOUR+X4UJlVznM6HmmOtYiTYUL2iNl1UGVkKMls+n+oDskk+O/D+O2GA9VGJg= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1768407415; c=relaxed/simple; bh=MT5jbymMsRAAnuwIvxLylqSrOyJjmCLUHpotORkMMsc=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=TrUi8kKlOlrWi1FNGDUvWqcLUw0PeqjfLNceNsNzVwT3tZ3MZVz4AVMc8F/e0oviJ9hfGS/xNL6Aus4yG3AKjeH2tYKudVf9BOlX0RF8aMm8j6qeJ6DMhf5370mnPIpWrihbEyFvTbTdi9mzbDW3WkMTxcIHWbjxgDZKgb2d+DM= 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=QYXvWTYH; arc=none smtp.client-ip=209.85.218.47 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="QYXvWTYH" Received: by mail-ej1-f47.google.com with SMTP id a640c23a62f3a-b8719aeebc8so1295566b.3 for ; Wed, 14 Jan 2026 08:16:48 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1768407407; x=1769012207; 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=OwbdqD4esV5rFpOMyfingdbEhuuUPk8cb1Cjg4dlWpk=; b=QYXvWTYHcjRomg0KYmiaf3WBV0hEH2WLkVSOVs1DI1CFlJyfn20teOw+RJ0jVUhcUc G59c08SOTl89WVL68zeFeyIYn6GfezJ90663PtYYsNJnIA5L73mw6EpX9J/3pniIf9qE 2Wht1krYs173GjwgSOz7c8+8tozkAZWdgv0Ds= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1768407407; x=1769012207; 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=OwbdqD4esV5rFpOMyfingdbEhuuUPk8cb1Cjg4dlWpk=; b=VOwDswJuooFVcgDmRJy/GS6sFbEvXdo9q/WB3JsnnBgIN0HmttKvh+aPiKiFmiSxzh WD2F9nm2rRefK6oYgBdLDGii/qER+8OBa1KEnvsp6K2j5omgmkihJ3tXOBRUnGJNe7KB q2Rm4DWHg0YVqHozPm69XpyWQmBaSiFoeQzAJHPZ48+ryut4equ0m3UJwr8j97wAsM4h Lkaj0SaVcA+KnHADWTFK5/o6/Knf4TFJxendhzZoTZqgJPcu9MlDWkS3++ha47xATm+s 5/rYI3guWiZB7SpKLYtcPmEhv1OXkkk+Z7iVFAguH+k56MLvrwpvYTTxKQ8sYy+zacXi JLjA== X-Gm-Message-State: AOJu0YyY1vrF0NG9WAq2JVvQPFAqRSMrEL6mnV9XTAIeUBbJW719SnLJ 3Q69MFPGP+oB5LwuQ+WJ0Kw50b8ac2YMFLKxJrhNfxnxn6VFuJIM5/+s1feyy1vk7+nrPMEBnNe w6aTB X-Gm-Gg: AY/fxX73gEydCeqnVwoZin9kiehgPkJ9Sc7yH9f0V/swoPWinG421mOn9ukLYSM3Qc1 9vJNYyRb8fQNEGxf6TXR3BjhHMCkWbJCEmX0DvvN09ZjcUD8tGS1Cs0gtlnvCbzPTOf7DnKJfxu jGDmHmlWmKUS5PgJ4FcYE/+0lcMAyKTTa/MYpPxS6Z8S20yQ+nfshbkpxn25ksgfo5Jhuu0D+ak 8vZCQ7B4hL2/NLwqRsOj9ls9wMTvCa14OBjn7ypOEw9/F4SgFiI8Y57f/O5hEOMITZkzdj9cOI+ pzySK5UWskXsemlgcPBswzKQExU/BVrOSqhid8q0YUUiG5l6IzklG4tmITDNVCbwLCioLolJEO0 6LSMBD19iY6nT61fIavCq1T9ruCnKIT4Prd058oX8gz/o4aqh55Crv6WH/nwCX7hh5w4BmV/b/Y CiOwlQ9lBbOA6bCoMMc9+i9nOKrdXgr2LzN4kZpo4192CwXNKDEpsTNlfKkMtDt3NFuNNIyI6C1 EfEkg/TThPyPFwJHxQ/TVLoUTxdM9VKAj+ptXpoA0rr5MNoeh5LU74bRCQBYRz1zGpU3g== X-Received: by 2002:a17:907:97cc:b0:b79:fe73:3b18 with SMTP id a640c23a62f3a-b87676a0ec8mr194194266b.22.1768407406765; Wed, 14 Jan 2026 08:16:46 -0800 (PST) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com (93-47-52-235.ip111.fastwebnet.it. [93.47.52.235]) by smtp.gmail.com with ESMTPSA id a640c23a62f3a-b876dd0e9ffsm152281566b.37.2026.01.14.08.16.45 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 14 Jan 2026 08:16:46 -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 v2 4/4] drm/panel: ilitek-ili9806e: add Rocktech RK050HR345-CT106A SPI panel Date: Wed, 14 Jan 2026 17:16:19 +0100 Message-ID: <20260114161636.1076706-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260114161636.1076706-1-dario.binacchi@amarulasolutions.com> References: <20260114161636.1076706-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 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 67117d8cf483..5d2000f10643 100644 --- a/MAINTAINERS +++ b/MAINTAINERS @@ -7912,6 +7912,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