From nobody Mon Feb 9 00:01:13 2026 Received: from mail-wm1-f53.google.com (mail-wm1-f53.google.com [209.85.128.53]) (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 48BEA34A793 for ; Wed, 4 Feb 2026 17:32:10 +0000 (UTC) Authentication-Results: smtp.subspace.kernel.org; arc=none smtp.client-ip=209.85.128.53 ARC-Seal: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770226330; cv=none; b=JzCGjPSSqD171QPM9cA2450yUouL+pjNouNwXIWlDAseBXbHPCvBjPIrEZ0qn5h/aHJVzsiDX2p94ZrHKSJ6R5G6Z3g2FGmiEubeonKukYbP/kQ0YLJWu02iBC77ZwrP5/Y0ehQUSuAAbqB2vNWD77lW0elndAun3smOy1wt7Ps= ARC-Message-Signature: i=1; a=rsa-sha256; d=subspace.kernel.org; s=arc-20240116; t=1770226330; c=relaxed/simple; bh=JUPZPJ2NazdyTUQjM0ZoLgebF9uaeEy1W3EsNT0DAWQ=; h=From:To:Cc:Subject:Date:Message-ID:In-Reply-To:References: MIME-Version; b=FfkOVqBt+CsAuwKSX1BGE1LqoMddopa8CVdH4sk5xBkLxX5cTKy6vtNNuRWMWySJU9oxPOUzUxD3SorMQLMQTbFP36x4C1XkksmOjwI58UaEYQSJ0xn+03/HzoknO9FNgnUXZbM+h4kCURNDR1ZqigVnWxEh/T+3JzVA/3Buin4= 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=W9JemxYl; arc=none smtp.client-ip=209.85.128.53 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="W9JemxYl" Received: by mail-wm1-f53.google.com with SMTP id 5b1f17b1804b1-4806f3fc50bso687265e9.0 for ; Wed, 04 Feb 2026 09:32:10 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=amarulasolutions.com; s=google; t=1770226328; x=1770831128; 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=56cCjkyiFGGSWDGk4AV1x6YlDxOaWx0uym+YCUTB630=; b=W9JemxYlQmOCqDW2pflhLvc0a9N95Y27U04HzDljb4oDc4hoPPChjcidRIh9M53w2g LNzzOSlMRdRNm0Jkj/e6YosJYM0g9yKdG1OpHOPjx9MoDWSSTS073FTs6VdPl4BIUW8M 8OSXKtqXNVddNo8FfCq/fVRiVXCRB2WASrMGY= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1770226328; x=1770831128; 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=56cCjkyiFGGSWDGk4AV1x6YlDxOaWx0uym+YCUTB630=; b=NrZTgtuzroV5DnjaOTxKFpr0AWGE+yTuFd2Yyoasj3JGyqJq0sBOJv9nUxRC8elqLF xmT5tnBJKp1UULoNsR4OKcFD/iMxrT5TmWIlQS0tEldtMbUMdBO4/MJXCP/FdIscm0vr /5f8B9vK99b0CFACw0Y3ZPJ+pXeZ/Hhi8mdEnZxqDeOLMZNsm4P+w425+iyN2xhNd2D2 lDDSDB3Pq9DEZoafd6EbBeakTun96oSMJjgj+15jBR7v/zjoYba/scmyghWJ5YqcoUXF 65CurNgsA3SPz+hpFQyxaC8vBeS+4NksU/Z/Pc/thQlue5D0n/+FqHcTPttjC8aisEHk IJ6g== X-Gm-Message-State: AOJu0YxlB8Moc1J6hLBkhulMHa/IfNaP+3MDf6Yu2VBl+PyAWrCRd6n9 kDxmK9y3AJ5pP1BXic1BZurlLTIaAOO+sXYEmHBo2jLDHR+v0UzqpMvRoKe+wH99YpS4QmEK8Z9 SCzCh X-Gm-Gg: AZuq6aJSDaRD1TSUAAWavNDSC3bB++BfV1b/zGGF121lrCytNZhUXaSx5PKOlch+55K v/u8M7f2Q4Irmvjg/ZxArBWxlPRfhSA6aONcF5umCh5WJhsnuZSqQIlerx8e4yqeeYU3k99B+/N b0kDb94hGJKqO7NP4AoqH9LrOb/2/BjV3RuWrQi+/r5E8VOug83GBgJfE378Hhdgv4VIlUMzbYz 2PT9mbNgopyXVqi8G+oWSXaTkaoY+JvSu32vsG1I6aqO13x+eMJdfww/uihyabDN9Avbzk2cWDt 0o82rMbG7gEg9qsOiJ1GeXBqjpxuu793MJVA5RRFbodqkkL/BFiMs0wwRtapL9ftBdKV1hRIBdM DBPBkr6unW0BPOub384VBC5lWrM0LFSAHTFLKrC3VyT/Ooz/n8DhGGdzQha2QGSAoWejnr5XMtd Emr46B0d07URqmw16PRb8BEy4Sdef8ZENUh9ullxbpO8ZSofdaEIZxfBB7+/zTNm/kTO0iBpvMU ZTtfvInPWHX9DfT1XXaRw+VDKQuJPiHIg== X-Received: by 2002:a05:600c:1d99:b0:47d:264e:b35a with SMTP id 5b1f17b1804b1-4830e9344dcmr55725005e9.13.1770226328241; Wed, 04 Feb 2026 09:32:08 -0800 (PST) Received: from dario-ThinkPad-P14s-Gen-5.amarulasolutions.com ([2.196.42.58]) by smtp.gmail.com with ESMTPSA id ffacd0b85a97d-436180640f2sm7241565f8f.39.2026.02.04.09.32.06 (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Wed, 04 Feb 2026 09:32:07 -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 v4 4/4] drm/panel: ilitek-ili9806e: add Rocktech RK050HR345-CT106A SPI panel Date: Wed, 4 Feb 2026 18:31:20 +0100 Message-ID: <20260204173154.337674-5-dario.binacchi@amarulasolutions.com> X-Mailer: git-send-email 2.43.0 In-Reply-To: <20260204173154.337674-1-dario.binacchi@amarulasolutions.com> References: <20260204173154.337674-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 1daf45133c39..d43551c908f3 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 cbfee8abba0c..a76e64b34c06 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 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